I was looking for but I can not find what I need. I want to receive an SMS lights from turning on my keyboard touch .. I know to know when an sms arrives BroadcastReceiver joins the class .. but someone knows how to do to activate the backlight of the keyboard? Thanks in advance
The most correct answer is that this is not possible in a portable way (that works on every Android device). This is because the Android SDK does not define a standard way to control the keyboard backlighting system.
There are several answers though that exist such as this one which explains that it is possible to interact with the backlighting system using the sysfs, on some device. This appears to be done by interacting with the hardware by writing a value to a specific pseudo file, as follow :
echo 0 > /system/class/leds/keyboard-backlight/brightness
To do so, your application must have root privileges which requires your phone to be rooted. Also note that even if your phone is rooted, the above pseudo-file might not be available on every device having a backlighting system.
Related
I'm currently working on an app for this kind of device:
link. I want the user to be able to set a timer to shutdown and boot (NOT reboot) at a specific time during the week.
I did a lot of researches but I have't found the answer to my question. Everybody says that's impossible to boot using a timer since the device is supposed to be off. However, in the settings of the device, there is an option "Timer Switch Machine" which allow to do that (as describe in the link above). So I think there is a way to hack this functionality throw my app, if the device is rooted. But I don't know how to do that.
Does anyone have an idea?
This functionality is not part of the AOSP. That means first you have to gain access to the source code (or alternatively talk to someone who has access to it).
You might be able to find the corresponding code by decompiling System apps (especially the app which contains the option).
Otherwise you'd have to find a contact to the developer (probably via the manufacturer).
If you have the sources, the easiest way to hook into it is normally using xposed.
But depending on the actual implementation (e.g. if it's a shell call) there might be a better way.
I've noticed some apps allow to record what the user touch on the device (all touch events and characters being entered) globally, to be later saved in macros you can launch (meaning emulate) ?
This could really be useful for performing the same test on multiple devices and on multiple versions of apps, especially apps that have a lot of steps to check.
How do such apps do this?
Is it possible to achieve it even on non-rooted devices? Maybe by using ADB (and connected to a PC) ?
My guess about emulating the touches is that they do use ADB as shown here, but how can you record touches and keys, especially globally ?
What worked for me was to turn on SHOW TAPS in the developer settings.
I'm developing an app that will be run by an Android phone without touch screen (something like an embedded system then) and I need to make the system discoverable by other devices. As said I won't have the touchscreen, then everything should be done without user interaction.
I was reading this other question here but I can't make it work. As already said here a NullPointerException comes out.
Is there a more detailed guide for setting up the discoverability without the user confirmation? Are there other ways to do so?
Every now and then, the radio of my android phone silently dies because of some network related issues.
On the Nexus 4, it shows the empty triangle as if there where no service available in this area. On other phones it does not even do that. It looks like signal is fine.
Anyway, after the radio died silently no phone call / text message / data is going through in any direction.
The only hint I get from the System is the android.net.conn.CONNECTIVITY_CHANGE broadcast fired when the signal dies and wifi is not connected.
The only thing, that fixes the problem is restarting the phone.
Finally my question:
Does anybody know how to restart the radio completely by code?
I mean, it is a separate image running on a separate CPU. There must be a way to reboot it without rebooting the phone.
Maybe there is something, I can path into the Android ROM. I'm running CM here and be happy to patch it (again).
I tried fixing it by launching a system app by pressing *#*#4636#*#* on the dailer and stopping the radio and starting it again. But it did not help at all.
I recently made an app that checks the radio every time the connection changes. It shows a simple notification that tells me, I should reboot my phone. [1]
Issues reproduced on:
LG Nexus 4
Samsung ACE 2
multiple Apple iPhone 4*
Issues not reproduced on:
Apple iPhone 5
All phones running in the Dialog.lk network.
[1] https://github.com/felixb/network-checker
On a rooted device, one can issue the pkill command for all processes running as the user radio. I tested this on a Oneplus 3. The system seems to immediately restart the service:
pkill -u radio
Yes it is possible, but it will be difficult to perform on device without a deep understanding of the modem communications code of which multiple versions exist and even that will be dependent on if the system will permit you to even perform the communications on device.
The only one I am aware of that you can fully manipulate on device at this time is Qualcomm's (Qualcomm is standard in the majority of devices, but Samsung has used VIA in some cases which is a whole different monster, and even still another chipset or two exist), but to even be able to perform what your asking with Qualcomm's chipset, the following must be true:
The device must be rooted.
The application must have root access.
The system ROM must have the ability to place the cellular radio into modem diagnostics mode.
The device must have the appropriate permissions to permit the access.
At this point most people would connect their computer to their device and manipulate the cellular radio using QPST, CDMAWare, or QXDM. Options available to those users include everything from manipulating cellular subscriber data to restarting the cellular modem.
But, this is where things get tricky, you need to be be able to access this from the device side, which depending on the device, the operating system, and the configuration of it...may very well not be possible.
Also your application must be able to communicate with the cellular radio using the special protocol that the applications above use to do their communications which will require you becoming intimately familiar with that specification. The whitepaper for the Qualcomm diagnostics protocol is floating around on the web if you look hard enough for it.
Also on the not so cool side, if your application has access to the radio...so does any other rooted application (or even non-rooted, if you don't set the device permissions correctly) thus enabling rouge applications the ability to change your radio's configuration data potentially even bricking your device (which I have seen people do using the applications named above).
So my answer is Yes, you can do it, although:
Depending on your device you may not be able to, you should be well prepared to study and develop the needed tools to perform what you are wanting to do
No quick-start guide exist to be followed
Remember that you do so in the knowledge that your device could potentially be bricked either by a mistake in your coding or by a rouge application.
Rebooting the radio, as you have done in the device menus, may not help your problem, you may still require a device reboot
My advice is to use a much easier method and include a timer with automatic reboot in your current application, it is much safer, won't brick your device, and you won't have to become a cellular engineer to figure out how to accomplish it.
Your timer could begin counting down when the radio dies, and provide you an option to stop the reboot if your doing something important, otherwise it would restart your device and all would be ready when you reached for it to make a call or check your email.
Hopefully I was able to help, even though I know this is not the answer that you wanted.
Side note, if you could hijack Android's system configuration menus from an outside application you could potentially manipulate the radio state using the same methods used in Android...but you already discovered that restarting the radio in this method does not help your situation. Plus Android is designed to prevent such manipulation to prevent malicious applications from overtaking the UI of other apps and the system.
I want to reboot targeted phone by SMS. Is it possible? How can we implement this?
According to this Android Developers thread on Google Groups, third party applications don't have permission to reboot the device.
Your problem has two core parts. Can you reboot the phone programatically? Can you write a program to intercept incoming SMS? If you answered YES to both of your question, it is possible to do this.
I am not a Android developer but i think this should be quite possible.
take a look # Android SMS intercept without notification icon or WAP-PUSH messages and http://mobiforge.com/developing/story/sms-messaging-android
I think BroadcastReceiver is the one you are looking for.
I have no idea whether you can programatically reset the android phone using java... Someone else might answer you about that
EDIT: I guess according to the link Bill has posted, 3rd party applications are not permitted to do a reset
If you mean by having an app waiting for a specific text, then only on a rooted phone.
Ranhiru's link tells you how to get the text without it giving a text notification. If your phone isn't rooted, then programs don't have access to functions like that. If it's rooted, I can't say exactly how to do it, I haven't tried yet, but have a look for the source of apps like quickboot, a lot of them have it all publically available on code.google.com
For the record, it IS possible to intercept SMS messages on a stock Android phone - I've written a little app which pops up a Toast when I get a text rather than having to go in to the messages app.
It's NOT possible to perform a normal shutdown/reboot/??? without rooting the phone or being Google (at least, convinving the phone you're Google) but that would be a violation of the developer agreement.
In fact, you will find huge barriers in your way if you try to do anything to the OS or any other app - Which is usually a good thing