Running another android app from my app? -
Running another android app from my app? -
when press button want run separate app made, want somehow bundle these 2 apps user needs download 1 app.
i'm aware of starting intent this:
intent intent = new intent(intent.action_main); intent.setcomponent(new componentname("com.a.myapp","com.a.myapp.mainactivity")); startactivity(intent); but assumes i've downloaded app "com.a.myapp" separately. what's best way bundle "com.a.myapp" existing app?
the easiest way you're trying create new project contains both apps. since apps started initial entry activity, can maintain them in separate packages long have same root name. app1 in bundle com.a.myapp.myapp1. sec app "myapp2" in bundle com.a.myapp.myapp2.
in package section of project's manifest file, set "com.a.myapp" root. register activities in manifest file of entire project. app1 can invoke activity in app2 phone call this:
intent createintent = new intent(); createintent.setclassname(this.getapplicationcontext(), "com.a.myapp.myapp2.activitya"); startactivity(createintent); note: officially create 1 entire app android concerned. if want maintain them separate, need utilize intent filters , phone call other app implicitly. can start link that.
http://developer.android.com/guide/topics/intents/intents-filters.html
android android-manifest android-intent
Comments
Post a Comment