0

我想在我自己的应用程序中使用适用于 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 中显示出来。

两个问题:

  • 为了启动活动,我需要更改哪些内容?
  • 有没有使用语言环境插件的例子?我发现的所有应用程序似乎都是封闭源代码?
4

1 回答 1

0

有没有使用语言环境插件的例子?我发现的所有应用程序似乎都是封闭源代码?

Tasker 和 Locale 具有相同的插件结构,因此基本上为 Locale 制作的插件可以用于 Tasker,反之亦然。我的手机中没有安装 Locale,但我有 Tasker 并安装了一些免费的 Locale 插件,它们在 Tasker 中工作。

我看到了一些 Locale/Tasker 插件源代码:

于 2014-05-23T01:19:44.887 回答