Guest User

Untitled

a guest
May 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <intent-filter>
  2. <action android:name="android.intent.action.VIEW" />
  3.  
  4. <category android:name="android.intent.category.DEFAULT" />
  5. <category android:name="android.intent.category.BROWSABLE" />
  6.  
  7. <data
  8. android:host="myhost"
  9. android:pathPattern="/feed/.*"
  10. android:scheme="http" />
  11. <data
  12. android:host="myhost"
  13. android:pathPattern="/feed/.*"
  14. android:scheme="https" />
  15. <data
  16. android:host="myhost"
  17. android:pathPattern="/feed/.*"
  18. android:scheme="http" />
  19. <data
  20. android:host="myhost"
  21. android:pathPattern="/feed/.*"
  22. android:scheme="https" />
  23. </intent-filter>
  24.  
  25. val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
  26. browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
  27. context.startActivity(browserIntent)
Add Comment
Please, Sign In to add comment