Guest User

Untitled

a guest
Feb 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <service android:name="com.abc.xyz.MyService"
  2. android:exported="true">
  3. <intent-filter>
  4. <action android:name="com.abc.xyz.aidl.IMyService"/>
  5. </intent-filter>
  6. </service>
  7.  
  8. ComponentName compName = null;
  9. Intent i = new Intent(com.abc.xyz.aidl.IMyService);
  10. i.setPackage(com.abc.xyz);
  11. i.putExtra("packagename", info.packageName);
  12. i.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
  13. String pkg = "com.abc.xyz";
  14. String cls = "com.abc.xyz.aidl.IMyService";
  15. i.setComponent(new ComponentName(pkg, cls));
  16. compName = startService(i);
  17. return compName;
Add Comment
Please, Sign In to add comment