Make call from android phone when user click Puck.js button #1998
Replies: 21 comments
-
Posted at 2016-12-16 by @gfwilliams Hi, If you can find a way of sending a call from a keyboard shortcut (or sequence of keys) then it should be pretty easy to set Puck.js up as a keyboard to make the required keypresses. Otherwise you'll need an app - you could make your own, or there's almost certainly a keyboard shortcut app available. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by Bas Wat about the DroidScript app? Making a call from within your DroidScript app seems built in, using BLE API s could require paid plugins. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by @gfwilliams Yes, I forgot about that - that'd be a nice easy solution. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by CoffeeCups If your phone is rooted, and you have installed Tasker, (and understood its' complexities) then I would think what you want to achieve might be possible. Bluetooth Tasker Wiki search - might lead to some recipes, or maybe onto other clues. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by MattC +1 for Tasker - I did something similar with the amazon dash buttons You'd have to work out how to get the puck to post some sort of notification to your phone, or maybe Tasker can listen for bluetooth messages.. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by CoffeeCups The reason I piped up was one of the most useful Tasker recipes I found was "disable wifi if out of range of either home wifi or office wifi". Given the plethora of MITM (Man in the middle) attacks and access point spoofing, this stuck in my mind. I am guessing its the same with Tasker and Bluetooth. "When x happens send SMS" features quite a lot on Tasker, so I'd be surprised if you couldn't make a call. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-17 by MobiTech It works with an APP. You simply need to listen for advertising. Take a look at stackoverflow for working code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-04 by @gfwilliams Just to add: Can Android be set up to associate a long-press of a key with calling someone in particular like you used to be able to do with older phones? Puck.js acting as a HID device could easily long-press a number key. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-08 by user72222 I think there are two solutions : a. use Bluetooth phonebook access profile (pbap) when bonding gets implemented. This is the way car stereos do the call. b. use telerik NativeScript that's basically JavaScript doing native API calls to the device. This way you can use puck with the HID profile https://www.npmjs.com/package/nativescript-phone |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-09 by @gfwilliams Cool - thanks! I wonder whether PBAP works over Bluetooth LE? If so that'd be excellent |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by user71304 I have used below code, that was mentioned in this link npmjs.com/package/nativescript-phone but I am getting error - execution interrupted. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by @gfwilliams Are you trying to run that on Espruino? If so that won't work - NativeScript is meant to run on phones: https://www.nativescript.org/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by user71304 Ok, how I will know in my nativescript app that puck is clicked and now app should call the number. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by @gfwilliams There are a whole lot of threads on this kind of thing already. Either:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by user71304 Hi Again, I want to know is there a similar way to just listen when Puck button is clicked? If got when button is clicked at my android app then I can write code in my android app which can make phone call. Regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by @gfwilliams Yes. See the post I wrote above. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-01 by Dave_Smart The Puck plugin (BLE) is free in DroidScript. It should be very easy in DroidScript too. Probably take about 5 mins to write |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-01 by Dave_Smart OK, I was wrong. It took 2 minutes :) Here is the code:-
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-01 by Dave_Smart You could also build a DroidScript service which stays always running in the background and watches for the button presses. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-01 by Dave_Smart Here is a more sophisticated solution that does not require a constant (battery draining) connection:- http://forum.espruino.com/conversations/298102/#comment13448826 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by user71304 Thanks Dave, at android side I am using android studio. So is there any link or guide for achieving this using android studio? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by user71304
Hi All,
I want, that when I press Puck.js a phone call can be made from android mobile.
Is this feasible?
Regards
Sachin
Beta Was this translation helpful? Give feedback.
All reactions