[Q] Forcing locale for a specific application - Android Software Development

Hi,
I'm trying to figure out a way to force a specific locale for an application. I like to use my applications in their "native langage" so my system is in english. But for many applications, it would be better for me to be able to run them in french. For exemple, Google goggle doesnt not recognize frnech text when it's set in english...
I guess the app would probably need to have access to root privilege. But I dont know the Android API enough yet. Is there anyone here that have an idea if it's even possible ? I dont want to spend countless hours looking for a solution if anyone here can tell me it's impossible or if someone can put me on the track.
Thank you
HTC Desire CM7

If you add different layout folders to your app(layout-es, values-fr) they will be loaded according to the phone's locale.
here is the documentation: http://developer.android.com/guide/topics/resources/localization.html

also if this is for programs that you dont have access to the source then you could mess around with "Allow Mock Locations" in cm7. havent had a reason to try it so i dont know if this would be your answer but its worth a look. and im not sure if its exclusive to cm7.
Settings -> Applications -> Development -> Allow Mock Locations

Do you want to force locale on your own app (by creating an option where the user can change locale), or on some already existing apps that don't have such an option ?
If I understand correctly, you want to achieve the former. I would guess there's an application for this. Try "More locale". AFAIK it only changes the whole system's locale, but I didn't try it myself. Maybe it can change locale for specific apps.

Related

Tasker Question.

