2

Is it possible to launch another application while inside an application? Is there any other solution to launch another application?

I used this code to call another application from my launching application

Intent LaunchIntent = new Intent(Intent.ACTION_MAIN); 
LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.exaple.sampleapp");     
startActivity(LaunchIntent);
androidBoomer
  • 3,147
  • 6
  • 27
  • 41
  • 1
    What would "inside" look like? What are you trying to achieve? – Simon Jan 30 '14 at 08:28
  • I have a launcher app and there's a button that will trigger to go to another application. In that launcher app, I disabled the Recent App Button and the back button. All I want to happen is when I launch the app(basically the com.example.sampleapp), I want those button(Recent app and Back) are already disabled too. Is that possible? – androidBoomer Jan 30 '14 at 08:36
  • to implement such behaviour,you might need to develop an application which substitutes the default launcher of android.i.e.: GoLauncher – Mehul Joisar Jan 30 '14 at 08:43
  • O_o Whoa! I doubt I can do that easily since I am new in android programming... – androidBoomer Jan 30 '14 at 08:47
  • you may try to search some open-source launcher apps on `GitHub` and then modify it according to your requirements. – Mehul Joisar Jan 30 '14 at 08:49
  • Ok, I'll try to do it and I hope that it will help me. – androidBoomer Jan 30 '14 at 08:54

1 Answers1

1

What do you mean by inside ? Like your app acting as a container ?

When you launch another application the way you did, it is like you opened that app by tapping into its icon on the application drawer. The application will run on its own process and not inside your app.

By doing this, your app will be put at background as the opened app goes to the foreground.

Luis
  • 649
  • 8
  • 9
  • Yes, it's like a container. So meaning to say, it is not possible to disable the buttons of the app that has been launched? – androidBoomer Jan 30 '14 at 08:46
  • Actually, you can do some workarounds to achieve it, but is not recommended because those launched apps may need the back button enabled to be used on navigation. Also, you can block the user to have the access to the back button, it is not a good User Experience. But, for the record, I think if your app creates an overlay view of the TYPE_SYSTEM_ERROR, this will make the back button useless, but I don't remember if it will disappear. But again, this is not a good thing for the user and also your app will need an additional permission to do so. – Luis Jan 30 '14 at 15:28