yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] Tungstwenty:
As has been discussed, there are 2 very different approaches with regards to blocking functionality from apps:

- revoking the permissions

- not revoking them but intercepting all requests to protected features (or even some that aren't protected upfront) and faking outcomes

AppSettings applies the former. It's clearly a very simple approach and that can be sufficient for some cases, but definitely not a bulletproof solution since most apps will likely FC when at least some of the calls to the system features start failing; something that devs won't worry about since they have declared the permissions in the manifest.

XPrivacy is one of the apps that will apply the second approach to a fair number of permissions, namely the ones directly related with privacy aspects.

But if you take all the permissions that aren't covered by XPrivacy, there are lots and lots of things that would need to be intercepted in order for the app to think everything is going fine.

Example - CALL_PRIVILEGED, to directly call phone numbers (if it's not already covered by XPrivacy, that is). For the app not to fail when attempting to dial a number, instead of revoking the permission and have the invocation throw an exception which might not be captured, a mod would have to hook the original function that dials the numbers, check if the app has been configured not to be granted access, and if not return something like "number busy" (or whatever) so that the app thinks it worked, apart from the fact that at that precise moment the call could not be established.

Take this example and multiply by 10, 100, 500 to cover all existing permissions, and you can see why revoking is the "simple" approach.

Implementing the second approach for everything you'll want to restrict is overkill for any individual mod.

App Settings won't be modified to fake data instead of revoking permissions.

What you can try doing is checking which protections are already covered by XPrivacy (and [MENTION=2799345]M66B[/MENTION] has stressed multiple times that he won't add anything that is not privacy-related, even if the mechanisms would be the same), or by some other modules that cover other aspects of permissions you might want to protect.
[Xposed Framework Modules] Tungstwenty:
I'll investigate both of these and will report back.

The second one is very likely to be an easy fit, as several or the existing tweaks are achieved precisely by forcing or preventing FLAG_... values from activities :)
[Xposed Framework Modules] Tungstwenty:
You mean adding an additional entry on the list of possible screen resolutions?

Can you give me an example of an app that bundles different layouts/etc. and has modifiers targeting this specific combination, to see if it's really needed or if e.g. 800x1280 (the size immediately above) is what you'll need in those cases?

I don't think it's possible to control the load of resources depending on which window / activity is being displayed, as it's done system wide. [MENTION=4419114]rovo89[/MENTION], do you have any insight on this?
[Xposed Framework Modules] Tungstwenty:
Same answer as the previous one - I'm not sure if it's possible to control what resources are loaded based on the orientation. AFAIK everything is loaded (or at least selected) upfront, and then different entries are used based on the orientation.

Again, perhaps [MENTION=4419114]rovo89[/MENTION] can shed some light if this is not entirely correct.
[Xposed Framework Modules] frogworth:
Hi there,

Would it be possible to change the keyboard layout used by a particular app?

Specifically, Hangouts (and some other Gapps) replaces the Enter key with a Smiley key, which drives me bananas ;) It's the requested keyboard, and as well as the standard keyboard, Swype honours this setting (although TouchPal and others don't).

So, I believe this is a per-app setting which, if changed, would cause the Enter key to just be normal regardless of what keyboard I'm using!

Thanks.
[Xposed Framework Modules] rovo89:
Widgets (and notifications and probably other things) use RemoteViews. Which means that not the app which provides the widget (let's call it "provider") renders the layout, but the app which displays it (let's call it "host"). A RemoteView isn't even a View, it's a list of actions to be performed. The provider does its actions on the RemoteView, they are recorded and sent to the host which executes them. For this, it needs to retrieve the provider's resources. At this point, App Settings can intercept.

The current implementation is: Take all display related settings from the host, except for the language. Why? Because even if you use a higher DPI for a widget, there won't be magically more space to display the content. This looks pretty bad for fixed layouts because content is cut off.

It's similar for notifications. If you modify either the SystemUI DPI (I do) or the provider app's DPI, the notifications don't fit in, they are either too small or too large. And finally, we can't modify the main DPI settings for the app at this point, only those for the resources. A mismatch between these two can have strange effects.

As far as I can see, the configuration which is set by Resources.updateConfiguration() is evaluated at the time a resource is actually loaded. It shouldn't matter though, we can check the actually orientation in the updateConfiguration() hook and load other settings based on it. Simple experiment:

if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE)
dpi = dpi * 2;

However, this will affect only resources that are reloaded afterwards, e.g. it works only if the view is recreated from scratch. That is not necessarily the case, so you might end up with a mix.

And just to be clear as the question was about tablet mode (which I consider a buzzword): This will obviously only affect content displayed by the app itself (if it supports it), it will not change the position of the notification area and things like that.
[Xposed Framework Modules] Doublewise:
I hope this will possible to implement in the near future -)

