@unnamed===
assuming that you are speaking of the launcher::
probably (because i don't work for android with P5) like with eclipse ||AS that is to say in your manifest, you change the name of the icon, and you add your icon in your assets folder.
after having added the icon in your assets folder you have to edit the Manifest and change the value of the icon (changing its name); be aware that android does not allow name with weird characters: use only lowercase and alphabet from a to z and no space. Your icon must be a.png with alpha.
@akenaton
ok, now I figured out what assets folder is. I thought it was data folder.
I add the icon file(png) in the android >> assets folder
and you said edit the Manifest but I cant figure out what Manifest is.
and about changing name, should I change name just like my sketch name?
@unnamed: or, (more simple?), (perhaps, not tried) change the icons which are in the mode android folder for your, with the same name??? - or add your icons to this folder with another name and change the name in the manifest.
@unanamed
you have only to modify the manifest in sketch folder/
and yes its "@drawable/icon" that you have to adapt/
normally (in "native android") you just have to change this name to what you want (not any suffix) :: "@drawable/myverybeautifulicon" and put this icon in res/drawable ; but this folder does not exist in the P5 way. That s why i told you "try to put your icon in the assets folder". But i think that it is more simple and logical to put the icon in the folder where P5 gets is own default icon, that is to say in the mode/android/icons directory.
Of course i think you can also export the app and add your icon in res: but after that you have (probably) to work with another IDE than P5...
Anyway, the res/drawable folder exist, and my icon's name is "a.png".
I added "a.png" in res/drawable folder.. there was basic icon png.
then i changed "@drawable/icon" to "@drawable/a"
Is that right? Well, errors appear in xml.
@unnamed===ok, i have tried and changed the icon. Working way was to go to the mode android folder and change all (4) the icons inside, not changing the name and leaving the Manifest as it is by default (@drawable/icon).
@akenaton::===
you meant change the icon in same name(icon.png)
4 means drawable, drawable-hdpi,ldpi,xhdpi... right?
Hmm.. I tried that but didn't work... Well I'll try copying the code in new sketch.
the Manifest might be changed
Hi guys,
I tried last night to setup the icon and I did it by putting my icon in the sketch folder (pressing ctrl+k). the way to do it:
[1] Design your icon.
[2] Then generate the following icons from your original icon and make sure you save it as a .png file type. Generate 6 icons with the following resolutions in pixels:
192x192
180x180
96x96
72x72
48x48
36x36
[3] Names those icons as
icon-36.png
icon-48.png
icon-72.png
icon-96.png
icon-180.png
icon-192.png
(I am guessing the name convention follow the manifest... for somebody to test)
[4]Move these files into the sketch folder (no the data folder).
[5]Compile your project and check your new app icon.
@kfrager=== yes, that is what i tried to explain: the names are the names from the android mode code folder; the number is for ldpi, mdpi, hdpi, xhdpi,xxhdpi, xxxhdpi from which android chooses according to the phone category.In most cases xxxhdpi is useless. In the manifest you dont have to change anything.
Answers
@unnamed=== assuming that you are speaking of the launcher:: probably (because i don't work for android with P5) like with eclipse ||AS that is to say in your manifest, you change the name of the icon, and you add your icon in your assets folder.
@akenaton Thanks very much for help. Well I'm not good at English so please explain it easier.
You mean just add icon image file is assets(data)folder)? What should I do after add icon in data folder?
after having added the icon in your assets folder you have to edit the Manifest and change the value of the icon (changing its name); be aware that android does not allow name with weird characters: use only lowercase and alphabet from a to z and no space. Your icon must be a.png with alpha.
@akenaton ok, now I figured out what assets folder is. I thought it was data folder.
I add the icon file(png) in the android >> assets folder and you said edit the Manifest but I cant figure out what Manifest is. and about changing name, should I change name just like my sketch name?
sorry and TIA
@unnamed=== Manifest is the .xml that you have in your sketch folder...edit it, find the icon value and change it for your .png
@unnamed: or, (more simple?), (perhaps, not tried) change the icons which are in the mode android folder for your, with the same name??? - or add your icons to this folder with another name and change the name in the manifest.
@akenaton
Thanks for you help. I almost got it. I hope it is the last question.
Should I fix Both AndroidManifest in android forder and in sketch folder?
and in manifest,
android:icon="@drawable/icon"
I should fix this, right? but I don't know what should be written in " "
Assuming the png's name is "a" , what should be written in " " ??
@unanamed you have only to modify the manifest in sketch folder/ and yes its "@drawable/icon" that you have to adapt/ normally (in "native android") you just have to change this name to what you want (not any suffix) :: "@drawable/myverybeautifulicon" and put this icon in res/drawable ; but this folder does not exist in the P5 way. That s why i told you "try to put your icon in the assets folder". But i think that it is more simple and logical to put the icon in the folder where P5 gets is own default icon, that is to say in the mode/android/icons directory. Of course i think you can also export the app and add your icon in res: but after that you have (probably) to work with another IDE than P5...
@akenaton
Anyway, the res/drawable folder exist, and my icon's name is "a.png". I added "a.png" in res/drawable folder.. there was basic icon png. then i changed "@drawable/icon" to "@drawable/a" Is that right? Well, errors appear in xml.
@unnamed=== i ll try myself && tell you
@akenaton OK I'll wait for you
@unnamed===ok, i have tried and changed the icon. Working way was to go to the mode android folder and change all (4) the icons inside, not changing the name and leaving the Manifest as it is by default (@drawable/icon).
@akenaton::=== you meant change the icon in same name(icon.png) 4 means drawable, drawable-hdpi,ldpi,xhdpi... right? Hmm.. I tried that but didn't work... Well I'll try copying the code in new sketch. the Manifest might be changed
@akenaton Anyway, You have tried changing icon in android>res folder and successed, right?
@unnamed=== no, i have changed the icons in the mode android folder without modifying anywhere the name "icon.png".
@akenaton:: what is mode android folder?
@unnamed===
it is the folder called "modes"inside your main sketches folder
@akenaton::
Hmm I don't see it but my other project has "modes" folder
@unnamed=== look at your main processing sketches folder...
@unnamed== do not try to work with export android folders; where is your.pde?
@akenaton
pdes are there
Hi guys, I tried last night to setup the icon and I did it by putting my icon in the sketch folder (pressing ctrl+k). the way to do it:
[1] Design your icon.
[2] Then generate the following icons from your original icon and make sure you save it as a .png file type. Generate 6 icons with the following resolutions in pixels:
192x192
180x180
96x96 72x72
48x48
36x36
[3] Names those icons as icon-36.png
icon-48.png
icon-72.png
icon-96.png
icon-180.png
icon-192.png
(I am guessing the name convention follow the manifest... for somebody to test)
[4]Move these files into the sketch folder (no the data folder).
[5]Compile your project and check your new app icon.
I hope this helps,
Kf
@kfrager=== yes, that is what i tried to explain: the names are the names from the android mode code folder; the number is for ldpi, mdpi, hdpi, xhdpi,xxhdpi, xxxhdpi from which android chooses according to the phone category.In most cases xxxhdpi is useless. In the manifest you dont have to change anything.
@kfrager @akenaton
Thank You so Much Both! Problem Solved!