对于我的应用程序,我实现了地理围栏,现在我需要注册服务以接收地理围栏在设备进入指定区域后发送的意图。
当我添加代码
时<service
android:name="my.devname.appname.IntentReceivingClass"
android:label="@string/app_name"
android:exported="false">
</service>
我得到“顶级元素未完成”
这是我目前的IntentReceivingClass
public class IntentEmpfanger extends IntentService {
public IntentEmpfanger() {
super("IntentEmpfanger");
}
protected void onHandleIntent(Intent intent) {
makeNotification();
}
protected void makeNotification(){
...
}
我怀疑可能还有其他方法需要实现,但我没有找到任何东西,Android Studio也没有给我一个警告,通常在我没有实现我必须实现的方法时发生。
我使用this tutorial by google作为项目的参考
非常感谢任何帮助 谢谢