Guest User

Untitled

a guest
Oct 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public class DeeplinkTestActivity extends AppCompatActivity {
  2.  
  3. @Override
  4.  
  5. protected void onCreate(Bundle savedInstanceState) {
  6.  
  7. super.onCreate(savedInstanceState);
  8.  
  9. // get the data from the intent.
  10.  
  11. Intent intent = getIntent();
  12.  
  13. Uri data = intent.getData();
  14.  
  15. // deeplink - testapp://deeplink/example?key1=value1
  16.  
  17. if (data != null) {
  18.  
  19. // get the additional query params added to the deeplink
  20.  
  21. String value1 = data.getQueryParameter("key1"); // will return "value1"
  22.  
  23. }
  24.  
  25. // get the FlurryMessage from extras
  26.  
  27. FlurryMessage flurryMessage = FlurryMessaging.getFlurryMessageFromIntent(getIntent());
  28.  
  29. if (flurryMessage != null) {
  30.  
  31. // use as required
  32.  
  33. }
  34.  
  35. }
  36.  
  37. }
Add Comment
Please, Sign In to add comment