Search code examples
androidlauncherandroid-launcher

Launching other Android apps from my app and only my app


I have a suite of apps and I'm looking into making a sort of "host" app that has the ability to download and launch them. I know how to launch the apps and download them from different sources from my app, but now I'm considering how I want the user to be able to access these apps.

It may be that I want them to come to my host app every time. In that case, I am curious if it's possible to download these apps but not have them be displayed in other places on their device. The only way to launch the app would be coming back to my host app and clicking on it there. Does anyone know if this is possible on Android?

I would imagine I could do that by packaging all the code together in one massive app, obviously this isn't very desirable. Especially considering I want to give the user the ability to only download the apps that they want.

This idea is in it's very early stages and doesn't have any hard or strict limitations, so I'm willing to adapt to what is possible and best practices. Any conversation or information about anything related to these topics would be welcome.


Solution

  • Normally, the main activity of an app has an entry like this in its manifest:

        <activity  
            android:name=".MainActivity"  
            android:label="@string/title_activity_main" >  
            <intent-filter>  
                <action android:name="android.intent.action.MAIN" />  
    
                <category android:name="android.intent.category.LAUNCHER" />  
            </intent-filter>  
        </activity>  
    

    The LAUNCHER part is responsible for the app being shown in the device's app launcher. You can remove the whole intent-filter part from your 'child apps' and they will not be visible to the user any more. To still be able to launch it from another app (your launcher app) if that app knows the exact package and activity name, you have to mark the activity as exported instead. So you end up with this for your child app's main activity:

        <activity  
            android:name=".MainActivity"  
            android:label="@string/title_activity_main" 
            android:exported="true">  
    
        </activity>