cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Asset Manager official app - Offline maps - permissions on newer Android

Radek_Uhlir
Explorer
0 Kudos

I want to use Offline maps in SAP Asset Manager mobile application. Some time ago I built SAP Service and Asset Manager in the BTP cockpit. Version: SAM version 2305, Android 10/11 (or lover). I installed it on my Android devices and copied a .tpk file (my map). Then I had to go to the permissions (in Android settings) and grant permission to access files.

Apps -> Permissions -> Permissions -> Files -> See more apps that can access all files -> (scroll and find) SAM
|O| Allow access to manage all files
| | Don't allow

So far so good.

But when I install the official SAP Service and Asset Manager from Google Play, the application does not have permission to access my offline map (I cannot grand the permission). In one device, I do not have SAM in the list of applications to grant File access permission. On another Android device, I have a missing option.

Android Settings -> Apps -> Permissions -> Permissions -> Files and media -> (scroll and find) SAM
|O| Allow management of all files    ! the option is missing for this app !
| | Allow access to media only
| | Don't allow

My older SAM built by BTP with an Android API level lower than 29 has this option in Android Settings.

In Android, can I somehow grant the permission even when .apk does not say the permission is required? I suppose the permission has to be specified in AndroidManifest.xml and this file can be distributed only with the .apk? I need to use the official application from the store.

View Entire Topic
muhammad_rafay
Advisor
Advisor
0 Kudos

Did you try to install the official Play Store application on the latest version of the Android and check the permission there?

Radek_Uhlir
Explorer
0 Kudos
Yea I am using the latest version. I am trying to answer my own question, but my answer is kept being deleted. So in short - the problem is in <project>.mdkproject\App_Resources_Merge\Android\src\main\AndroidManifest.xml. There is wrong permission. Instead of allow, there is remove permission: <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:node="remove"/>. Permission what should be used: <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
muhammad_rafay
Advisor
Advisor
0 Kudos
I believe this was intended for play store client. But I can forward this to our developer to further take a look and he can help
Radek_Uhlir
Explorer
0 Kudos
I also believe it was intended. However, I do not see any info in any documentation or SNote about this problem. In the current state, offline maps do not work in the official app for Android. I would guess, SAP tried to upload a new client version to Google Developer Console for review, but Google rejected the app because of the permission, so somebody removed the permission. It is interesting when I decompile map-release.aar (library for Esri maps in SAM), in AndroidManifest.xml are permissions READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, but not MANAGE_EXTERNAL_STORAGE. Those two permissions should have no effect for Android API level 30+.
muhammad_rafay
Advisor
Advisor
0 Kudos
You can also check the iOS app and verify if it is working as intended or similar to how Android is working
Radek_Uhlir
Explorer
0 Kudos
I do not have iOS, but I will get one and test it. On Android I tested the permission - I built my own SAM 2310 in Visual Studio Code. The problem is there too. When I changed the permission in AndroidManifest.xml, the map started working as expected.