open a facebook page on browser in android

Posted by Unknown Rabu, 20 Maret 2013 0 komentar

Open a facebook page in Android Application

To open a facebook page in your android application you can create the following method and call this method in a class derived from activity

This will run the facebook page of the user in a different activity window.

public static Intent getOpenFacebookIntent(Activity acty,String szUserId,String szUserName) {

try {
acty.getBaseContext().getPackageManager().getPackageInfo("com.facebook.katana", 0);
return new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/" + szUserId));
} catch (Exception e) {
return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + szUserName));
}
}


If you like the code please provide your feedback.
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: open a facebook page on browser in android
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://apk-xda.blogspot.com/2013/03/open-facebook-page-on-browser-in-android.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of apk xda.