I have built an app that changes users wallpaper on a timer. I use the standard WallpaperManager.setWallpaper function, and things work great on AOSP-based devices.
However, on some OEM platforms like TouchWiz, it doesn't work for the lock screen (it only sets the launcher wallpaper). Is it possible to fix this? I'm willing to use reflection to access OEM APIs if there is a place to start.
Thanks!
Related
I want my music widget to be shown on the screen in a similar way that RemoteControlClient works. I don't want the users to be needed to have the widget added to the lock screen beforehand. The samsung music app on thier 4.2 devices have this behaviour.
AFAIK, this isn't possible in the public SDK. Samsung's apps may be able to do it on their device because they are developed by Samsung for their own devices and have greater access as preinstalled system apps.
No API that I am aware of does this as of now.
Here's what I need to do. I want to use an Android tablet for science research, but I will need to programmatically control the screen/backlight. Specifically, there is a mode where my app will need to communicate with other systems via WiFi, play sounds, and have the touchscreen active, but the backlight must be completely off; in this mode, the device cannot emit any light, or it will interfere with the science. Obviously, this cannot be sleep mode! Is this feasible?
I've looked around a bit, and this sounds really promising, but it isn't crystal-clear (to me, anyway!) whether this will work. Can anyone vouch for that?
Finally, does it matter which tablet I choose? Basically, there seem to be three possibilities: the backlight is controlled with a switch (doubt that is done anymore), the CPU can only turn it on or off, or the CPU can adjust it fully. Writing this makes me feel rather silly about being concerned, but a Samsung rep yesterday told me I can't do this on the Galaxy. Anyone care to recommend a tablet?
Thanks!
Specifically, there is a mode where my app will need to communicate with other systems via WiFi, play sounds, and have the touchscreen active, but the backlight must be completely off
Android does not support "have the touchscreen active, but the backlight must be completely off". And, you do not have the ability to turn the backlight "completely off" programmatically.
I've looked around a bit, and this sounds really promising
That sets the backlight to be low. Some devices may elect to turn the backlight off when it is set low. That is up to the device manufacturer.
Finally, does it matter which tablet I choose?
See above.
Since its a science research I'm going to assume you may not need to divulge this application and want it in a controlled environment. If this is the case, a little creative thinking suggests that since the touch screen will still react to even if covered by a thin layer of plastic (like the screen protectors for instance) you may be able to apply some opaque vinyl on top of the screen (easy to remove) for doing the experiments.
This may not be useful but since to me it sounded like it could I thought I'd share my thoughts with you on this one. Once you've covered the screen with the vinyl, the rest is as usual, keep screen on, and do your magic.
:)
Is there a way to display text on lock screen? Like the information about unread SMS messages or like that Music Player on lock screen with Play/Pause buttons.
Thanks
Yes and no. Their is no public API to create or modify the lock screen. Whoever built the OS version on your device created your lock screen. Some of the manufacturers or carriers have added additional things to the lock screen. I've seen some that tie in to the music app, HTC sense has a somewhat customizable lock screen. So if you were willing to create your own rom and flash it to your device you could write your own lockscreen. Short of that the best you can do is write an app that the system thinks is an alternate home screen that has some kind of lock mechanism before the actual home is displayed. Then you set your device not to use a lock screen(so that it won't show both) This is not a great solution however, there are bound to be more ways to access the device if you use a "fake" lock screen like that so if security is an issue I wouldn't mess with it at all.
You might be able to find one of these "fake" lock screens on the market that suites your needs or you could create one that is exactly what you want. You could also search around on XDA for a rom that works with your device, 3rd party roms may be more likely to have the features your looking for on the lock screen.
If you end up making a pretend lock screen by using the home replacement method I strongly suggest you do not distribute something like that on the market. It is insecure and the users are unlikely to realize that there is a difference between that and a legit lock screen. Plus there is no guarantee that this method doesn't get broken at some point.
Stock Android doesn't support 'badges' (e.g. unread count on a messaging app) that overlay the app icon like on the iPhone. There are a number of questions here on Stackoverflow which confirm this and suggest using a widget.
Whilst widgets are lovely things, they require too much interaction from the user to get in place (all that searching, long pressing etc.) and don't actually change the app icon. So no, that is not an option.
I accept that Android doesn't have app icon badges. However, HTC Sense and Samsung TouchWiz do. I'm looking at my Galaxy S right now, and the app launcher Messaging icon has a badge with the number of unread SMS messages.
Does anyone know how to access this badge functionality individually for Sense and TouchWiz devices? (I expect there are two APIs).
I don't know about HTC but I've written up how to do this on Samsung phones here How to interface with the BadgeProvider on Samsung phones to add a count to the app icon?
Does anyone know how to access this badge functionality individually for Sense and TouchWiz devices? (I expect there are two APIs).
Become an employee of HTC or Samsung, respectively.
HTC might start offering an API for stuff like this through Open Sense. Samsung might start offering an API for stuff like this through their developer site. I am not aware that either are at present and I wouldn't count on it becoming available.
What you are seeing is a feature of those home screens. You are, of course, welcome to write your own home screen where you have this functionality, perhaps even exposing an API for third-party developers to use.
Still no positive answer to this?
It's very strange that they (HTC and Samsung) haven't come up with a way for third-party apps to update their widgets! So we end up with users of third-party sms apps to complain about the sms counter not updating when it should. This is very sad, especially on the Android world where app integration has been made so easy by the framework! Such implementations should be negatively judged by Android community and the Android Alliance!
If anyone has found a work-around for force updating the widgets of the vendor specific sms apps (HTC and Samsung), so the unread sms counters correctly update, and would like to share this knowledge, you are more than welcome!
Is there a way to replace the phone lock application of an Android phone ?
I would like to customize my screen lock, and perhaps, if the result is nice, publish it on the market. Would that be possible ?
Any tips ?
Is there a way to replace the phone lock application of an Android phone ?
No, sorry, there is no way to create a true replacement lock screen. There has been some discussion of augmenting the OS to support this. However, it is an area that is rather complex, both due to the code itself, and due to security issues.