简体   繁体   中英

How do I sent an Android intent to save the current note in evernote so that a new one can created with another intent?

I currently use the following code to create a new Evernote Snapshot note:

    Intent intent = new Intent("com.evernote.action.NEW_SNAPSHOT");
    startActivity(intent);

If there's no note open this works great given that it brings up a new shapshot. If I use the feature once and don't save the note, the unsaved note gets brought up the next time I run this intent and no new snapshot note gets created.

I would like to first send an intent to save the current note and then run this intent to create a new note.

Is this possible with Evernote? If so, how does the intent have to look like?

I'm not using Evernote for programming purposes. But, I can explain one solution.

Retrieve APK file and open it in Android Studio. Try to read Manifest.xml file.

So, the only place the app interacts with the other programs is this:

 <activity
            android:theme="@ref/0x7f0d022c"
            android:name="com.evernote.note.composer.NewNoteAloneActivity"
            android:configChanges="0x5a0"
            android:alwaysRetainTaskState="true"
            android:allowTaskReparenting="true"
            android:windowSoftInputMode="0x2">

            <intent-filter>

                <action
                    android:name="com.evernote.action.VIEW_NOTE" />

                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>

                <data
                    android:scheme="*" />

                <action
                    android:name="com.evernote.action.CREATE_NEW_NOTE" />

                <action
                    android:name="com.evernote.action.EDIT_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_PAGE_CAMERA_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_VIDEO_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_VOICE_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SKITCH_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SPEECH_TO_TEXT_NOTE" />

                <action
                    android:name="com.evernote.action.SWAP_RESOURCE" />

                <action
                    android:name="com.evernote.action.UPDATE_NOTE" />

                <action
                    android:name="com.evernote.action.DELETE_NOTE" />

                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>

                <action
                    android:name="com.evernote.action.CREATE_NEW_NOTE" />

                <action
                    android:name="com.evernote.action.EDIT_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_PAGE_CAMERA_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_VIDEO_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_VOICE_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SKITCH_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SPEECH_TO_TEXT_NOTE" />

                <action
                    android:name="com.evernote.action.SWAP_RESOURCE" />

                <action
                    android:name="com.evernote.action.UPDATE_NOTE" />

                <action
                    android:name="com.evernote.action.DELETE_NOTE" />

                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>

                <data
                    android:mimeType="*/*" />

                <action
                    android:name="com.evernote.action.CREATE_NEW_NOTE" />

                <action
                    android:name="com.evernote.action.EDIT_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_PAGE_CAMERA_SNAPSHOT" />

                <action
                    android:name="com.evernote.action.NEW_VIDEO_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_VOICE_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SKITCH_NOTE" />

                <action
                    android:name="com.evernote.action.NEW_SPEECH_TO_TEXT_NOTE" />

                <action
                    android:name="com.evernote.action.SWAP_RESOURCE" />

                <action
                    android:name="com.evernote.action.UPDATE_NOTE" />

                <action
                    android:name="com.evernote.action.DELETE_NOTE" />

                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

Which is the same as here described.

https://dev.evernote.com/doc/articles/android_intents.php

So, it seems your scenario is not possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM