0

I am new to android.I am using eclipse editor. suppose if we have a blank page with a single button named "OPEN". by clicking OPEN how can we open another application in android device. In my device I have two packages named project.apk and status.apk. by clicking OPEN button in project app, I need to open Status app. please help me with the code.

1 Answers1

0

You can archive this with 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 from 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 is the reference from here you will get example of other android intents

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

Hope this helps you