1

我正在构建一个 android 应用程序,它提供了创建笔记的能力。

为此,我开始下一个活动:

Intent notepad = new Intent(Intent.ACTION_MAIN);
notepad.addCategory(Intent.CATEGORY_LAUNCHER);
notepad.setPackage("com.sec.android.app.memo");

// Verify it resolves
PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(notepad, PackageManager.GET_INTENT_FILTERS);
boolean isIntentSafe = activities.size() > 0;

// Start Notepad if it's safe
if (isIntentSafe)
{
    startActivity(notepad);
}

代码工作正常,原生备忘录 应用程序成功启动。

但是,当我从桌面启动备忘录 应用程序时,我在我的应用程序中的备忘录中写的笔记是可见的,我希望这些笔记是私密的,并且只能从我的应用程序中看到。

此功能(创建私人笔记)可通过 NoteViewController 类用于 iPhone 应用程序。

有谁知道这是否适用于android App?

提前致谢。

4

1 回答 1

2

No, the app has to be written with this usecase in mind. Memo wasn't. Also, memo is not available on all phones- many phones replace it with other apps with similar purpose. Some don't have a memo app at all. In fact most don't- the sec in your package name is Samasung Electronics Corp, that app will only appear on Samsung phones (and not all of them).

于 2013-04-19T19:03:21.743 回答