Don't hard-code package names. This is fragile, as you've already found. Don't continue doing it. You'll just break again sometime in the future.
On Mon, Feb 28, 2011 at 11:39 AM, Shane Isbell <shane.isb...@gmail.com>wrote: > Awesome. Thanks Justin: this does the trick: > > Intent loadIntent = > getPackageManager().getLaunchIntentForPackage ("com.google.android.finsky"); > startActivityForResult(loadIntent, 0); > > On Mon, Feb 28, 2011 at 11:23 AM, Justin Anderson > <magouyaw...@gmail.com>wrote: > >> If the package name didn't change you can use this to get the intent to >> launch the market: >> >> http://developer.android.com/reference/android/content/pm/PackageManager.html#getLaunchIntentForPackage%28java.lang.String%29 >> >> On Mon, Feb 28, 2011 at 12:19 PM, Shane Isbell <shane.isb...@gmail.com>wrote: >> >>> I don't want to open to a publisher or application. I want to only open >>> to the market. >>> >>> Shane >>> >>> >>> On Mon, Feb 28, 2011 at 11:14 AM, Marcin Orlowski < >>> webnet.andr...@gmail.com> wrote: >>> >>>> > loadIntent.setClassName("com.android.vending", >>>> > "com.android.vending.AssetBrowserActivity"); >>>> >>>> Why you got this way? As you see it's quite fragile. Try using intent >>>> instead, ie: >>>> >>>> Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse( >>>> "market://search?q=pub:your.pub.name") ); >>>> intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); >>>> startActivity(intent); >>>> >>>> or "market://details?id=your.package.name" >>>> >>>> -- >>>> Regards, >>>> Marcin >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Android Developers" group. >>>> To post to this group, send email to >>>> android-developers@googlegroups.com >>>> To unsubscribe from this group, send email to >>>> android-developers+unsubscr...@googlegroups.com >>>> For more options, visit this group at >>>> http://groups.google.com/group/android-developers?hl=en >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to android-developers@googlegroups.com >>> To unsubscribe from this group, send email to >>> android-developers+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en