Get Register Account in android

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
Hi to all.
A few minutes ago I created a library that provides a list of user accounts Android.
options account is GOOGLE account and ALL regsiter account in android
example :
Dim k As RegisterAccount
Log(k.GetRegisterAccount("ALL"))
Or
Log(k.GetRegisterAccount("GOOGLE"))

Download Library from Here
Erel i cannot attahment library because you limit upload size,please increase it
GoodLuck special Erel
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
I dont want to give ANY of my emails to 4shared.
But it is not sownloadable without giving them a socialmediaaccount or an email
 

MarcoRome

Expert
Licensed User
Longtime User
4Shared001.png




4Shared002.png


4Shared003.png


So i have the chance to either
- download using any of facebook, twitter, Google+ or instagram-account
- Register with my emailadress
- login with account (registration must be done first)

Same problem.....
 

daemon

Active Member
Licensed User
Longtime User
I found this simple code somewhere in forum:
B4X:
Sub GetUserAccounts As List
    Dim r As Reflector
    Dim accounts() As Object
    Dim l As List
    l.Initialize
    r.Target = r.RunStaticMethod("android.accounts.AccountManager", "get", _
        Array As Object(r.GetContext), Array As String("android.content.Context"))
    accounts = r.RunMethod2("getAccountsByType", "com.google", "java.lang.String")
    For i = 0 To accounts.Length - 1
        r.Target = accounts(i)
        l.Add(r.GetField("name"))
    Next
    Return l
End Sub
 

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
I found this simple code somewhere in forum:
B4X:
Sub GetUserAccounts As List
    Dim r As Reflector
    Dim accounts() As Object
    Dim l As List
    l.Initialize
    r.Target = r.RunStaticMethod("android.accounts.AccountManager", "get", _
        Array As Object(r.GetContext), Array As String("android.content.Context"))
    accounts = r.RunMethod2("getAccountsByType", "com.google", "java.lang.String")
    For i = 0 To accounts.Length - 1
        r.Target = accounts(i)
        l.Add(r.GetField("name"))
    Next
    Return l
End Sub
Oh my God,it's better than my library thanks.
 
Top