Application Details page for Android Jump application Market

Source: Internet
Author: User
Tools class:
 public static Intent getintent (context paramcontext) {StringBuilder Localstringbuilder = new StringBuilder (). Appen
    D ("market://details?id=");
    String str = paramcontext.getpackagename ();
    Localstringbuilder.append (str);
    Uri Localuri = Uri.parse (localstringbuilder.tostring ());
  return new Intent ("Android.intent.action.VIEW", Localuri); //Direct Jump does not judge whether there is a market application public static void start (context Paramcontext, String paramstring) {Uri Localuri = Uri.par
    SE (paramstring);
    Intent localintent = new Intent ("Android.intent.action.VIEW", Localuri);
    Localintent.setflags (Intent.flag_activity_new_task);
  Paramcontext.startactivity (localintent); public static Boolean judge (context Paramcontext, Intent paramintent) {list<resolveinfo> locallist = par
    Amcontext.getpackagemanager (). Queryintentactivities (Paramintent,packagemanager.get_intent_filters);  
  if ((locallist!= null) && (locallist.size () > 0)) {return false;
  }else{return true; } 
    }
To implement a jump:

Intent i = geturi.getintent (getmarketactivity.this);
        Boolean B = Geturi.judge (getmarketactivity.this, i);
        if (B==false)
        {
        	startactivity (i);
        }

Article from: http://www.apkbus.com/forum.php?mod=viewthread&tid=57390&extra=page%3D1&ordertype=2


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.