In my android application I have to use a single icon for four different applications ,that means when I click the main icon then four different app icons has to be appear and when I click an app icon a different application has to be opened for each icon.
and
when I installed the new applications the app icon has to be created under the main icon only.
Is it possible ?
If yes how?
Can you not bundle them all into one apk, then have your first activity shown as a menu screen that has 4 icons, when you click on one it takes you to the relevant activity?
I know this is a bit of a workaround, and it wouldn't work if the apps for example have to be installed seperatley but was just a thought.
My first approach would be to do this with a widget:
http://developer.android.com/guide/topics/appwidgets/index.html
You could open a dialog with it and send an intent depending on choice that the desired application can handle.
Related
I want to create App Folder when one app come over another app on Home Screen / App Drawer (As Default Android System/Launcher Provides).
I searched lot for this but it only shows either LiveFolder or shows how we can use it (Using System Default feature). How do I implement this programmatically?
Im attempting to develop an AllApps drawer like Aviate, but as a separate Activity (that way I can launch it from Nova Launcher through a gesture).
I've seen answers on how to add a shortcut to the homescreen. i.e.:
Android create shortcuts on the home screen
How to add shortcut to Home screen in android programatically
Is it possible to specify the which homescreen page and location? I'm guessing not since google playstore does not seem to put it in the best place on a new app install, but wanted to confirm.
On the default launchers, there is no documented way to do this.
Does anyone have example code for creating URL shortcut on the android device home screen ?
I want my app to create some shortcuts to URL.
What do you want to do if the home screen is already full?
I think there are several good reasons why the user should be involved.
This link shows how a user can do it manually:
http://androidforums.com/htc-desire/197568-internet-shortcuts.html
And it contains another link to an app that lets you make custom icons etc.
http://www.folderorganizer.net/how-to/change-label-icon/
If you make a widget for your app, you can programmatically change URL shortcuts that appear in your widget ;-)
I've added shortcuts options for my Android app, but I found out other apps can create shortcut within their apps (in their apps, press menu button, choose create shortcuts, then their shortcuts appear in the launcher), when my only tutorial from Android developer is only for creating shortcuts from launcher (long press in launcher home screen, choose Shortcuts, then choose your app).
Can anyone show me the way to create a shortcuts within app?
Inside question is working solution, take a look. If you have any question add it in a comment.
How to add app's shortcut to the home screen
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.