Try this: public static final String YODEL_ACTION = "com.jtaylor.action.YODEL"; Intent intent = new Intent(this.YODEL_ACTION);
(It is really just a string that you can define as you like). Peli On Mar 29, 6:52 pm, jtaylor <[EMAIL PROTECTED]> wrote: > Dan, > > I think I have to explain my problem better. I think I mean a Custom > Action? > > I am using the method IGTalkSession.sendDataMessage(). I want this > method to work. :) As far as I can tell, the second parameter needs an > Intent which broadcasts an action. It's not an explicit call to a > class which I wish it would be though. So right now the only thing > that works is this Action. (Which I shouldn't really use). > > android.intent.action.SAMPLE_GTALK_DATA_MESSAGE > > Attaching this to the Intent that goes into the second parameter of > IGTalkSession.sendDataMessage() is the only way to send a data > message. So I suppose I need to create my own Action to use > IGTalkSession.sendDataMessage()? Is so how do I create that Action? > > - Juan > > On Mar 29, 2:13 am, "Dan Morrill" <[EMAIL PROTECTED]> wrote: > > > > > Hi, Juan! > > > An Intent is just a messenger object for abitrary data. It sounds like you > > are looking for an API call to register your application's Intent with the > > system; however, there is no such API. All you need to do is just create > > an Intent instance and set the fields on it. You never need to subclass > > Intent, or anything like that. > > > Hope that helps, > > > - Dan > > > On Fri, Mar 28, 2008 at 5:19 PM, jtaylor <[EMAIL PROTECTED]> > > wrote: > > > > Where are there instructions to create a Custom Intent? I'm supposing > > > I need it to send a data message in GTalk? > > > > - Juan > > > > On Mar 26, 8:19 pm, jtaylor <[EMAIL PROTECTED]> wrote: > > > > This is obviously an Intent defined by the App. > > > > android.intent.action.SAMPLE_GTALK_DATA_MESSAGE in the AndroidManifest > > > > is not a standard broadcast intent. > > > > > "There are a variety of standard Intent action and category constants > > > > defined in the Intent class, but applications can also define their > > > > own." > > >http://code.google.com/android/reference/android/content/Intent.html > > > > > Therefore, I'm concluding that to send a Data Message in GTalk one > > > > needs to define one's own Intent? Now how does one create a custom > > > > intent? I don't notice any place in the docs or groups on how to > > > > create a custom intent. > > > > > - Juan > > > > > On Mar 26, 11:50 am, jtaylor <[EMAIL PROTECTED]> wrote: > > > > > > The second parameter for IGTalkSession.sendDataMessage() contains, > > > > > "the intent object contains the action to be broadcasted by the > > > > > receiving device's GTalkService" > > >http://code.google.com/android/reference/com/google/android/gtalkserv...) > > > > > > This is in the GTalkDataMessageSender.java, > > > > > > "Intent intent = new Intent(GTalkDataMessageReceiver.ACTION);" > > >http://code.google.com/android/samples/ApiDemos/src/com/google/androi... > > > > > > What type of Action is this? Is this something that was created in a > > > > > special way? Where does this ACTION come from?- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---