本文主要介绍带SDK的cordova插件的编写,如有疑问可以留言,互相学习。
带SDK的插件与不带其实差别并不大,但是网上的资料介绍的确各有不同,参照着写完发现还是不行,其实是因为cordova也在不停的更新,可能老的方法不适用了。
下面我会解释一个可以用的方法。
1.在AndroidManifest.xml文件中添加service和activty
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service
android:name="com.tets.Service"
android:enabled="true"
android:exported="true" />
<activity
android:name="com.test.Activity2"
android:theme="@android:style/Theme.Translucent" />
<activity
android:name="com.test.Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:na