We present a model of gamma-ray emission through neutral pion production and decay in two-temperature advection-dominated accretion flows (ADAFs). We refine previous studies of such a hadronic gamma-ray emission by taking into account (1) relativistic effects in the photon transfer and (2) absorption of gamma-ray photons in the radiation field of the flow. We use a fully general relativistic description of both the radiative and hydrodynamic processes, which allows us to investigate the dependence on the black hole spin.

We find that the gamma-ray luminosities (100 MeV - 10 GeV) observed from flows with the bolometric luminosities between $10^{-4}$ and $10^{-2}$ of the Eddington luminosity are by a factor of 10 to 100 smaller than their X-ray (2 - 10 keV) luminosities. Flows with smaller bolometric luminosities (at which their central regions are transparent to gamma-rays), around a rapidly rotating black hole, can generate gamma-ray luminosities exceeding their X-ray luminosities.

The hadronic gamma-ray emission from ADAFs with nonthermal distribution of proton energies can explain the Fermi-LAT measurements of M87 and Centaurus A. Predictions of our model can also strongly constrain the parameters of spectral models for nearby AGNs, like NGC 4151, for which the upper limits on the ratio of gamma-ray to X-ray luminosities are small.