[問題] App取得google paly登錄的gmail帳號

看板AndroidDev作者 (^^)時間3年前 (2020/11/09 17:16), 3年前編輯推噓1(100)
留言1則, 1人參與, 3年前最新討論串1/1
想請問App內如何取得google play登錄的gmail帳號呢? 試過這個方法但無法取得, 在Android 8.0手機上運行,權限也有取得 AccountManager accountManager = AccountManager.get(context); Account[] accounts = accountManager.getAccounts(); for(Account account : accounts){ Log.i("--Get Account Example--", account.name); Log.i("--Get Account Example--", account.type); } <uses-permission android:name="android.permission.GET_ACCOUNTS" /> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.195.171 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1604913396.A.92F.html

11/10 10:10, 3年前 , 1F
1.runtime permission 2.android version
11/10 10:10, 1F
※ 編輯: ysety (60.250.195.171 臺灣), 11/10/2020 11:44:44
文章代碼(AID): #1VgGZqal (AndroidDev)