1、android5.0以后不能使用隐式意图启动Service
可以使用一下两种方法:
方法一:
Intent serviceIntent = new Intent();
serviceIntent.setActio("你的服务action");
serviceIntent.setPackage(你的应用的包名");
context.startService(serviceIntent);
方法二:
Intent serviceIntent = new Intent();
ComponentName componentName = new ComponentName(你的应用的包名,serviceName);
serviceIntent.setComponent(componentName);
context.startService(serviceIntent);