1

I am trying read barcod and then get URL from this barcod and then trying to open this URL. it show this page which is open with app or continue with browser . even if select open with app . it will ask me this page next time. how can directly open this url with Autocad a360 app.

enter image description here

this is my code:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(StringURL));
startActivity(intent);
2
  • Check this link :- stackoverflow.com/questions/32984955/… Commented Jul 27, 2018 at 13:54
  • 1
    If I understand correctly, you don't want to open this URL in your own app, but in another app that is installed on that device. This is not anything you can do from you app, as it happens on OS level. Depending on your Android version, it should be possible to define default apps. But of course the other app must have support for opening that URL (which is the case, as otherwise it would not be listed in the open with dialog) Commented Jul 27, 2018 at 13:57

1 Answer 1

1

Add this code to manifest.

<activity
 android:theme="@style/AppTheme.Launcher"
 android:name=".features.MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter android:label="@string/app_name">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="YOURSITE.com"
              android:scheme="http" />
    </intent-filter>
</activity>

App will launch when you try to open http://YOURSITE.com Deep link was correct answer

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.