Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 从两个不同的应用程序添加相同类型的帐户_Android_Accountmanager - Fatal编程技术网

Android 从两个不同的应用程序添加相同类型的帐户

Android 从两个不同的应用程序添加相同类型的帐户,android,accountmanager,Android,Accountmanager,我有两个不同的应用程序(我自己网站的WEB客户端),它必须使用相同的帐户在我的WEB服务上进行身份验证。我为该任务编写库,并将其包含到两个应用程序中。此库使用AccountManager,并通过类比实现 但有一个问题。我正在一台设备上安装这两个应用程序。我只能从我的一个应用程序(首先安装的)添加帐户。在第二个应用程序中,AccountManager.addAccount()不工作(AccountManagerCallback未调用,getResult()无需执行任何操作)。如何做到这两个应用程序

我有两个不同的应用程序(我自己网站的WEB客户端),它必须使用相同的帐户在我的WEB服务上进行身份验证。我为该任务编写库,并将其包含到两个应用程序中。此库使用AccountManager,并通过类比实现


但有一个问题。我正在一台设备上安装这两个应用程序。我只能从我的一个应用程序(首先安装的)添加帐户。在第二个应用程序中,AccountManager.addAccount()不工作(AccountManagerCallback未调用,getResult()无需执行任何操作)。如何做到这两个应用程序都可以添加一种类型的帐户?

请澄清“不工作”部分。@Egor,问题已更新。不工作意味着回调不启动,getResult()无事可做,只是无限期地等待。