FORUMS

Phone Profile (Plus)

1,449 posts
Thanks Meter: 457
 
By snovvman, Senior Member on 4th June 2018, 01:08 AM
Post Reply Email Thread
19th June 2020, 10:56 AM |#31  
Junior Member
Thanks Meter: 2
 
More
Hello,
I have a problem to auto change the media volume when the app runs in background (it's like ignoring the media volume settings only). It's surely runs in the background (has all permission, requested and the battery optimizer let it run in the background), since it can change the ring volume according to the profiles.
Also when the app runs in the foreground, no problem to change the media volume according to the profiles.
The phone is a stock realme RMX1993 with Android 10.

Thnx for any help
19th June 2020, 04:23 PM |#32  
Member
Flag Bratislava
Thanks Meter: 5
 
Donate to Me
More
PPP version is? If 4.1.9, is "Mute sound" unchecked in profile?
How is configured media volume level in profile?
19th June 2020, 09:40 PM |#33  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by henrichg

PPP version is? If 4.1.9, is "Mute sound" unchecked in profile?
How is configured media volume level in profile?

PPP version: 4.1.9 (6040), Muted Sound is off.
I have several profiles and all is dealing with ring volume, bluetooth call volume and media volume only (since the notification volume is linked with ringtone volume). All other volumes are in "do not change"
For example the car profile sets the media volume to max 16/16, then the home profile to 6/16, etc.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2020-06-19-22-35-31-65_37e7242fe47ab403ba179183350823b1.jpg
Views:	88
Size:	130.7 KB
ID:	5043863  
19th June 2020, 09:49 PM |#34  
Member
Flag Bratislava
Thanks Meter: 5
 
Donate to Me
More
For media volume may be problem max. volume. For some devices is required to allow it or SecurityException will be thrown. And this requires permisison WRITE_SECURE_SETTINGS.
Grant it. How to grant it, is displayed in "Important information" for G1 profile parameters.
20th June 2020, 09:30 PM |#35  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by henrichg

For media volume may be problem max. volume. For some devices is required to allow it or SecurityException will be thrown. And this requires permisison WRITE_SECURE_SETTINGS.
Grant it. How to grant it, is displayed in "Important information" for G1 profile parameters.

From cmd:
adb shell pm grant sk.henrichg.phoneprofilesplus android.permission.WRITE_SECURE_SETTINGS
Security exception: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:1 960)
at android.app.ContextImpl.enforceCallingOrSelfPermis sion(ContextImpl.java:1988)
at com.android.server.pm.permission.PermissionManager Service.grantRuntimePermission(PermissionManagerSe rvice.java:2153)
at com.android.server.pm.permission.PermissionManager Service.access$900(PermissionManagerService.java:1 30)
at com.android.server.pm.permission.PermissionManager Service$PermissionManagerServiceInternalImpl.grant RuntimePermission(PermissionManagerService.java:31 90)
at com.android.server.pm.PackageManagerService.grantR untimePermission(PackageManagerService.java:6625)
at com.android.server.pm.PackageManagerShellCommand.r unGrantRevokePermission(PackageManagerShellCommand .java:2015)
at com.android.server.pm.PackageManagerShellCommand.o nCommand(PackageManagerShellCommand.java:234)
at android.os.ShellCommand.exec(ShellCommand.java:104 )
at com.android.server.pm.PackageManagerService.onShel lCommand(PackageManagerService.java:23916)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.content.pm.IPackageManager$Stub.onTransact (IPackageManager.java:5100)
at com.android.server.pm.PackageManagerService.onTran sact(PackageManagerService.java:4797)
at com.android.server.pm.OppoPackageManagerService.on Transact(OppoPackageManagerService.java:83)
at android.os.Binder.execTransactInternal(Binder.java :1021)
at android.os.Binder.execTransact(Binder.java:994)

But I'm afraid, the problem still the same. When runs in background it's unable to change the media volume (to whatever level. I've tried 0-16 all possible level....doesn't matter). As I mentioned it doesn't have any issue to change the ringer volume. That's working like charm.
20th June 2020, 10:08 PM |#36  
Member
Flag Bratislava
Thanks Meter: 5
 
