android - Force Close trying to launch a market page from and alert box -
can figure out why causes force close??
void failbox(){ // create alert box alertdialog.builder alertbox = new alertdialog.builder(this); // set message display alertbox.setmessage(r.string.fail); alertbox.setpositivebutton("get busybox", new dialoginterface.onclicklistener() { // when button clicked public void onclick(dialoginterface arg0, int arg1) { intent = new intent(intent.action_view); i.setdata(uri.parse("market://details?id=stericson.busybox")); } }); // set negative/no button , create listener alertbox.setnegativebutton("cancel", new dialoginterface.onclicklistener() { // when button clicked public void onclick(dialoginterface arg0, int arg1) { } }); // show alert box alertbox.show(); } thanks in advance!
if you're getting forced close in emulator, that's how is, best can tell. cannot access market through market app emulator.
does app still crash when run on real android device?
(of course, folks have figured out sneaky ways market emulator. see how install android market app on emulator?)
Comments
Post a Comment