I believe that by using Tasker, we can set up multiple task executions ata set time or situation. I haven't tried it myself but I'm planning to now. I just need some info on how to make it work. Most importantly, if it can do THIS:
LEGEND:
A = An App
B = Titanium Backup
C = Another app
IF - LAUNCH - A - THEN - LAUNCH - B - COMMAND - B - FREEZE - C.
In simple terms, is it possible to have Tasker run Titanium Backup and freeze an app whenever a designated app is launched? Basically, launching a specified app will 'trigger' Titanium Backup to be launched and freeze another app.
I hope I'm not confusing anyone.
Thanks, XDA! I'm so proud to be a part of this community.
It looks like you might be able to. I'm unfamiliar with tasker... But the dev does have something of a user manual on the site. You may want to start there.
http://tasker.dinglisch.net/userguide/en/index.html
Tried tinkering around. Couldn't get anywhere with this. Is there an existing guide somewhere in these forums that I might have missed? Can anyone please point me at the right direction? :'(
Well, I'm fairly new to Tasker myself, but there's no easy "tap, tap, scroll, tap, done" way to do it as far as I can tell. Post #3 here gives a suggested way forward (same question as yours only with a time context instead of an app) but it is quite technical and certainly beyond my understanding at this point.
Otherwise you could ask on the Tasker forum. The developer seems to answer most threads, even if only to say something's not possible.
Can I ask why you need to freeze an app on the fly like that? Maybe if you explain it a little, there could be a workaround.
selection16 said:
Well, I'm fairly new to Tasker myself, but there's no easy "tap, tap, scroll, tap, done" way to do it as far as I can tell. Post #3 here gives a suggested way forward (same question as yours only with a time context instead of an app) but it is quite technical and certainly beyond my understanding at this point.
Otherwise you could ask on the Tasker forum. The developer seems to answer most threads, even if only to say something's not possible.
Can I ask why you need to freeze an app on the fly like that? Maybe if you explain it a little, there could be a workaround.
Click to expand...
Click to collapse
Well I found out that one of my apps doesn't work when the other app is installed or active. I really liked the app in question, so I made an experiment to freeze all apps until I found the culprit. I did found it. That's why I'm trying to check if it can be achieved.
Have you tried just killing the app?
Context: Application > App A
Task: App > Kill App > App C (and most likely check "Use Root")
You may want to add an exit task to restart App C after you're done with App A.
If it works, that would stop it running in the background. The problem is that Android 2.2 and upwards have changes to stop an app being able to kill another app. It's inconsistent though - I've tested it on about 6 apps and it has worked on 2, so it's maybe worth a shot if you haven't tried.
If you or anyone else is still interested, this is easy to do. Just use the Secure Settings plugin, specifically it's Package Manager option, and disable or enable to have the same effect as freeze/unfreeze. TB isn't required.
selection16 said:
If you or anyone else is still interested, this is easy to do. Just use the Secure Settings plugin, specifically it's Package Manager option, and disable or enable to have the same effect as freeze/unfreeze. TB isn't required.
Click to expand...
Click to collapse
Thank you very much!!!
I downloaded the sample tasker app that expires in 7 days from their website and installed it. I can run tasker, enter code and save, and the icon shows it as running when I quit out to test my code. I can't get anything to work using code examples from the wiki for simple items such as action at preset time. I am running CyanogenMod 7.2.0 is this causing my problem?

[Q] How can i set/change Global Settings like Airplane Mode on/off

Hi XDA,
I'm in development of a widget app and want to provide several functions like toggle Airplane Mode, Data Roaming, GPS etc.
As of API Level 17 Airplane Mode and Data Roaming have been moved to protected Settings.Global* and i dont know how i can provide my users this functionality.
I heard of some permission "WRITE_SECURE_SETTINGS" but appearently this is not the problems solution yet. Is it? - didnt work in Emulator
Has anyone experience in this and can explain me how i can i provide these functions, which seem to be protected?
Thanks,
Wambo92
* I'm not allowed to link outside, but this is what i wanted to link to:
developer.android.com/reference/android/provider/Settings.Global.html
Settings.Global is read-only. The only way that special permission will work is if you build the OS yourself.
New Global Settings
The system settings have been updated to support multiple users with the addition of Settings.Global. This collection of settings is similar to Settings.Secure settings because they are read-only, but applies globally across all user spaces on the device.
Several existing settings were relocated here from either Settings.System or Settings.Secure. If your app is currently making changes to settings previously defined in Settings.System (such as AIRPLANE_MODE_ON), then you should expect that doing so will no longer work on a device running Android 4.2 or higher if those settings were moved to Settings.Global. You can continue to read settings that are in Settings.Global, but because the settings are no longer considered safe for apps to change, attempting to do so will fail silently and the system will write a warning to the system log when running your app on Android 4.2 or higher.
Click to expand...
Click to collapse
zalez said:
Settings.Global is read-only. The only way that special permission will work is if you build the OS yourself.
Click to expand...
Click to collapse
Okay, so I'm just going to link to the settings and display the state whether its on or off in API Level 17 or higher in my widgets.
Anyway, i don't like googles decision to strictly restrict developers changing these settings.

[Q] Virus or Android now Untamed?

Hello Good People of XDA
I have been a i9506 owner for quite long, had a 9100 before,
I am used to root and mess with apps to customize things to my wim,
at the best of my knowledge (I lack android programming skills, but I can do things with terminal and filesystems).
All that before to say I am not totally a noob, but my lack of technical knowledge might bite me there.
System wise, I am under 4.2.2, rooted, unknow sources are not allowed, system check for apps is allowed,
I have an antivirus (more than one, but only one works each day, just to be sure I don't miss things)...
My problem is that I recently found out that some apps, actually system apps, blocked
with Titanium backup, or with gemini app manager, or app quarantine,
were actually running anyway.
They are marked as blocked in my app manager, but can still be force closed,
and they appear in battery displays (most of these under the android system block, in the list of services/apps used),
and in process running when using Ccleaner apps.
Also, my battery display show GPS is activated, while when I go into options, all boxes are off or unticked.
I thus wonder what's happening?
How is it possible to have these schrödinger apps tamed and blocked like I want them.
I want these to shut down and only work when I DO ALLOW these, for them not to suck my battery or do unauthorized chores like tracking me when I don't want.
How is it possible that they even behave like that? In i9100, I never observed that in Android 4.0.
I wonder if Google didn't change the workings for making us unable to disactivate what we don't want to work, which was pissing them off.
They already change the permissions displays in the market so permissions as intrusive as "contacts/sms message/USB stockage" are considered "not relevant/important",
while they are depending on the announced display of the app.
But I don't want to go on the "conspiracy route" (I am not like that, I am a pragmatist and I just observe facts, like these apps, with sensitive access, not being able to be deactivated), so let's focus on the technical part:
such apps were Maps, Samsung sync adapters, NFC service , Google Agenda/Contact synchronisation, sysscope, context provider, etc.
That's a lots of things that are supposed to communicate to cloud or other devices, with feels lot like a gaping flaw in the armor...
I want a phone and a tool, not something that track me or put me at risk of being stolen by somebody with technical knowledge.
Am I alone?
Thanks for any insights.
Blocked apps still working
I don't know if my title was too unclear, so I would like to change the title but am unable to do so?
Is it please possible for a moderator to do it (with the title of this post)?
Thanks by advance.
I feel like it is a true problem not being able to block some apps,
or even more, to believe they are blocked while they perfectly perform in the background,
and display activity only in secondary reports, not under their respective "buttons"/information tabs.
I wonder abourt the technical reason to such behavior.
Then delete those apps or block some of the permissions with an app (eg Privacyguard).
It's my opinion that an antivirus app (at the moment) is a waste of resources. Just think before you install something. Also if you are worried about security, you should always run the latest version of Android. 4.2.2 is an old version.
Lennyz1988 said:
Then delete those apps or block some of the permissions with an app (eg Privacyguard).
It's my opinion that an antivirus app (at the moment) is a waste of resources. Just think before you install something. Also if you are worried about security, you should always run the latest version of Android. 4.2.2 is an old version.
Click to expand...
Click to collapse
Thanks for your answer.
Well I don't want to delete system app when they might be useful at time.
I just want them to behave correctly, that is, not work when they are blocked.
That is not a solution to say "uninstall this", while the true problem is Android general behavior here.
I didn't installed system apps, they came with the thing, and all of them are not bloatware.
"NFC service" is something I want to keep for when I am ready to use it,
but I don't want to let it free and unleashed because of the opening it leaves on my phone.
Same goes for bluetooth, synced backups and so on.
I don't want backups on the cloud, so I deactivated the options, and blocked the apps.
Why are they running? It is not normal!
And my old version is maybe not secure, but actually trying 4.3 hasn't changed anything,
and I only suspect this to be some "new feature".
The antivirus is a waste for scans, I agree, still it has useful firewall features that justifies in itself its uses.

Project My Screen

Hello,
I want to disable the confirmation for the application "Project My Screen" that asking you "Allow screen projection?"
I need it for testing purposes.
How can we make it possible?
I thought about different possibilities :
- changing a registry value (if one is existing for that purpose)
- making a native application to auto accept
- edit the ROM to disable it.
If you have any suggestions I'm open for it.
Thanks in advance,
Best regards
First, grab the app and reflect it ("disassemble" i.e. recover sources - if it's possible of course and app isn't native). Later you may recompile or modify binary code, and replace installed app.
P.S. Of course you need a "interop" (or caps) unlocked handset for that.
I dont think that would be possible.
Because of security/safety. issues
This project my screen app does not only work with USb but also on remote ( if i am not mistaken ).
When someone can kill this notification on someboddies Phone without noticing it, you got a hell of a opertunity to monitor that Phone.
Nice to check out the kids/wife/husband/friend whatever....

Missing: 'Services' under Android Accessibility settings?

Recently I installed an app that required me to enable a service in the "Android Accessibility settings". I then realized that on my JYHU the entire SERVICES (I am capitalizing SERVICES because it is capitalized in Android) menu is missing under Settings->Accessibility, only SYSTEM is there. Typically under Settings->Accessibility there is SERVICES such as Talkback, etc.
Can anyone check under Settings->Accessibility and tell me what sub-sections there are (i.e. SERVICES, SYSTEM)?
I am wondering if we have a crippled Android ROM where apps cannot add SERVICES, they are [intentionally] hidden somehow or if there is an app that is hiding them.
This is really hurting me as I cannot make certain apps behave properly without the accessibility settings.
I read in another thread that manufacturers (allegedly) do this sometimes on purpose (I think it was the Nook tablet).
http://forum.xda-developers.com/show....php?t=1400615
I am going to post this in more than one thread because it is Android related but I am dealing with it only my JYHU (my Nexus 7 does not have this issue).
I have exactly the same problem with DOOGEE F3 Pro with Lollipop 5.1
Really frustrating
Have you tried this app https://play.google.com/store/apps/details?id=com.kasitskyi.hiddensettings
Some vendors hide certain settings options which the app might be able to access. Worth a try but no guarantees.
Sent from my GT-P5110 using Tapatalk
Yep, have tried..there is no option for such an setting
Anyhow-thank you for advice.

Categories

Resources