4.2中Android加入了多用户
改换这几种调用方式
public void startActivityAsUser(Intent intent, UserHandle user);
public void sendBroadcastAsUser(Intent intent, UserHandle user);
public ComponentName startServiceAsUser(Intent service, UserHandle user);
public boolean stopServiceAsUser(Intent service, UserHandle user);
UserHandle.ALL
UserHandle.CURRENT
UserHandle.CURRENT_OR_SELF
UserHandle.OWNER
android:sharedUserId="android.uid.system" 权限下,直接使用以上方法即可..无需在乎eclipse中错误提示.
例如:
mContext.startServiceAsUser(intent,UserHandle.CURRENT);