Redirect User to Play store From Android App -


Hello Friends, I'm developing an app, I had to redirect the user to an app store, I but the discovery has no success .. the code below

  button 1. setOnClickListener (new OnClickListener () {@Override on public void (see v_arg) {intent scene = new intent ( "Android.intent.action.VIEW", Uri. From ("https://play.google.com/store/apps/details?id=com.adeebhat.rabbitsvilla/")); Preliminary (Viewfinder);} Grip (Exception e) {Toast.makeText (GetApplicationContext), "Unable to reconnect again ...", toast .LENGTH_LONG) .show (); E.printStackTrace ();}}}); Button2.setOnClickListener (New OnClickListener) {@Override public void Click (See v_arg) {Intent visible = new Intent ( "android.intent.action.VIEW", Uri.parse ( "market: // details? Id = Com .adeebhat.rabbitsvilla / ")); StartActivity (viewIntent);} hold (exception e) {toast.makeText (getApplicationContext (), "unable to connect to retry ...", toast.LNGTH_LONG). Show (); E.printStackTrace ();}}});    

Remove a slash from the URL. You have added an additional slash after the package name https://play.google.com/store/apps/details?id=com.adeebhat.rabbitsvilla/ < / Pre>

should be

  https://play.google.com/store/apps/details?id=com.adeebhat.rabbitsvilla   

Both Yuri

  Uri.Pars ("https://play.google.com/store/apps/details?id=com.adeebhat.rabbitsvilla")); // Deleted slash   

and

  Uri.parse ("Market: // Details? Id = com.adeebhat.rabbitsvilla")); // deleted slash    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -