Android Question How to avoid placing app icon on home screen

LudwigRS

Member
Licensed User
Longtime User
when installing the app as a widget?
https://play.google.com/store/apps/details?id=pos_mapmypos.com

Many people are confused after installing my widget when they click on the automatically installed icon on the home screen which says then ´ please place this app as widget on the home screen´.

So i want to disable the automatic placement of the app icon.

Any ideas?

PS: remarked 'SetApplicationAttribute(android:icon, "@drawable/icon")
works, but false icon is showed in the widgets list (b4a icon instead of my icon) ?
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Add both (or even just one of these)
B4X:
AddReplacement(<action android:name="android.intent.action.MAIN" />, )
AddReplacement(<category android:name="android.intent.category.LAUNCHER" />, )
lines to manifesteditor

BUT the problem may persist! The point is, that the App MUST be started one time manually.
 
Upvote 0

LudwigRS

Member
Licensed User
Longtime User

Attachments

  • Screenshot_2014-11-10-18-20-34.png
    Screenshot_2014-11-10-18-20-34.png
    198.4 KB · Views: 122
Upvote 0

LudwigRS

Member
Licensed User
Longtime User
Sometimes it is not easy to find the right solution here. Tooo much information :)
Thank you. I will test this and reply the result here.
 
Upvote 0

LudwigRS

Member
Licensed User
Longtime User
So, got it with your help.
The only change, i had to make for the right icon in the widgets listing was in the file : ... Objects\res\xml\mapmypos_info.xml
Here was at the end the icon info missing:
android:updatePeriodMillis="1800000" android:previewImage="@drawable/icon" />
Unfortunately sometimes the designer overwrites this xml file and the icon info is missing again.
So i set the properties of the corrected xml file to read only and everything works fine.

The other change i had to do was in the manifest.xml to aviod showing the apps icon in the menu and to disable the ´open´ button after installation:
SetApplicationAttribute(android:icon, "@drawable/icon")
AddReplacement(<action android:name="android.intent.action.MAIN" />, )
AddReplacement(<category android:name="android.intent.category.LAUNCHER" />, )

Now everything works fine.
Thank you for your help!
 
Last edited:
Upvote 0
Top