And about insistent notification, I think it's quite annoying active every second and maybe draining battery. How about option to add some delay eg active every 2 minutes (without waking up display)?
[Xposed Framework Modules] egingell:
A side effect that cannot be corrected.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] killoid:
[MENTION=4322181]Tungstwenty[/MENTION] [MENTION=4419114]rovo89[/MENTION] an option to lock each app with pin or pattern lock like android tuner will be great!
[Xposed Framework Modules] rovo89:
At least not at the moment, maybe later.

Sorry, but I believe this is out of scope for App Settings. It's also not "relatively easy to implement" - one of the criteria Tungstwenty mentioned in the OP for new features. And as you say Android Tuner has such a feature, why not use it?
[Xposed Framework Modules] petrochemicals:
I found an article that talks about fixing the volume key immersive mode bug. Don't know if this is any help.
[Xposed Framework Modules] Proud2bNoob:
Great app. I wanted to ask if it would be possible to add a setting to restrict apps/games from playing any sounds since many don't have an option to turn off music or sounds.

Also, I searched but could find an answer to one of the first questions asked in this thread relating to screen brightness on a per app level. That would be really useful, since some apps have bright white backgrounds. I use slimkat's TRDS so when a black background switches to white it can be surprising.

Thanks and keep up the great work
[Xposed Framework Modules] GermainZ:
I believe both are out of the scope of this module, for the reasons explained here.
[Xposed Framework Modules] garyd9:
per-app volume settings? That might be useful...

Is it possible to, in a generic way, alter the volume of only a single application? I've barely scratched the surface of android audio support, but I think all audio pipes into a "MediaPlayer" object.

Could AppSettings hook MediaPlayer.start(), somehow examine the object's context to determine the app name, and then inject calls to MediaPlayer::setVolume()?

Using MediaPlayer::setVolume() should keep everything specific to the one app instance (and not change the global stream volume.)

setVolume() takes a floating point between 0.0 and 1.0 as an absolute (not offset), so I wonder how appSettings would be able to get the current "volume" level before changing it... (as I'm assuming the app setting would be to offset volume louder or softer, not an absolute change.)

If it can be done as a MediaPlayer hook, I don't think it would be a system level change. I'll play with this some (perhaps this weekend.)
[Xposed Framework Modules] egingell:
Out of scope. Not can't be done.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] garyd9:
Why is it out of scope to have a per-app volume change? While it's ultimately the decision of the app authors, and not those of us actually debating it, the only scope related statement I've seen (as linked above) is:

I'm suggesting that volume might be able to be configured at a specific app (context) level. If it was only doable at a system level, then I'd certainly agree that it'd be out of scope. However, I think that a "MediaPlayer" object is created by an app and ceases to exist when the app terminates. Any setting changes done to that media player is tied ONLY to that media player -- in the same way that window flags are specific to a single window.

If the scope of "AppSettings" includes app specific visual items, and app specific permission items, then why not also app specific audio items?
[Xposed Framework Modules] egingell:
Don't all me. I'm not the dev nor the one who said it was out of scope.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] GermainZ:
Out of scope for reasons that don't apply to garyd9's method if it works, though. :P
[Xposed Framework Modules] egingell:
Perhaps...

As to the actual functionality, I'd be a little concerned about having the volume changed back... or not changed back. Methods that run when an activity finishes are unreliable.

On the other hand, if it's just the media volume (not ringer or notification), it may not be an issue.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] Phylon2012:
AppSettings bug report

I would like to report a little bug (probably). I have used AppSettings to change the language setting for XPrivacy. Unfortunately the change does not seem to be complete. All menus do change to the new language, but the reported time of use of a permission (detailed app view) is still displayed according to the global android setting. XPrivacy's developer M66B told me that he thinks this is definitively not an XPrivacy bug. The android function used in that context is DateUtils.getRelativeTimeSpanString().

Unfortunately this is all I know at this time.
[Xposed Framework Modules] egingell:
The only thing this app does in that regard is run the app as if it were that language. It doesn't touch the system date format. Now if the date format were in the strings resource of the app, then it would be a different story.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] Phylon2012:
Thanks, so if I understand correctly, only strings defined within the app will change to the corresponding language.
[Xposed Framework Modules] egingell:
Right.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] Proud2bNoob:
While I agree that the brightness is solely a system setting, I can't imagine that the same goes for the volume. I'm not necessarily asking for a volume slider for each app ( although that would be great) but more for a checkbox: is this app able to output sound or not? I have no real idea how this part of Android is built, but I have a hard time believing that it doesn't work.

Thanks to anyone willing to check this out
[Xposed Framework Modules] luzfero:
Feature request: per app intents. Allows you to choose the default app launched per app.

