I want to have a button on Android wear which clicked will send some data onto the paired mobile.
I know how to call an event from mobile to wear using MessageApi. However I cant do the reverse.
Please help.
Thank You
This is done in the same way. It doesn't matter which direction you are going.
Related
I am working on an android app built on apache cordova. The app used to send your location via SMS, Email & in app notification to your predefined contacts. I want this sharing event to be triggered on double tapping on screen (when locked) or 3-4 times pressing the power button/ volume button.
Its for emergency situation, when user may not be able to unlock phone & open app to share any info.
I've searched a lot but could not find any relevant info. is there any available plugin to do that? I know very little of JAVA. Expecting any plugin that would allow me to launch the app(any activity) when phone is locked.
Any helpful information or suggestions are appreciated.
To accomplish this kind of task, you need to run a service in background, it is not possible to use any cordova webview, so you won't be able to run any javascript.
I don't think there is any plugin doing such a thing as it is very specialized.
I needed to create an app that needed to send notification to the user depending on his location. It ended up in writing a native plugin...
So the best advice I can give you is "It's never too late to learn Java" ;-)
maybe some other JS framework (maybe NativeScript) allows such things but I never used it yet so it might be impossible too.
Hello I am developing an app for the Sony Smartwatch 2 and I have a couple of questions:
First: is it possible to Launch the "app on the watch" using the app on my phone? I mean I want to be able to click a button on the phone which will automatically launch the app on the watch.
And my second question is: how do I send data from the phone to the watch, for example, I have a Serie of layouts and according to what the user clicks on the phone it will Show a different layout on my watch.
Thank you very much.
If you want to start the SmartWatch 2 you can do it using this code:
Intent i1 = new Intent("com.sonyericsson.extras.aef.control.START_REQUEST");
i1.putExtra("aea_package_name", "com.youpackage.name");
i1.setPackage("com.sonymobile.smartconnect.smartwatch2");
ctxt.sendBroadcast(i1, "com.sonyericsson.extras.liveware.aef.HOSTAPP_PERMISSION");
For the SmartWatch 2 all of the code runs on the phone not the watch, so if you want to share data between the phone and watch you can use regular android methods. If you need real time communication you can always use a broadcast reciever. Follow this link for instructions on how to setup a broadcast receiver and download the sample so you can get a better idea of how it works
https://developer.android.com/training/run-background-service/report-status.html
I want to capture the incoming call event using Phonegap. I want to detect if there is any event of incoming call occured and pause my media files from playing. So far I have found about startcallbutton & *endcallbutton*events. But I want to detect the call from the moment of ringing. Searched in Phonegap google group but not finding any solution that could work for me.
I'm new to phonegap. Am I missing something? Can anyone please help me that how can I detect the incoming call and take action after that? Is that solution device independent?
Maybe this plugin solves it for you? https://github.com/renanoliveira/cordova-phone-call-trap
Do note that you will always require a plugin, since Phonegap/Cordova has no API to detect calls. And plugins are platform specific, but since you tagged your question Android I suppose you only target Android?
as I as I could remember, you should set up intent filter for calling event, and get action from that event...and handle it.
reading the following material will help you to understand~
Retrieve incoming call's phone number in Android
http://developer.android.com/reference/android/telephony/TelephonyManager.html#ACTION_RESPOND_VIA_MESSAGE
How to detect incoming calls, in an Android device?
i want to get the event when mobile is switched on in my application.
so, how i handle/get switched on event of mobile in my app, is it necessary to run my app in background?
can anyone help me?
Thanks in advance.
Have a look at the discussion in this thread:
Is it possible to write an Android broadcast receiver that detects when the phone wakes up?
I am implementing an camera application.When a click on the get image its does not work.No further action in performed on the button.Can anyone tell where's is the problem ??
Hello friend
You want to implement your whole application in
mobile device not virtual device.
So for that you have to install your app in your android mobile
and than check.
May be this reason you get an error.
Just check once.