我想在我自己的应用程序中使用适用于 Android 的 Locale 插件(例如,Llama 提供的)。
http://www.twofortyfouram.com/developer有一些关于如何编写插件的信息,所以我想我也可以从那里找到如何使用插件。
从我发现的示例插件下载
public static final String ACTION_EDIT_SETTING = "com.twofortyfouram.locale.intent.action.EDIT_SETTING"; //$NON-NLS-1$
我已经安装了SecureSettings并使用了如何从 APK 文件中查看 AndroidManifest.xml?解密其清单。它包含此活动:
<activity android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:name=".Activities.TabsActivity" android:exported="true" android:windowSoftInputMode="stateHidden|adjustResize" android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
</intent-filter>
</activity>
与上面的 Locale 文档中的字符串匹配。
但是,执行代码
Intent i = new Intent("com.twofortyfouram.locale.intent.action.EDIT_SETTING");
startActivityForResult(i, 1);
导致 ActivityNotFoundException。
我确信我已经正确安装了 SecureSettings,因为它从 Llama 中显示出来。
两个问题:
- 为了启动活动,我需要更改哪些内容?
- 有没有使用语言环境插件的例子?我发现的所有应用程序似乎都是封闭源代码?