• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps cannot bind service in android 5.0

py8765

Lurker
Dec 11, 2014
1
0
the first app exported a service, the second app cannot bind the service, and there is no error message.

String serviceName = Constants.SERVICE_NAME_PREFIX + serviceVersion;
ComponentName cpName = new ComponentName(context, serviceName);
Intent service = new Intent();
service.setComponent(cpName);
context.getApplicationContext().bindService(service, connection, Context.BIND_AUTO_CREATE);

the first and the second app has declared the same service, when the second app bind the service, it do not bind that service, but launch a new service with the same name.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones