you're doing nothing wrong - the only problem is it just doesn't work :<

plenty of non-string data types are in the documentation for Intents but if you look at

http://code.google.com/android/reference/com/google/android/gtalkservice/IGTalkSession.html

under sendDataMessage() you'll find this:

the intent object contains the action to be broadcasted by the receiving device's GTalkService, as well as a Bundle that contains a map of key/value pairs to be send to the other device. Althought the class Bundle can contain data of different types, GTalkService currently only supports string types for the OTA protocol. All non-string values will be ignored. In the future, data types other than string may be supported.

so good luck in future !

[EMAIL PROTECTED] wrote:
Hi all,

I have been trying to modify the GTalkDataMessageSender and
GTalkDataMessageReceiver intents and bundles to contain additonal non
String data such as double or int.

The only two lines of code I added were:

intent.putExtra("morestuff",30);
in the sender and:

buf.append(bunle.getInt("morestuff"));
in the receiver.

But when I check the contents of the bundle in the receiver no non
String data is added.  Can anyone explain to me what I'm doing wrong
or give an example of how to add non String data?


  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-no...
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to