帳戶管理器帳戶存儲在哪裏?它在設備上嗎?如果是,在哪個文件夾中存儲?Android AccountManager帳戶存儲
3
A
回答
4
它存儲在這裏:
Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME;
其中getSystemSecureDirectory:
獲取可用於安全存儲系統目錄下。如果已加密 已啓用文件系統,則會返回加密目錄 (/ data/secure/system)。否則,它將返回未加密的 /data/system目錄。
和DATABASE_NAME = "accounts.db";
1
雖然答案是完全正確的,你應該記住,「Environment.getSystemSecureDirectory()」是一個平臺API方法,而不是公開SDK的API的一部分。如果你看一下它的javadoc,你將實現「@hide」註釋:
/** * Gets the system directory available for secure storage. * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system). * Otherwise, it returns the unencrypted /data/system directory. * @return File object representing the secure storage system directory. * @hide */
隱藏的方法只能通過與該平臺本身一起分發平臺的應用程序意味着使用。作爲Play/Market的應用程序,它們是針對平臺來源而非SDK來源進行編譯的。
這意味着如果您想在Play/Market上發佈您的應用,則不允許使用它。
相關問題
- 1. 在AccountManager中存儲多個帳戶,幷包含一個SyncAdapter
- 2. 的AccountManager增加了帳戶,但在
- 3. AccountManager和OAuth - 如何添加帳戶?
- 4. 通過AccountManager連接到人們的api帳戶android
- 5. 使用Android的AccountManager添加一個自定義帳戶
- 6. 如何使用Google帳戶在Android中使用AccountManager?
- 7. 如何在Android的AccountManager中刪除帳戶
- 8. Android AccountManager拋出AuthenticatorException:添加帳戶時綁定失敗
- 9. 存儲帳戶/密碼
- 10. Android AccountManager
- 11. 經典存儲帳戶僅顯示Azure存儲帳戶度量標準
- 12. 設置Azure存儲帳戶作爲當前存儲帳戶的powershell
- 13. Android帳戶管理器在哪裏存儲帳戶特定首選項?
- 14. Android:我的項目需要存儲哪些數據放入AccountManager
- 15. 存儲帳戶上的Azure BlobTrigger功能
- 16. 轉換Azure經典存儲帳戶
- 17. 由C#創建蔚藍存儲帳戶
- 18. 天青 - 編程創建存儲帳戶
- 19. 創建Azure存儲帳戶VerySlow
- 20. Azure存儲帳戶的可用性
- 21. 存儲帳戶之間的Azure性能
- 22. Azure存儲帳戶文件版本
- 23. 無法訪問存儲帳戶
- 24. Windows Azure和多個存儲帳戶
- 25. 中的AccountManager添加帳戶可能導致死鎖
- 26. 將Azure存儲帳戶(經典)轉換爲ARM Blob存儲
- 27. 我可以使用AccountManager讓用戶使用他們的Google帳戶登錄嗎?
- 28. 列表存儲帳戶僅列出幾個經典的存儲賬戶
- 29. Android - 以安全的方式存儲用戶帳戶是否爲專業版
- 30. 存儲用戶在Android的
感謝您的及時響應! – Guna 2012-01-09 08:52:46
在更新的版本上有多個用戶配置文件支持,您可以在'/ data/system/users/0/accounts.db'找到數據庫,用實際用戶編號替換'0'。 – rymo 2014-04-20 04:56:15