How can I make an android application remove it's desktop shortcut when the user deletes the application?
How can I make an android application that does this automatically?
Steevoo,
To remove a desktop icon programmatically, or even whether you need to depends on the launcher you are using. Some launchers allow you to add and remove icons programmatically. Some do all of that by themselves. Some even require you to do it manually. And even fewer may require a reboot to reanalyze the applications installed on the phone. In short, there is not a clear answer, especially since there is no default launcher; there are just default launchers for particular phones.
Related
In one of requirement I need to develop an application where user can launch two application in separate area of screen.
Say Application A in half of the part of screen and in rest of part other application.
I know this could not be straight way to achieve it, but is there any possibility to build such kind of app/launcher. I checked some of mobile ROM support multi application window support.
Any suggestion to achieve this.
You'd have to have this support done on system level, same way Samsung did for example. W/o this you are out of luck.
this is system level thing unless you make you own customize rom it pretty much impossible to do ,if you want to make customize rom then you will be able to do since its an system level this launcher uses system property to do so.
I want to know the exact method which invokes/starts all the apps. I basically want to block a certain set of apps using xposed module. Its ok if the app icon is visible but the app should not be launched after clicking on it. To be precise nothing should happen when the user clicks on the app icon.
So I want to know where the source code which invokes the apps.
PS : I would also like to know if there is any way to hide the icon of the app as well.
Make your own launcher app and replace it with the ones running on mobile phones.
You can check the sources of Laucher and Laucher2 currently running on Android system.
In my application i have done all the process and they are working very well. Now my device needs only one application or other application must not come front to the user's view..
Can I make my Application as Default application or the only application viewable by the user?
To avoid the unnecessary usage of other applications or to keep time consumption I plan to try this.
Would I need to change anything in the Manifest.xml file of this solution solve this?
You cannot do this on a stock device. Your best bet is to create a launcher that only allows launching your app. The user needs to agree to run it however, and it can always be changed and/or disabled in Settings.
I have just downloaded an application from the android market. When I have installed the application, at the same a time shortcut of that application has been created on the default desktop.
So, my question is: how can we create a shortcut of our application at the time of installation?
You're question is very similar to this one.
Give that one a try, it also creates an icon on the home screen, but not during installation. Of course you could make it so it creates this icon during the first run of the app if you want.
The icon being created during the installation is something the user can set in their options, it's not something you have influence on, so you'll have to use an option like above.
That's an option in the Android System settings for the end user. User can choose to have shortcuts created automatically. That's not something you can do as a developer.
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.