PhoneGap Android: How to force Application to use icons from asset\www\res instead res\drawable folder?
config.xml is used only by the PhoneGap Build service.
- Building locally, this file is ignored and the files in your res/drawable directory are used.
- Building with PGBuild, the service looks for this file at the root of your project (next to index.html) and uses it to identify what images should be copied into the res/drawable folder on their end to generate an apk with the right images (in the case of Android).
Since PGBuild builds for a lot of platforms, config.xml is their way of offering as much customisation capabilites as they can outside of the html/js/css. Some of this is just for picking your icons/splash images for each platform but you can do a lot more with too. PGBuild does each of the natively required actions for each platform based on the contents of the uploaded file.
I hope this is clear enough.
How to add custom app icon on Android in Phonegap?
You can use the PhoneGap Builder for easily describing the app icon in the config.xml.
But if you don't want to use the builder this threads perhaps can help you:
App icon for Android in Phonegap
Icon for app using Phonegap for android
App icon for Android in Phonegap
In the Phone Gap the following should contain
www_android\res\values\strings.xml - contains the name of the app
www_android\res\drawable-hdpi - contains a 57x57 pixel icon
www_android\res\drawable-hdpi - contains a 57x57 pixel icon
www_android\res\drawable-hdpi - contains a 57x57 pixel icon
Source (Step 12)
Alternatively
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.nitobi.johngarrett" version="1.0">
<name>John Garrett Drinking Game</name>
<description>
If you're watching a Canucks game, you need play this.
</description>
<author href="http://www.nitobi.com" email="support@nitobi.com">
Tim Kim, Ryan Betts, Fil Maj
</author>
<icon src="img/beer_72.png" width="72" height="72" />
<icon src="img/beer_48.png" width="48" height="48" />
<icon src="img/beer_36.png" width="36" height="36" />
</widget>
Source
Icon for app using Phonegap for android
You provide your Icon in the drawable Resource Folder in .png format and set it in the AndroidManifest.xml, Application Tab.
Icon: @drawable/name_of_your_icon
directly in the graphical editor, no code required.
Phonegap - How to change default icon?
Well, actually I resolved this problem putting drawable folder with icons & splash screens directly into platform/android/res. And it works.
Related Topics
Firebase Retrieve Data Null Outside Method
Fragmentpageradapter Getitem Is Not Called
Phonegap & Android - How to Use The New Select List Style
Put an Indeterminate Progressbar as Footer in a Recyclerview Grid
Particular Title(Fetched from API) Using Searchview
Android - Multiple Custom Versions of The Same App
Gstreamer Examples in Android Studio
How to Show a Mediacontroller While Playing Audio in Android
"Time Since/Ago" Library for Android/Java
How Surfaceholder Callbacks Are Related to Activity Lifecycle
Using Videoview for Streaming or Progressive-Download Video
How to Apply Custom CSS to Android Webview When Url Is from Internet Server
How to Secure My App Against Piracy
Change Order of Views in Linear Layout Android
Receive Audio via Bluetooth in Android