How to: run 2 mobile gmail apps on the same phone
Do You have more than one Gmail account and java enabled mobile phone (probably 99% of phones on the market now), and you would like to conveniently access both (or more) accounts without having to logoff/login between them all the time?
There is a simple way to do it, you can have several gmail clients installed on your phone, each configured with different mailbox name and password. On phones that allow more than one java program running at the same time (89% of them do...) you can even keep several mailboxes open.
The only problem that keeps you from doing so, is the fact that most phones will not let you to install more than one instance of any java app. To overcome this, we need to edit java midlet name. While at it, you can also customize application icon, for example, to coincide with your avatar for that mailbox.
Ok, first, we need to get the .jar file, which is the actual body of the program. If you go to gmail.com/app using non-mobile browser, you will not get a download link for your phone model. I used Firefox addon, called " User Agent Switcher" to create simple UA filled with "x" in each field. This tricks google into thinking that we connect from unknown mobile browser and giving us a download link for a generic java app (not optimized for your specific phone). If you want to find app exactly for your phone model, then you need to find your phone's precise UA string. (Google for it?)
Now, download .jad - the java declaration file, from given link.
Use Notepad to open .jad file. It contains path to .jar.
Now, download .jar file. Back it up. Unpack with RAR, 7Zip or any other program that works wth .rar files. Inside, find META-INF\MANIFEST.MF. Change midlet name - this allows to install several identic apps under different names. Then change text after mdlet-1: this will be the name that will appear under icon of installed app. And last, I changed icon to my avatar. For this, save your avatar as 32x32 or 64x64 .png file.
Now, it's time to put the changed manifest back into jar :). You can do it by opening original .jar and drag-n-drop new manifest overwriting the old one. If you changed icon, drop it in the .jar root, nearby or instead of GmailIcon.png.Now, send your .jar to the phone, install, login, enjoy.
You can switch Firefox back to original UA profile.
That's pretty neat. Did you succeeded in changing the icon display when you are on home screen ? I still have the j9midp20 icon displayed
ReplyDeleteWell, changed icon appears on task manager, on standby screen and in the menu. Inside the app, the top icon is generic java icon. I do not know why it happens or how to fix it.
ReplyDeleteSolnyshok, excellent guide, will link it in form my MIDlet Bible!
ReplyDelete(Menneisyys)
It doesn't work on Nokia E65, displaying error at start application:
ReplyDeleteNetwork Error
java.lang
IllegalStateException:
This method is not
supported in com.nokia.mid.ui.FullCanvas
I works having the jad file as well in the same directory.
It needs modifiying applet name here and the size of the jar file!!!
I found that IBM's J9 Java VM for PalmOS devices apparently refuses to use the icon included in the .jad file, showing a dull cube icon for all java apps.
ReplyDeleteCan someone confirm? I ran the Gmail 1.5 app flawlessly on my new Palm Centro (basically a Treo 680 with a smaller form factor and 1.3MP camera)
FC
Ummm, Why am I downloading and editing the .jad file if I never upload it to the phone?
ReplyDeleteHi, you don't have to edit .jad file, you only open it to find a url to .jar file. This step allows to find url to any version of gmail app.
ReplyDeleteBtw, now, the latest version of gmail app supports multiple accounts easily. I think my hack is not needed anymore.
ReplyDelete