简体   繁体   中英

android- How to launch an app from your app in android

Im trying to launch an application from another one. Ive used the fingerpaint api demo and added a save and some different brushes and Id like the user to be prompted on saving the picture to select something like photoshop to do color correction of photomanipulation to the photo and once they are done with the photo and its saved in photoshop have the fingerpaint app reopen with the photo they just manipulated in the screen and ready for them to add more to if they chose to do so.

Will I have to set a background activity to read the photoshops state and when it saves? Thats what Im thinking I will have to do but Im not sure at this point.

Im not asking for some one to code it out for me but if any one has an idea of how or where I can see an example of an app opening another that would be awesome.

( and please do not be so vague as to say look at the android.com dev section as there is WAY to much info to look through on there. I spend half my day on there already :p )

Intents are used to launch other activities. Best way would be to save the image and get the uri for the image.

Intent i = new Intent(Intent.ACTION_EDIT, imageUri);
this.startActivity(i);

That will launch whatever activity that can handle that uri and intent type. You can also use createChooser to give the user the option to pick an Activity. (similar to have the share option works in most apps).

To do the saving recognition I'm not sure if startActivityForResult would do what you want. it depends on how the Photoshop app is setup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM