opening a package from another package in android -


this question has answer here:

i new android.i using eclipse editor. suppose if have blank page single button named "open". clicking open how can open application in android device. in device have 2 packages named project.apk , status.apk. clicking open button in project app, need open status app. please me code.

you can archive using android intents

example of borwser intent:

string str = "http://www.google.com"; intent intent = new intent(intent.action_view); intent.setdata(uri.parse(str)); startactivity(intent); 

example of camera intent:

string fname = "myphoto.jpg";  contentval val = new contentval(); val.put(mediastore.images.media.title, fname); val.put(mediastore.images.media.description,"image camera");  image = getcontentresolver().insert(mediastore.images.media.external_content_uri, val);   intent intent = new intent(mediastore.action_image_capture); intent.putextra(mediastore.extra_output, image); intent.putextra(mediastore.extra_video_quality, 1); startactivityforresult(intent, capture_image_activity_request_code); 

below reference here example of other android intents

http://www.tutorialspoint.com/android/

hope helps you


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -