android - launch facebook app from other app -


how can launch facebook app app in android?

to start default launcher activity:

intent intent = new intent("android.intent.category.launcher"); intent.setclassname("com.facebook.katana", "com.facebook.katana.loginactivity"); startactivity(intent); 

i did research, because wanted find out :). found ways how start different activities easily. can not guarantee work after upgrades of facebook. tested current facebook app , works. @ least tested "adb shell" using "am start .....".

basic is:

string uri = "facebook://facebook.com/inbox"; intent intent = new intent(intent.action_view, uri.parse(uri)); startactivity(intent); 

the facebook.com part not checked. can type: "facebook://gugus.com/inbox" having same effect.

how in adb.

1. start adb shell through console: "adb shell" 2. run: "am start -a android.intent.action.view -d facebook://facebook.com/inbox" 

this start inbox activity. here uris examples. think speak do.

facebook://facebook.com/inbox facebook://facebook.com/info?user=544410940     (id of user. "patrick.boos" won't work) facebook://facebook.com/wall facebook://facebook.com/wall?user=544410940   (will show info if have added friend. otherwise redirects activity) facebook://facebook.com/notifications facebook://facebook.com/photos facebook://facebook.com/album facebook://facebook.com/photo facebook://facebook.com/newsfeed 

there might additianl parameters can give of uris, have no time go through code of activities.

how did this? check out apktool.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

c# - Getting "Internal .Net Framework Data Provider error 30" error when column has NULL value -

c++ - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? -