2

I get this dialog once I open http://m.me/myapp on Android Browser. So, on this dialog, when I click the image that says Use Messenger App it searches for the installed Facebook messenger app and opens it, else it redirects to the Facebook Messenger's Google Play Store page.

Is there a way I can bypass this dialog and directly do what apparently is done after I click on Use Messenger App. Is there a way I can extract the deep link or something? Btw, THIS HAS BEEN ACHIEVED ON iOS.

enter image description here

LEE
  • 3,335
  • 8
  • 40
  • 70

1 Answers1

1
 Intent intent;
        try {
            intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb-messenger://"+myapp));
        } catch (android.content.ActivityNotFoundException e) {
            notificationIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.me/myapp"));
        }

startActivity(intent);

I hope this works for you :) I have done this to playstore and if the link format of the string "myapp" this might do the work for you :)

erluxman
  • 18,155
  • 20
  • 92
  • 126
  • Thanks @Laxman. Yes, this would definitely work. However, what I'm looking for is a direct link, since I'm using it inside a script. I have to pass this link directly to the browser, and then it would accordingly open facebook messenger/playstore – LEE Dec 02 '16 at 10:58
  • http://stackoverflow.com/questions/25467445/custom-uri-schemes-for-the-facebook-messenger please see this question for detailed urls , I hope it will help – erluxman Dec 02 '16 at 11:01
  • Tried, but didn't work. `fb-messenger://user-thread/1212121212` The `12121` part is just a placeholder. It contains the thread id. This does work on iOS but not on Android. – LEE Dec 02 '16 at 14:11