For example, if I open a video on chrome, it opens mx player. If I open a video in showbox, it opens allcast.
[Xposed Framework Modules] Tungstwenty:
Actually, I have looked at this in the past exactly for this use case - checkbox on each app in order to mute it or not.

After some investigation, I also ended up on MediaPlayer.java, and my idea was not merely to change the volume, but rather avoid the start() call altogether so that the device won't stay awake "playing" the music of a game at 0 volume even after you turn the screen off.

Additional logic is required for when the media being played is actually a Video - either set the volume to 0, or manipulate the preparation of the media so that only the video part is considered but not the audio stream.

I ended up coming across a problem, which was the fact that the native calls (e.g. prepare, setAudioStreamType) weren't captured by Xposed.

More recently, [MENTION=4419114]rovo89[/MENTION] mentioned that this might be due to the native calls being registered after the xposed hooks were installed, replacing them with the original jni code. Which means it should be solvable.

So, in theory, it should be possible to add a mute option for each app and have it intercept the MediaPlayer logic (which runs in the context of each app).

The bad news is that I don't think this will be enough for most games, which use engines such as Unity and others and that implement sound (and many other things) in native libraries.

Media is managed like most other stuff in Android - with a service running under the system_process, and client code running on each app which communicates with the former.

The thing is that the "media.player" service is implemented purely in native code, in MediaPlayerService.cpp. This makes it impossible to intercept the service logic using Xposed.

On the client side, many apps will use MediaPlayer.java, which is probably hookable as I mentioned above, but many others (some games, in particular) are very likely to use the client native code (mediaplayer.cpp) which is also not possible to be hooked by Xposed.

[MENTION=336863]garyd9[/MENTION] and others - any thoughts on this?
[Xposed Framework Modules] garyd9:
I hadn't considered the direct binary issue. When I get some time this weekend, I'll play around with it.
[Xposed Framework Modules] kcl0801:
hi, is there anyway to use the language not include in system ? (it's just hide from setting, but when i use some locale change tool, it can show the language correctly, not just replaced by english)

for example, i'm not a native english speaker so i'm not using english as my system language, but i want to use the english(usa) version for google now, and i use this module to change the language as english, its' successed because english is list in my system language setting

but when i want to choose to another language not on the list, like japanese, even i use the locale change tool, this module still can't detect the japanese

so i am wonder is there any chance to make this app's locale setting support the real locale change setting?
[Xposed Framework Modules] Tungstwenty:
All that's missing for this to be possible is a proper UI to deal with the additional possibilities.

Since it's not a trivial change, I suggest that for the situations where you need this you customize with a different language, and then edit the /data/data/de.robv.android.xposed.mods.appsettings/shared_prefs/ModSettings.xml file to set the language you want.

You'll need to edit the "<package_name>/locale" entry and set to one of the expected values "xx_yy", according to the description found here. Note that you should use an underscore "_" instead of a dash "-".

After saving the file, you just need to make sure you kill the running app and it should be effective the next time it starts, without needing to reboot the phone.
[Xposed Framework Modules] kcl0801:
thanks, i will try it! seems like not very difficult to do it
[Xposed Framework Modules] baastien:
Grave digging

Brilliant man !

I can now trigger different DPI profiles with tasker in modifying this file.

Thanks a lot.

It would be more comfortable if there were some direct bridges between app settings and tasker, but this workaround works.
[Xposed Framework Modules] Tungstwenty:
Muting is now working fine.

I have written some code that successfully avoids starting audio-only streams, and that sets the volume to 0 when video is involved (e.g.: Youtube)

However, as expected, it doesn't always work. Plants vs Zombies is one such case.
[Xposed Framework Modules] rovo89:
Thanks, it's very similar to the approach I took: https://github.com/rovo89/XposedAppSettings/commit/c8d9a55ba208b5d49477ba05dbab0fef69988910
[Xposed Framework Modules] petrochemicals:
Awesome, is there a time frame for when this fix will reach the users in an update?
[Xposed Framework Modules] egingell:
December 15, 2157.

... Don't ask for ETAs.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] petrochemicals:
Oh, I am sorry I must have missed the post where it was stated that this is your thread and your app and you get to tell others what to do. Honestly you are the kind of person that makes using XDA insufferable. I suppose that's what I get for trying to help out and ask a follow up question.
[Xposed Framework Modules] egingell:
I hope that attitude serves you well in life.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] Pkt_Lnt:
You really should read this.
[Xposed Framework Modules] petrochemicals:
Hmm, you do realize that you and egingell are breaking the same rule by trying to tell me how I should behave on what is neither your site nor your thread. So please explain to me why I should be listening to two people who have not only zero authority but are also hypocrites who break the very same rules of this site?

Neither one of you could muster up the courtesy to be polite in your interactions and instead choose to dictate what my behavior should be all the while ignoring this sites rules. So I would like to ask, what gives you the right? Who are you that somehow you feel that it is not only your place to enforce the rules but that you are also exempt of the very rules you are accusing me of breaking?

