Just wonder whether it's possible to access phone's voice mail box using code?
I have seen in Android 4.0, Google has introduce a new content provider called "android.provider.VoicemailContract.Voicemails" but I want to do this on older versions of Android? Is it possible at all ?
No, because each network operator/phone manufacturer handles voicemail differently. In many cases, there won't even be any app on the phone that knows about individual voice messages. The best you can do is create a PhoneStateListener to listen for LISTEN_MESSAGE_WAITING_INDICATOR, which lets you read the message waiting indicator flag sent by the network operator (answers the question "Are there any new voice messages?").
Related
I am new to android, please tell me if inputMethodService can work with wifi p2p service discovery? I want one phone to act as a keyboard for another phone. Please tell me if it is possible and which resources to refer in order to begin with it. Thank you.
I think what you need to do is not worry about the input-method in the first device, but create an application where you input text as normal from what ever you are using for input on the android device and then make that application responsible to transfer the acquired text to another device in which you want to input, in real time.
Given the restrictions on the IME in android, the other device should have the modified input-method that receives the data and enters for you in turn.
You have to be very careful for this kind of data transfer because the IME in android is essentially capable of monitoring anything the user enters, so the data transfer should be really really secure.
I want to make an application is via WiFi would send and receive data without sending them to a specific recipient. I explained to the example of a simple chat: The user sends a message via WiFi, but without a specific destination. As a result, his report available to all users nearby. Similarly other users can receive and send messages. I also want to realize the function of repeater, where each user's device not only receives a message from the other devices, and retransmits them to others allowing increase the coverage area of WiFi connection.
But at the moment it is not possible to send data without a specific recipient. The same WiFi Direct necessarily require pairing before data transfer. Can not specify that the recipient is unknown.
Recently I heard the news about the technology WiFi Aware, which involves greater interaction between WiFI devices. Please reply, WiFi Aware allows to do what I described above? Namely - the transfer of data and we will without a clear indication of the recipient and the need to do additional work (eg preliminary pairing between devices).
If WiFi Aware allows to do what I described - when it is expected to release its API? In particular, for Android devices. And if not - you can tell me how to implement what I need? And in general - it is technically possible?
Thank you for your time and sorry for my bad English.
You should try to look into nsd via wifi-direct. This Network Service discovery via Wifi-Direct. What this helps you to achieve is broadcast information to all listening devices.
On the device which wants to convey the information you addLocalService and on the other devices you should discoverServices. In the ServiceInfo object you can the pass the information you want to communicate to the other devices who are listening for services. Please try to study from the link attached above.
I am not very sure about how repeater will work with this.
Currently I am trying to implement a feature where if I do some action in my app on one android device (changing channel on android tv), it should trigger my another android device in close proximity to launch one of its application.
I was just wondering which could be the easiest way to prototype it? Should I need to send some kind of push notification or another simple solution is possible? I just need it for prototyping as of now.
Thanks
You can use GCM with XMPP protocol that allows device-to-cloud connection. In the documentation you will find examples, just read it through.
This technique is very often called device to device but it's actually about upstreaming to the server and telling the server to push notification.
Requirement for both apps would be to use the same GCM sender ID.
Since this is a prototype you don't actually need to check if device is close to you or not. Otherwise, you could frequently update device's location on the server.
I think you want to develop a application like airdroid
https://play.google.com/store/apps/details?id=com.sand.airdroid&hl=en
As i know it set up small http server in one phone. And Send request from an another device. As you want. This sample help you to create such kind of http server. There is one restriction both device must be in same network.
https://github.com/NanoHttpd/nanohttpd.
Ok, I watched the Google I/O from 2011 presentation on NFC on peer to peer.
The demo was done on Gingerbread and using the application Sticky Notes found
Now in this demo, both device the onNewIntent() was called at the same time so both devices are trying to share information to one another.
On ICS and above, you have Android Beam..
With Android Beam, you have to touch to trigger the onNewIntent() event that will send the NDef message across.
Now the problem with this is that now to trigger the onNewIntent() on both devices, both user on each device has to "Touch To Beam" at the same time.
Is there a way that when you Touch To Beam on one device, both can have the onNewIntent() to be called?
I am trying to develop an app that will exchange data to each other but for it to work in a nice friendly fashion I need the devices to share the data at the same time once the Touch To Beam has been initiated on one device. I do hope this is possible.
Edit: It looks like this might not be possible to do :(
As far as I can tell, the feature you want is not available over NFC itself. The touch-to-beam/SNEP/NPP transfer is one direction only on Android. The user that clicks his screen will push an NDEF message to the other phone.
What I believe they've done in the video is set up a bluetooth connection with the NDEF message to make the transfer (as you saw in the stickynotes demo). Unfortunately there is no nice API for this.
However, the EasyNFC project promises to be able to allow you to create a bluetooth connection and socket between two phones/applications. Check it out here
I had a try and didn't really like the Touch-to-Beam UI that was still required in the set up of the bluetooth connection. It also didnt really suit my needs, as I wanted to transfer phone to computer and didn't really want to implement NFC P2P and a bluetooth connection.
Did you try this:
Use the Touch to Beam on phone-1 to "PUSH" the data, while on the other (phone-2), use the NDEF_DISCOVERED/TECH_DISCOVERED intent to trigger/start the data capture/reception. I vaguely remember one of the above intents were triggered when a PUSH is done. Although, every transmission requires a "Touch" to start the beaming.
When you think in general, Android should not allow the NFC data transfer in both direction at the same time. Lets think of a scenario where I want to send a thing to my friend with NFC. What is actively open on my friend's phone is not important. I should send this thing even the same app is not open on the receiver side. There may be another app in my friends phone that tries to send another thing to me. When we touch our phones, Android Beam (TM) appears and he data is sent from the phone that is touched.
In you case I think you should disable Android Beam (TM) by setting setNdefPushMessage(null) and do sending both ways using the old way.
https://developer.android.com/preview/api-overview.html
I think it will be available in L!!!
NFC enhancements
Your app can invoke the Android Beam on the user’s device to share data by calling android.nfc.NfcAdapter.invokeBeam(). This avoids the need for the user to manually tap the device against another NFC-capable device to complete the data transfer.
Is there any way to create a notification when a new e-mail arrives in my Android inbox? I would like to show an animation when I receive a new e-mail or SMS - would this be possible without writing my own e-mail client?
I'd also like to be able to customize the notifications based on who the sender is, the subject line, etc - basically, the same sort of criteria I can use to filter a message using any of the big existing clients.
Has anyone tried this before? Do you have any suggestions?
Unfortunately there aren't any documented email intent triggers for either of the default email programs (email and gmail). Unfortunately I think your only option would be to write your own email client (and maybe file a bug report/feature request) or dig up a non-standard email client that DOES trigger intents on incoming email.
The Intent documentation has information on all of the built-in intents and intent triggers and openintents.org maintains a table of many (but not all) 3rd party intents.
For notification of incomming sms, this should be possible to do with AT UR codes (specifically AT+CNMA), see this answer for more details. This is provided that you have access to a modem serial port. I know too little about Android, but the phone part is normally abstracted though the RIL (right?), but is it still possible to access the modem part?