问题
Apparently Microsoft has added some Share Intent support to the OneNote Android app: http://www.xda-developers.com/massive-facelift-to-microsoft-onenote-for-android-brings-share-intent-and-multi-window-support/
How can I use a Share Intent on Android to launch the OneNote app?
回答1:
You can not directly launch OneNote through the Share Intent. The behaviour that occurs is:
Content is sent to the OneNote app
Page is created with title matching
EXTRA_SUBJECT
and body as sent inEXTRA_TEXT
.Low priority notification indicating a page has been created fires. Target is set to open OneNote to the View Page activity.
I suppose that if you asked for the Notifications permission you could intercept the Notification and open OneNote yourself at that point.
If you simply want to open OneNote, why not just use something like:
String onPackageName = "com.microsoft.office.onenote";
Intent launchIntent = getPackageManager().
getLaunchIntentForPackage(onPackageName);
startActivity(launchIntent);
来源:https://stackoverflow.com/questions/29635269/launch-onenote-using-share-intent-in-android