We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

How to add google account for android apps?

asked 2014-04-22 11:15:50 +0300

bara gravatar image

updated 2014-07-25 16:00:27 +0300

jiit gravatar image

I have installed google play store a while ago, on the first start it asked me to sign in with my google account. Now I need to add a second google account to use in android apps, but i can not find the menu to add an account.

I have added the account in jolla settings, but it does not make it available for android apps.

Found info: If you manage to get /opt/alien/bin/adb shell working, you can use am start to start activities

The package of the login activity seams to be com.google.android.gsf.login but i am getting an error when I start it, maybe the intent needs the right parameters

$ am start  com.google.android.gsf
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] pkg=com.google.android.gsf }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.android.gsf }
edit retag flag offensive close delete

4 Answers

Sort by » oldest newest most voted
3

answered 2014-04-24 23:29:42 +0300

bara gravatar image

updated 2015-03-26 20:29:07 +0300

Edit: I have uploaded an app which you can use here

It calls the following code

AccountManager acm = AccountManager.get(getApplicationContext()); acm.addAccount("com.google", null, null, null, thisclassname.this, null, null);

and has the permission android.permission.ACCOUNT_MANAGER to AndroidManifest.xml

this will start the add google account dialogue, if you have it installed

Edit: Updated link

edit flag offensive delete publish link more

Comments

Could you somehow provide such app for the community please. Maybe others (me included) could need this possibility too. TIA

J4ZZ ( 2014-04-25 14:13:49 +0300 )edit

I have uploaded the app and edited my answer to link to it

bara ( 2014-04-30 01:08:21 +0300 )edit

Perfect... Big thanks mate. ;)

J4ZZ ( 2014-04-30 03:12:08 +0300 )edit
1

Should your app also able to view accounts previously added e.g. in Google Play Music? Because then for me it doesn't work. Is there any possibility to do that and remove these accounts? Thanks before.

MeeGoSailfish ( 2014-08-20 10:18:17 +0300 )edit
2

how to remove an account that was added before installation of accounthelper.apk? Existing accounts are not listed in the app. but it detects existing accounts when trying to add again.

User ( 2014-10-19 12:13:56 +0300 )edit
1

answered 2014-04-23 10:07:51 +0300

rainisto gravatar image

Google play store and google services are not officially supported.

edit flag offensive delete publish link more
0

answered 2017-07-25 21:29:06 +0300

nadir gravatar image

here is a link to an apk that does exist.

edit flag offensive delete publish link more
0

answered 2017-11-16 08:56:50 +0300

iZero gravatar image

I noticed yesterday that you can add another Google account with Google Maps.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2014-04-22 11:15:50 +0300

Seen: 4,175 times

Last updated: Nov 16 '17