To everyone else, I am sorry for being off topic but it just becomes too much when these people creep out of the woodwork to tell everyone else what to do. I really cannot understand what drives some people to behave like this. This is the kind of behavior that makes XDA an unfriendly place to be and all for what, so some overly active members can feel superior telling others how to behave in threads that aren't even theirs? If either one of these people were interested in keeping this thread on topic then they could have easily reported my comment to the mods without making a single off topic post. Heck, they could have just as easily PM'd me and saved themselves from breaking the rules. Either option would have been a better solution, but of course that obviously is not their agenda as it's difficult to make yourself look superior when everyone else can not see it.
[Xposed Framework Modules] garyd9:
I need to apologize - my wife has been sick this weekend, and I had ZERO time to look into this. In fact, I'm relieved that the work week has started back up, as it'll give me time to catch up on XDA threads. ;)

Thank you for NOT asking me for ETA's, or I'd probably get annoyed and just work on something else in my free time. :laugh:
[Xposed Framework Modules] Tungstwenty:
Let me know if you find anything else.

As I mentioned before, I have code already in place for a "mute sounds" option that works for all apps using MediaPlayer. If there's no video, the start() call is ignored altogether. If there's video, the volume is set to 0 so the video still plays but with no sound.

As soon as I have some time, I'm going to grab all pending changes (this, immersive, and a couple others). If in the meantime you find something else, please let me know. Otherwise it can always be added in another update afterwards.
[Xposed Framework Modules] Grimmy1st:
Hi. First of all Thanks for the Module!

Does anyone know how to force messages app while using Swype to stay in portrait mode? When Swype is active it doesn't stay in portrait mode... Enabled this orientation setting in BOTH apps and saved. Newest xposed installed and working. Lg g2, stock(mod) Rom (JB), stock kernel. Thx!
[Xposed Framework Modules] johnhelliwell:
Hoping someone can help me with this excellent app. I'd like to change the resolution of my contacts to 800 * 1280 as the layout is much nicer. Contacts works fine when I do this, I can view the contacts nicely. However when I use the dialler / phone I get a message saying "unfortunatelty contacts has stopped" and its exist back to the home screen. The contact app continues to work ok though, just the phone / dialler no longer works. Other apps also ave their DPI and resolution changed without issue, it's just these two that seem to have a problem. If it makes any odds I'm using a THL T200 which has a 6 inch screen.
[Xposed Framework Modules] joselovegym:
Could someone explain how to reduce the navbar? I tried but did not work for me. Regards
[Xposed Framework Modules] lantern153:
suggestion

Hey, so im new on here - I dont even know if im replying in the right place.. but anyway I have a suggestion that would make your app so much better for people like me.

What if you implemented a way to batch apply certain settings to all app or selected app? Like for example, if I want a certain 26 of my apps to not have permission to my camera, the only way to do that right now is individually choose to revoke the permission for camera
[Xposed Framework Modules] Digdis:
First of all, I really love this module very useful and functional.

Got a question (couldn't find it while searching): Is it possible to add setting that keeps the app off the recent task lists? There are some apps that operate in a "stealth mode", doing this by themselves, but others don't. Is this possible?

Cheers,

D.
[Xposed Framework Modules] krzee:
can i use this to set a temporary mute on an app?

basically i want to be able to set an app to not make noise for a day, and then have it go back to normal after 24h
[Xposed Framework Modules] natezire71:
Tasker.
[Xposed Framework Modules] Tungstwenty:
[MENTION=4775688]GermainZ[/MENTION] was kind enough to implement this feature. I have already merged it into the code, it will be available in the next update (soon).
[Xposed Framework Modules] Digdis:
Great to hear! I think many people would love this feature. :good:

Cheers for the great work.
[Xposed Framework Modules] rovo89:
It might be part of SystemUI or Android System... but changing their DPI will have side-effects.

That's probably the most requested feature. However, it would require a complete rewrite and extension of the UI. I don't have the time to do that and I think Tungstwenty is busy as well.

You're really better off using an app like Tasker. App Settings doesn't have things like condition-based settings and probably won't ever have. Especially because every change of settings requires a restart of the app to become effective.
[Xposed Framework Modules] LifeAsADroid:
Just found out about this app, was playing around, looked at the first page of posts, some of the posts throughout (there's 51 pages of them!), so forgive me if my question is a broken record.

Would it be possible to use the "fullscreen" mode but still allow the pull down notification menu to function? Ideally I'd like to rid as many screens of the status bar as possible (including homescreen but don't think that one is possible with this app) while allowing the pull down notification menu to still be functional to keep a cleaner look on every screen.
[Xposed Framework Modules] egingell:
Smart Statusbar+ will do just that. It is not an Xposed module.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9