I was finally able to send messages between multiple emulators on the
same machine with the sample GtalkdataMessageSender application. The
amount of tweaking needed to do that is non-trivial especially for
someone new to Android. I will try to list the steps here to save
people some time and frustration.

1) Launch multiple instances of android. You can only launch one in
eclipse, the next one will have to done in dos-prompt. I recommend
that you launch it with -data (imagefile) to save your configuration.
on how to accomplish that in dos-promt search for 'emulator' on the
android sdk home page.

2) In emulator-1 enter a valid gmail account eg. [EMAIL PROTECTED] in All -
> Dev Tools -> XMPP Settings.

3) repeat step 2) for emulator-2 with a different valid gmail account
eg. [EMAIL PROTECTED]

4) Go to contacts on both emulators, add the other gmail address as
your contact. (this is also referred to as your buddy list)

5) You need enter the emulator shell, on how to do that, do a search
on 'android abd' in the code google page. What is needed here is to
insert the valid jabber id of [EMAIL PROTECTED] and [EMAIL PROTECTED] into the
gtalkDataMessageCapable table in the database located at /data/data/
com.google.android.providers.im/databases/im.db. The adb documentation
page has information on how to do that. The name of the table, fields,
and value will likely change in the next SDK version. So I will list
some of the commands I used and please modify them accordingly.

i) enter emulator shell (find out yourself)
ii) from shell, open the database at /data/data/
com.google.android.providers.im/databases/im.db with sqlite3 command
(find out yourself). if you get the sqlite>, type .help to see the
commands available.
iii) i will give the actual sqlite insert command here for SDK M5,
insert into gtalkDataMessageCapable(bare_jid, resource)
values('[EMAIL PROTECTED]', 'androidwCxwXphYj3JM'), androidwCxwXphYj3JM
basically means server but i ran out of patience to test it with the
word server.

After this, you should be able to use their gtalkservice sample to
send messages on both emulators.

Hope this helps someone.

Kevin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to