Dianne recommended: You should use names that are fully qualified in your own domain. You -must- do this if the extra is being used in conjunction with some action or such that you haven't yourself defined (such as android.intent.action.VIEW) so that you do not conflict with someone else. If you are defining your own action with extras that go along with it, you can skip the fully qualified names for the extras since you are making your own overall intent protocol. But still, it is better to just consistently fully qualify things.
In these cases, the platform is not a good example of what to do, since the platform is special in that it is the first one defining everything. Just like the use of "android.*" is not a good example of how a normal application should make its own namespace. - Show quoted text - 2008/9/27 Peli <[EMAIL PROTECTED]> > > Is there some (informal) guideline of how to name intent extras, that > is, their defining string? > > Even within the SDK this seems to be controversial: > > * Single word in small letters: SearchManager.QUERY = "query" > > http://code.google.com/android/reference/android/app/SearchManager.html#QUERY > > * fully qualified string with capital letters: > Intent.EXTRA_SHORTCUT_ICON = "android.intent.extra.shortcut.ICON" > > http://code.google.com/android/reference/android/content/Intent.html#EXTRA_SHORTCUT_ICON > > Looking at the Google project ZXing, there is also the single word in > capital letters: com.android.barcodes.Intents.MODE = "SCAN_MODE" > > http://code.google.com/p/zxing/source/browse/trunk/android/src/com/android/barcodes/Intents.java > > This inconsistency becomes quite apparent when looking at a list of > various extras: http://www.openintents.org/en/extras > > I understand that much of this may be historically based, but I wonder > if the Android developers can provide some guidelines of what worked > well or how they would prefer to name future intent extras? > > Peli > www.openintents.org > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

