How to make an android app which contains three other apps? - android

How to make an android app which contains three other apps?
On the main app, the icons of those three apps are displayed and by clicking on an icon, the coresponding app launches.
Like I want to display the icons of facebook, google map and gmail on the main app and by clicking on the facebook icon, facebook opens up.
Should I make a single APK file for all apps? How?

Do you mean that you want the icons to appear in the main apps list? If so, what you need to do is add these lines:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
To whatever activity you want to appear in the main app drawer.
Anyway, this seems like a bad idea except in a few rare circumstances where each 'app' is distinct from the other apps, but it doesn't make sense to have one of them without having them all.
If they are essentially one app, do the world a favor and make only one icon. If they are many apps that can exist independently of each other, make separate apk files for them so that the user can install what he/she wants.

I quite didnt get what u were trying to do, if you have the source codes of the other 3 apps, you could extract the activities and make the main app call the activitied (will require some more configuration though) , if you just have the apk, i think you can request the user to install all the 3 after the main app has been installed, and call them by using intents. :) Good luck on this

Take a look at this question: bundle multiple apps in one app

Related

adding an icon to launcher without installing

I have certain apps which i want to show on launcher . When i click on it it should say app not installed . Is that possible ? I checked AllAppsList.java of ICS . I think we need to provide ApplicationInfo object for that . Is there any alternate ?
Please correct me if I am wrong.
As far as I have understood it this is not possible unless you control the launcher itself. The launcher will add Apps that have the "android.intent.action.MAIN" and "android.intent.category.LAUNCHER" in their manifest to the App drawer.
If there was a good way to add shortcuts to the launchers app drawer I am pretty sure the Ad Networks would use that to inject Ads there.
I guess your most viable option is to create shortcuts on the homescreen.
If you manage to find a solution for it though it would be awesome.
Good luck!
It ISN'T possible. Unless I am misunderstanding the question. Perhaps make a seperate app altogether, with the same name and the same icon, but instead of any content in it, just link it to the market where the full app resides; Or something along those lines.

Android - creating custom launcher

I am intending to develop custom Launcher for Android phone. I have searched web, but I haven't found any valuable information regarding creating "launcher" project. What does an android app needs for being at the top of the GUI (aka launcher)?
I saw this thread a while ago, before creating my own launcher. Here are some crucial things I learned:
Declaring your app to be a launcher
David already mentioned the piece of code that determines your app as a launcher:
<category android:name="android.intent.category.HOME" />
Add this as an intent-filter to the activity your launcher will use for the home screen (in AndroidManifest.xml).
Launcher Issues
As a launcher will run all the time, you need to understand the activity livecycle to prevent issues (like this one).
If you want users (and yourself) to be able to constantly user the app (that's what you usually do with launchers), make sure it never crashes. In the case of a crash users will be taken back to the devices default launcher or other installed ones.
In short: Launchers are expected to be reliable.
Common launcher functions (users usually expect those)
1) A list of apps / appdrawer
From which all apps can be launched or modified. You can use packageManager to list the apps.
As generating such a list may take a while, I suggest you to do it asynchronously and save the list somewhere to speed everything up (which also is expected from launchers ^^)
2) Some settings to change the launcher
I had some users stuck in my launcher before implementing those ^^
You can open the devices launcher settings like this (in Kotlin):
// working in APIs newer than Lollipop
val callHomeSettingIntent = Intent(Settings.ACTION_HOME_SETTINGS)
startActivity(callHomeSettingIntent)
Bonus) An in-app tutorial
This may be useful if you have some features in your app that are not trivial, ways of launching apps that users don't know from other apps.
It also gets you way less messages from users asking how to interact with your software.
Resources:
The GitHub of the minimal launcher I created may be helpful: finnmglas/Launcher
Well, firstly you need to listen to the android.intent.category.HOME intent. Here are some links with full source code which you can have a look at:
Old launcher source code
New launcher source code
Or take a look at launcher plus.

Removing android phone app

I have source the code of android 2.1, and I want to remove phone app from it. But I am not able to remove it. At list first I want to remove it from launcher that it should not be visible in launcher but in manifest file of Phone app I can not able to find launcher category. I don't know what to do?
Please remove all
<category andorid:name="android.intent.category.LAUNCHER" />
in packages/apps/Contacts/AndroidManifest.xml, I think it will work fine.
Or try to remove Contacts.apk (but this may not work because you may get crash again.)
If you want to remove the phone app completely from your phone, then it's as easy as deleting /system/app/Phone.apk. If you want to compile a framework that does not show the phone app in the launcher, then you will need to modify the launcher, not the phone app.

How to create a "stealth"-like Android app?

I'd like to have my application run in somewhat of a "stealth" mode. Two main things I'd like to do:
Not show app icon in installed app list (drawer?) programmatically.
Launch app via dial pad (some special number combination)
I know I can remove the launcher intent filter to hide the icon:
<category android:name="android.intent.category.LAUNCHER" />
But I'd like to do this programmatically, based on app settings. I guess I could work around that, but the biggest issue for me is figuring out how to launch the app via dial pad. I've googled around and searched SO, but haven't really found anything to help with that.
Thanks in advance.
You can programmatically remove icon from launcher as described here
If you want to launch app as call to magic number, it's quite simple using BroadcastReceivers for outgoing call, you can get solution from Right Number app

group multiple apps under the same icon in Application launcher

I want to group multiple apps under the same icon in the application launcher.
For example, 5 apps each displaying 1 different image. But those 5 apps should appear as separate apps on the Android market, therefore they need to have different package name.
But different package name, means that on the Android device they will appear as 5 separate apps in the application launcher, which I am trying to avoid.
The closest solution that I found is to listen for PACKAGE_ADDED broadcast event, and every time another app from those 5 are installed on the device, all the already installed apps would call setApplicationEnabledSetting from PackageManager to hide their icons and let the app that was just installed to handle things.
But the icons are hidden only after rebooting the device.
Is there a way to force the application launcher to refresh at runtime?
Or is there any other way to solve my goal?
I am running out of options. Thanks!
Miha,
What about having one main application, with the other 4 being add-ons (i.e., not shown in the launcher)? You would then have only one launcher icon, and the other applications would be started from the main app. By checking whether the other apps were installed, you could adjust your buttons/views accordingly.
As far as I know, there is no way to force the launcher to refresh. However, you could implement your applications as you described -- having each app hide it's icon when I new one is installed. The user would get an application not installed error though, which is probably not something you want.
Personally, I used the first method: have a main keyboard and then install add-ons which can then be loaded from the main app.
Hope this helps.

Categories

Resources