Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.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中添加gmail帐户?_Android_Gmail_Account - Fatal编程技术网

如何通过应用程序在android中添加gmail帐户?

如何通过应用程序在android中添加gmail帐户?,android,gmail,account,Android,Gmail,Account,我想通过代码在设备中添加gmail帐户。有没有可能,或者我必须手动添加。谢谢..检查回答:非常感谢Paresh…我会处理它…我已经在里面提供了我的包,应用程序正在崩溃。我已在manifest.com中添加了所需的权限。notify是我的包名。我是否需要向其添加任何其他内容账户=新账户(“frewer。rtg@gmail.com“,”com.notify“);字符串密码=“qwegtgr234”;AccountManager=AccountManager.get(上下文);accountManag

我想通过代码在设备中添加gmail帐户。有没有可能,或者我必须手动添加。谢谢..

检查回答:非常感谢Paresh…我会处理它…我已经在里面提供了我的包,应用程序正在崩溃。我已在manifest.com中添加了所需的权限。notify是我的包名。我是否需要向其添加任何其他内容<代码>账户=新账户(“frewer。rtg@gmail.com“,”com.notify“);字符串密码=“qwegtgr234”;AccountManager=AccountManager.get(上下文);accountManager.AddAccountExplicit(帐户、密码、空)请通过按钮而不是在注释中添加代码。注释中的代码几乎不可读。感谢您的回复!我将该代码用于新帐户(“我的帐户”)id@gmail.com“,”这里我的包名是'com.example.addaccount'),我在一个名为xml的文件夹中添加了authenticator.xml文件,包名相同:accountType=“com.example.addaccount”。但我得到错误“呼叫者uid 10043与身份验证者的uid不同”。你能告诉我,我错过了什么吗?我刚刚添加了xml文件并编写了添加帐户的代码,我需要如何引用该xml?