Donate to Me
More
I'm tested it and working good change of media volume. Tested in Galaxy S10.
PPP uses, for change media volume, standard Android SDK method.

Change of this volume not working when profile is activated manually?
Because this volume is changed only when profile gets activated. Not during unlink ringing and notification volumes (when it is enabled in PPP Settings).

Or maybe another application change this volume back. Because is possible also registering listener for get alll volume changes and call from it it's own code.

Your problem with granting permission: This must by problem with your device. Not any user write me this problem. Only you.
20th June 2020, 10:49 PM |#37  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by henrichg

I'm tested it and working good change of media volume. Tested in Galaxy S10.
PPP uses, for change media volume, standard Android SDK method.

Change of this volume not working when profile is activated manually?
Because this volume is changed only when profile gets activated. Not during unlink ringing and notification volumes (when it is enabled in PPP Settings).

Or maybe another application change this volume back. Because is possible also registering listener for get alll volume changes and call from it it's own code.

Your problem with granting permission: This must by problem with your device. Not any user write me this problem. Only you.

When activating manually, it works (changes the media volume).
Also doesn't matter whether the notification and ringer volume is linked or not.
20th June 2020, 10:58 PM |#38  
Member
Flag Bratislava
Thanks Meter: 5
 
Donate to Me
More
Ok. manual profile activation working good. Then it not working for activation from event? Maybe another profile was activated. Or event not working. You can looking at "Activity log", what was started and activated.
Unlink volumes: In device Settings. Exists volume for ringing and notification separately? If not, then your device has merged these volumes. This is defult to Android AOSP Android has also merged these volumes. In may S10, are volumes separated.
Is in PPP enabled unlink? Look at PPP Settings/System.
23rd June 2020, 08:32 AM |#39  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by henrichg

Ok. manual profile activation working good. Then it not working for activation from event? Maybe another profile was activated. Or event not working. You can looking at "Activity log", what was started and activated.
Unlink volumes: In device Settings. Exists volume for ringing and notification separately? If not, then your device has merged these volumes. This is defult to Android AOSP Android has also merged these volumes. In may S10, are volumes separated.
Is in PPP enabled unlink? Look at PPP Settings/System.

I've tried with and without unlink and doesn't matter. Same result.
Please find a screen capture about this issue. In the forst part I'm running PPP in foreground with split screen, and it's working fine. Manual activation of profiles, or switching the wifi on/off (automatically activating the home/outdoor profiles). In the second half PPP runs in background and viola, no change in media volume.
https://drive.google.com/file/d/1DU1...ew?usp=sharing

BTW I know this is the fault of the phone not the app, but appreciate any help to find where and why.
23rd June 2020, 11:45 AM |#40  
Member
Flag Bratislava
Thanks Meter: 5
 
Donate to Me
More
Quote:
Originally Posted by sutotok

I've tried with and without unlink and doesn't matter. Same result.
Please find a screen capture about this issue. In the forst part I'm running PPP in foreground with split screen, and it's working fine. Manual activation of profiles, or switching the wifi on/off (automatically activating the home/outdoor profiles). In the second half PPP runs in background and viola, no change in media volume.
https://drive.google.com/file/d/1DU1...ew?usp=sharing

BTW I know this is the fault of the phone not the app, but appreciate any help to find where and why.

Write me device name. Maybe problem is in change of media volume in background. You are only one user, who write me this problem.
I can adding logging to file, about this, but this require, from you, install of test version.
24th June 2020, 10:02 AM |#41  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by henrichg

Write me device name. Maybe problem is in change of media volume in background. You are only one user, who write me this problem.
I can adding logging to file, about this, but this require, from you, install of test version.

The device is a Realme RMX1993
Build number RMX1993EX_11_c.04
kernel 4.14.117
ColorOS v7
Android version 10

I'm fine with installing a test version. Just curious why it blocks the media volume change, but since it's a stock ROM, I can't use catlog or matlog.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes