Android APP does not start under restricted profile

When using an android restricted profile, the app refuses to start with the message:
“The adminstrator does not allow this change” even when the app is allowed in this profile’s settings.
The same thing happens when the app ist configured as administrator for the restricted user (account added and everthing) and started by the resticted user.
The (rooted) Moto-G4-phone runs LineageOS 14.1-20170724-nigthly-athene (Android 7.1.2) and the NC-app is version 1.4.2 from f-droid.

(With davdroid an account on the nc-server can be added by the restricted user and caldav and carddav are recognized correctly, but cannot be used as sources by calendar oder contacts.)

This is some special by lineageos.
I can also reproduce this on my device, but currently have no clue what is happening…

THX for thew reply!
Sorry, i somehow did not catch it.
Last week i upgraded to the latest lineage version, but the problem persists in exactly the same way.
I do not know sh*t about android programming, but i suspect it has something to do with the way the apps implement os restrictions, since some apps work fully with their own data/profile under the restricted profile (k9mail, conversations, whatsapp), some can be configured, but not used (davdroid), some can only add “local” data/profiles, but not use accounts/services (opentasks, calendar can only create/use “local” lists), and the nextcloud app refuses to start with the msg "the admin does not allow the use of this app."
would the logcat-log be of any help diagnosing this?
i am sorry but i do not have a google vanilla device to test this.
regards, pete

Same problem here on Samsung Galaxy Tab A 10.1 with original ROM. I think Nextcloud can not create an account in restricted profile. It would be nice if it falls back to a simple user & password dialog.

An excerpt from Logcat:

11-12 17:48:29.020 2918 2928 I ActivityManager: START u10 {act=android.intent.action.MAIN typ=null flg=0x10200000 cmp=ComponentInfo{com.nextcloud.client/com.owncloud.and roid.ui.activity.FileDisplayActivity}} from uid 1010042 on display 0 ... 11-12 17:48:29.263 4975 4975 V FileDisplayActivity: onCreate() start 11-12 17:48:29.270 4975 4975 D FileDisplayActivity: onCreate(Bundle) starting 11-12 17:48:29.280 2918 2928 I ActivityManager: START u10 {act=null typ=null flg=0x10000000 cmp=ComponentInfo{android/android.accounts.CantAddAccountActivity}} from uid 1000 on display 0 ... 11-12 17:48:29.472 4975 4975 V FileDisplayActivity: onCreate() end 11-12 17:48:29.473 4975 4975 D FileDisplayActivity: onStart() starting 11-12 17:48:29.497 2918 2928 I ActivityManager: START u10 {act=android.content.pm.action.REQUEST_PERMISSIONS typ=null flg=0x0 cmp=ComponentInfo{com.google.android.packag einstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity}} from uid 1010126 on display 0 11-12 17:48:29.497 2918 2928 W ActivityManager: REQUEST_PERMISSIONS Action. 11-12 17:48:29.497 2918 2928 W ActivityManager: REQUEST_PERMISSIONS Action. ... 11-12 17:48:29.504 2918 2928 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=null next=ActivityRecord{7269ff4d0 u10 com.nextcloud.client/com.owncloud.and roid.ui.activity.FileDisplayActivity t1000031} mFocusedStack=ActivityStack{60d9546d0 stackId=1, 5 tasks} 11-12 17:48:29.504 2918 2928 D ActivityManager: moveToFront() : reason=startedActivity setFocusedActivity isAttached=true TaskRecord{107c760d0 #1000031 A=com.nextcloud.c lient U=10 StackId=1 sz=2} 11-12 17:48:29.506 2918 2928 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=TaskRecord{107c760d0 #1000031 A=com.nextcloud.client U=10 StackId=1 sz=2} ne xt=ActivityRecord{908b2a2d0 u10 com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity t1000031} mFocusedStack=ActivitySta ck{60d9546d0 stackId=1, 5 tasks} 11-12 17:48:29.509 4975 4975 E FileDisplayActivity: Access to unexisting list of files fragment!! 11-12 17:48:29.511 4975 4975 V FileDisplayActivity: onResume() start 11-12 17:48:29.511 4975 4975 D FileDisplayActivity: onResume() starting 11-12 17:48:29.622 4975 4975 V FileDisplayActivity: onResume() end ... 11-12 17:48:29.639 2918 3114 D ActivityManager: post active user change for 10 fullscreen true isHomeActivity() false 11-12 17:48:29.656 2918 3114 I ActivityManager: moveTaskToBack: TaskRecord{107c760d0 #1000031 A=com.nextcloud.client U=10 StackId=1 sz=2} 11-12 17:48:29.660 2918 3114 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=null next=ActivityRecord{557f3fdd0 u10 android/.accounts.CantAddAccountActiv ity t1000032} mFocusedStack=ActivityStack{60d9546d0 stackId=1, 5 tasks} 11-12 17:48:29.660 4975 4975 V FileDisplayActivity: onPause() start 11-12 17:48:29.661 4975 4975 D FileDisplayActivity: onPause() ending 11-12 17:48:29.662 4975 4975 V FileDisplayActivity: onPause() end 11-12 17:48:29.662 2918 3109 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=TaskRecord{107c760d0 #1000031 A=com.nextcloud.client U=10 StackId=1 sz=2} ne xt=ActivityRecord{557f3fdd0 u10 android/.accounts.CantAddAccountActivity t1000032} mFocusedStack=ActivityStack{60d9546d0 stackId=1, 5 tasks} ... 11-12 17:48:29.820 2918 2953 I ActivityManager: Displayed android/.accounts.CantAddAccountActivity: +156ms (total +768ms)

AFAIK CantAddAccountActivity is the window with the message “The adminstrator does not allow this change”.

good to get some feedback - i’m still hoping it will work sometime (as there are other programs (“apps”) that seem to be able to do this on android.)
i’ll check again on a recent lineage-nightly in a little while.

@pete.dawgg what other apps can do this? So maybe we can check how they are doing it there.
A quick search only mentioned that restricted profiles are not allowed to read/write sdcard

thank you for your feedback - that’s a great idea (i can’t do much since a í am no dev).
conversations (xmpp-client) can do it (also here)
k9-mail (mailclient) can do it (also here)
“what’s app” can do it
davdroid also (here) can create a profile and retrieve (some) data from nextcloud-server (address-book- and calendar-names), but this data cannot be used; it does not show up in the standard cal-/contacts-apps).
i am quite certain that restricted profiles can read/write the sdcard since files (eg music and photographs) can be used and created.
different directories for the users are created (user0 and user10) but i did not understand the structure this follows or the way the perms are applied to them.

Hello,
I have installed Nextcloud Android App on my Galaxy Tab A (2018, 10.5), Model SM-T590, Android Version 9. The app runs well when I logon as regular user, however when I logon as restricted user I cannot use Nextcloud (the app starts with error message „Your administrator does not allow this change“).

Does anyone know how to solve this issue?

Regards,
Tilo.

I, too, have this problem with a restricted profile (LineageOS with 7.1.2) and would like to know how to solve it.

The workaround at the moment would be to also install the app in the primary profile (you don’t have to log in, just install the app).

The next feature release should have a fix which renders the workaround obsolete, see https://github.com/nextcloud/android/pull/6748