Questions tagged [android-multiple-users]

Questions regarding the particulars of the Android multiple users implementation.

Introduction

Since Jelly Bean (4.2) Android allows multiple users spaces on tablets. It means each user has his or her own set of accounts, apps, system settings, files, and any other user-associated data.

App developers are not supposed to do anything in order for apps to work properly, but in reality there are some issues to be discussed and not much official documentation about them.

When to use the tag

Issues directly related to multiple user environments that do need to be addressed by developers to ensure a good functionality of their apps.

39 questions
1
vote
0 answers

Device owner app has no privilege in the secondary user

I am a beginner in Android. I am trying to make an app that can switch the user between the primary and secondary without root. I found DevicePolicyManager.switchUser useful in my case. So I granted my app device owner privilege with adb. When the…
1
vote
0 answers

Android multi-user: get current user info

Strangely there isn't a question on SO regarding this topic. At least I couldn't find one. Like Windows & Linux, Android too allows us to have multiple user accounts on the same device/computer: Each user is the FIRST (or primary) Google account…
1
vote
2 answers

No Activity found to handle Intent { act=android.app.action.ADD_DEVICE_ADMIN (has extras) }

I'm trying to enable the device administration, so I can create secondary users in Android 9. First is to send an intent with ACTION_ADD_DEVICE_ADMIN like this below : // Launch the activity to have the user enable our admin. …
spico
  • 41
  • 7
1
vote
3 answers

Is there any way to install on the same android mobile a debug version of my app AND a google play store version of my app?

Is there any way to install in the same android mobile a debug version of my app AND a google play store version of my app? I try to setup on my android multiple users, but when from another user than the owner user (where the debug version of my…
zeus
  • 12,173
  • 9
  • 63
  • 184
1
vote
0 answers

How to install my app for all device users when it is installed by Owner user?

I would like to know how to make the app and his services available for all device users, including guest mode and users added after it's installation. Kiosk mode and root the device are not an option. My app runs with admin permissions. The APK is…
Lano
  • 593
  • 1
  • 7
  • 13
1
vote
2 answers

Login of many users using SharedPreferences

How can I create a multisession with shared preferences so that two users can login and logout in the same session? I have the following code. public class Session { SharedPreferences prefs; SharedPreferences.Editor editor; Context…
1
vote
2 answers

Ionic Build Android command fails with an exception after trying to add ngCordova calendar plugin

I am working ionic(1.7.15) in ubuntu. My project works fine until i try to implement calendar plugin. After installing this plugin to my project and i try to build with ionic build android command but i am getting the following error. UNEXPECTED…
Mohan Gopi
  • 7,606
  • 17
  • 66
  • 117
1
vote
1 answer

getInstalledPackages() for Android multiple users

I want to get a list of all apps installed on my device. My code is below: PackageManager pm = getApplicationContext().getPackageManager(); List list = pm.getInstalledPackages(0); When I try multiple user registered on my device…
Song
  • 504
  • 7
  • 17
1
vote
0 answers

Requirement of Application Kill on Profile Switch

The android application I am working on involves two activities(parent(P) and child(C)).The issue is that on a profile switch (say from Normal mode to Restricted Profile Mode), the parent activity is being killed by a package on which we have a…
1
vote
1 answer

how to make android app density independence?

I am developing photo Editor in android Studio . I have images and icons on my screen which is not fit to other screens(different sizes). I have included following support screen code in my manifest.xml file
1
vote
1 answer

How to handle in-app billing on devices with multiple accounts?

I'm having problems to handle in-app billing inventory on devices with multiple accounts. DEVICE 1: only one account on the device (user = X) logged with account X on google play logged with account X on google play games purchase done (sku =…
thiagolr
  • 6,909
  • 6
  • 44
  • 64
1
vote
0 answers

Android multiplayer game SDK development

I am developing an Android App in Android Studio. The application is essentially a 1 vs 1 game where gameplay is as follows: A 10 second joint planning phase where the players both plan their moves against each other on their own devices followed…
tcatchy
  • 849
  • 1
  • 7
  • 17
1
vote
0 answers

Unavailable preferred APN for secondary users on multi-user environment

Currently on my code I'm doing the following to obtain the preferred APN on a device: public static final Uri PREFERAPN_URI = Uri.parse("content://telephony/carriers/preferapn"); Cursor cursor = resolver.query(PREFERAPN_URI, null, null, null,…
Jota
  • 82
  • 1
  • 3
1
vote
1 answer

How can the Android 4.2 multiple user API be used remotely?

The new Android 4.2 offers a feature called multiple users where users can have separate accounts, settings, and data. I was wondering if there is a way for this API to be used remotely. For example, can users be made remotely rather than from the…
1
vote
1 answer

In app billing for multiple users in android application

Is it possible to use google's in app billing mechanism for purchasing subscriptions for multiple user in my application? I have login/register mechanism implemented on my own server and users can purchase subscription to get news. But when i logout…