0

I am developing a script in IntelliJ IDEA to download a file. I have a problem with Instagram and Facebook Android applications while opening link, so I want is after clicking on link it should auto open it in Google Chrome browser.

boolean downloadAndroid = false;
DBObject obj = new DBObject();

if(detector.detectMobileLong()) {
    obj.setSystemType("mobile");
    if(detector.isAndroid) {
        downloadAndroid = true;
    }
}
pere plop
  • 51
  • 1
  • 10
  • Possible duplicate of [How can I open a URL in Android's web browser from my application?](https://stackoverflow.com/questions/2201917/how-can-i-open-a-url-in-androids-web-browser-from-my-application) – ADM Nov 28 '17 at 05:24
  • And to open link in google chrome only you can set package name to intent . – ADM Nov 28 '17 at 05:25
  • This is not a app android. my project its a script for develop i used IntelliJ IDEA 2017(check Devices if OS Android auto Download a file for user). so i don't have File apk or ... package name – pere plop Nov 28 '17 at 05:42
  • Ohhk . I misunderstood your question . I don't know how to do it, Maybe [This](https://developer.chrome.com/multidevice/android/intents) can help . If you want to override the android behavior of clicking on links I thing ts not possible cause the system handles the link clicks schemes . It will open a chooser of all application which are able to do the operations(In your case all browsers). – ADM Nov 28 '17 at 05:54
  • if check links in application (Facebook or Instagram or telegram... ) this apps have browser property so this applications open links and run links (Link contents example:audio or Doc ...) and result don't open a chooser of all application – pere plop Nov 28 '17 at 06:08
  • Nobody help to me? – pere plop Nov 28 '17 at 06:41
  • Sorry dude I have no idea of such Functionality . Maybe you can edit your question with some more explanation to get more attention . – ADM Nov 28 '17 at 06:51
  • do you have idea better for explanation.? i think my question its clear . if necessary i can share class code!! thanks – pere plop Nov 28 '17 at 07:08

0 Answers0