I want to add my app's shortcut on phone's lock screen, is it possible in android ? Below screenshot (which is of iPhone) will make it clear.
Without Widget..
Any help will be appreciated, thanks :)
If you want to add a shortcut in the home-screen then that is obviously possible with the API Android provides.
But you are talking about adding a shortcut to the lock-screen, which only a few (very few) Android devices support officially. I have experience with a lot of different Android devices from a lot of different manufacturers but none of them supports adding an app shortcut on the lockscreen.
You might not be willing to accept my answer as may not provide the answer you were looking for, but still I would try to give you two possible solutions :-
1) You need to create your own lockscreen for this and then you obviously have the privilege of adding any shortcut you want there. See if that's a possible solution for you.
2) Or, if know of any Android device that does support this, then you need to contact the device manufacturer for knowing the API.
I am rest assured there is no official API available to put an app shortcut on the lockscreen.
Hope I could help you with my best.
Check out this article at: http://fieldguide.gizmodo.com/put-your-key-apps-on-the-android-lock-screen-for-easy-a-1621573474. Following these steps should get you what you are looking for.
Related
android studio how to access Wi-Fi? It means that there is a list of all Wi-Fi and you click on one of them and it gives me a password. Is it possible to do this?
I searched for a lot of information, but I didn't find anything intelligible. Help me if it's even possible to do it) If you ask why I need this, then for knowledge about android and java in general, I want something new, interesting))) In general, if it is really possible to do this, then I would like to know how to do it.
I have very old Siemens CX70 in working state and just don't want to throw it out. My idea is to use its math power and peripherals (GSM module, USB, Camera and screen) to build some simple applications for home use (multichannel termometer, timer and cheap security system - for examples).
I know I should use Java ME and IDE (I love Netbeans, for example). Can you tell me what I need more to start developing? I know Java well, I just need to make an environment to developing, debug and deploy. Mobile library documentation will be very helpful too.
Thanks.
There are so many online tutorials about this topic that the only right thing to do is to refer you to google.com
Search after "getting started with j2me".
However, there's something else you should know upfront before getting too excited.
The security model in JavaME will prevent you from doing much useful stuff, in relation to some of the things you mention.
Every time you try to access certain things in the phone, like e.g. the camera, or send SMS, or read/write a file on SD card, etc etc - the phone will show a popup "This app is trying to access camera. Allow this?". And the app will only continue after a manual click on Yes.
As you can imagine, this of course renders a lot of ideas useless.
In order to prevent these popups, you can sign your app with a certificate you buy from Thawte or Verisign. But as that'll cost you $300 a year, it's not the way most sparetime hobby developers chooses.
Personally, I found another way, but it requires you to use a phone from Sony Ericsson.
Because the old Sony Ericsson phones can be patched in order to remove the Java security. After doing this on one of my old phones, I've been having fun making apps like the ones you mention. For example, an app that keeps an eye on my home when we're out, by taking a picture every second. If it detects a difference in the picture, it sends me an MMS with the picture. :-)
I have searched a long time for patching options for other brands, but I just can't find anything useful. Nokia should supposedly also be patchable, but I just can't find anything useful about it.
So in short: If you'd like to make some sparetime hobby apps on a phone like that, you should either find a Sony Ericsson phone and patch it - or go dig up an old used Android device.
Good luck.
I have an android program, written in Java and it uses a Wifi Hotspot, which at the minute I am having to turn on and give the settings manually.
I would like for the hotspot to be turned on with my settings from inside the program.
I have seen a few posts relating to this, some people with answers but they don't seem to be very clear.
Does anyone know of anything that can help me?
as far as I know there' absolutely no API on Android to achieve this functionality.
The maximum you can do is like on this app https://play.google.com/store/apps/details?id=com.budius.WiFiShoot that it checks if the feature is enabled, and in case it's not it sends the user to the settings screen.
I tried to use this way:
Scan all avaiable wifi hotspot.
Check security type of these hotspots(WPA, WPA2, WEP, OPEN).
Make authenticate to connect hotspot by SSID.
I used wifi-connector library (especially Wifi.java file)
Hope this help!
I have been trying to look into this and it seems hard to find good solid info. Is there anyone out there that has created any java packages that interact with NFC phones, cards, etc. I haven't been able to find a lot on how NFC works really. I just want to be able to read the id of the phone, or its phone number, when it scans. Any way to do this?
I was reading this:
http://java.sun.com/developer/technicalArticles/javame/nfc/
which mentions the package javax.microedition.contactless
but can't seem to figure out how to implement it. I am not great at Java, only in my second semester. This over my head?
The Android has own Java API, which differs from JavaMe. This applies not only to NFC, but also to other areas. The above mentioned API you can use on JavaMe NFC enabled phones like Nokia 6212, some Samsungs and Sagem.
If you plan to use NFC I suggest you to either use the Android - there are 2 widely available NFC phones on the market or Symbian, where is dozens of models already released. The other option is go with RIM BlackBerry.
BR
STeN
Is it somehow possible to set Android to standby-mode programmatically ?
If you're developing your own ROM or you have a rooted phone (it's need to be checked which user is able to do this) then you should have a look to the PowerManager.goToSleep functionality. Here is a discussion about this function in the Google Groups. And here you can read about this particular permission.
http://developer.android.com/reference/android/os/PowerManager.html#goToSleep%28long%29
This is what i think you are looking for.
Don't forget to include following permission.
android.permission.DEVICE_POWER
This functionality has been removed since API level 21: https://developer.android.com/sdk/api_diff/21/changes/android.os.PowerManager.html
Like Yury also mentioned, before you were able to call powerManager.goToSleep(time), but you would have needed a rooted device or app would have needed to be signed as a system app to acquire the relevant rights.