我正在为Cordova开发一个插件,我希望能够将config.xml用于以下某些设置:
<preference name="CordovaGetJSON">
<api name="uniqueApiName" url="https://api.url.com/whatever" />
<api name="uniqueApiName1" url="https://api.url.com/whatever1" />
<api name="uniqueApiName2" url="https://api.url.com/whatever2" />
</preference>
有可能这样做吗?如果是这样,我如何在Android中获取该数据?
Android将所有首选项添加为Intent上的Extras,我可以获得单个首选项的值,如下所示:
cordova.getActivity().getIntent().getStringExtra("myPreference");
但是我希望得到所有喜欢的孩子。