简体   繁体   English

如何发送Android意向以将当前笔记保存在evernote中,以便可以使用其他意向创建新笔记?

[英]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: 我目前使用以下代码创建新的Evernote快照笔记:

    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? Evernote可以做到吗? If so, how does the intent have to look like? 如果是这样,意图将如何呈现?

I'm not using Evernote for programming purposes. 我没有将Evernote用于编程目的。 But, I can explain one solution. 但是,我可以解释一种解决方案。

Retrieve APK file and open it in Android Studio. 检索APK文件并在Android Studio中将其打开。 Try to read Manifest.xml file. 尝试读取Manifest.xml文件。

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 https://dev.evernote.com/doc/articles/android_intents.php

So, it seems your scenario is not possible. 因此,看来您的方案是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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