See http://code.google.com/p/android/issues/detail?id=885

As opposed to removing VIEW from the manifest, I think a cooperative
NotePad should implement VIEW on the content it manages.

On Sep 18, 5:15 am, Peli <[EMAIL PROTECTED]> wrote:
> I just went through the list of intents used in the Notepad tutorial
> for the compilation of a list of intents 
> (http://www.openintents.org/en/node/35
> ), and noticed that there are two unimplemented intents in the
> Manifest:
>
> http://code.google.com/android/samples/NotePad/AndroidManifest.html
> <activity android:name="NoteEditor" android:label="@string/
> title_note">
>             <intent-filter android:label="@string/resolve_edit">
>                 <action android:name="android.intent.action.VIEW" />
>                 <action android:name="android.intent.action.EDIT" />
>                 <action
> android:name="com.android.notepad.action.EDIT_NOTE" />
>                 <category
> android:name="android.intent.category.DEFAULT" />
>                 <data android:mimeType="vnd.android.cursor.item/
> vnd.google.note" />
>             </intent-filter>
>             <intent-filter>
>                 <action android:name="android.intent.action.INSERT" />
>                 <category
> android:name="android.intent.category.DEFAULT" />
>                 <data android:mimeType="vnd.android.cursor.dir/
> vnd.google.note" />
>             </intent-filter>
>         </activity>
>
> If one looks into NoteEditor, VIEW and EDIT_NOTE are 
> missing:http://code.google.com/android/samples/NotePad/src/com/android/notepa...
>         final String action = intent.getAction();
>         if (Intent.ACTION_EDIT.equals(action)) {
>             // ...
>         } else if (Intent.ACTION_INSERT.equals(action)) {
>             // ...
>         } else {
>             // Whoops, unknown action!  Bail.
>             Log.e(TAG, "Unknown action, exiting");
>             finish();
>             return;
>         }
>
> So, I presume that android.intent.action.VIEW and
> com.android.notepad.action.EDIT_NOTE could be removed from the intent
> filter for NoteEditor.
>
> Also, for the NotesList activity 
> (http://code.google.com/android/samples/NotePad/src/com/android/notepa...
> ), the distinction between the actions VIEW and EDIT is not clear, as
> both basically do the same. Is there any point in trying to accomplish
> the same thing in different ways, or is this just historic ballast?
>
> Peli
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to