Is it possible to us RxAndroiBle, autoconnect in foreground? - rxandroidble

I will try to post a question since I want to use RxAndroidBle. I want to connect to a device even though I am not running my application, I don`t mind if any service is running. Moreover if possible when I get close to the device with my phone, it automatically launches the application. What would be the drill for something like this?

You could register broadcast receiver with specific filter which will wakes up your app when BLE device is available

Related

Integrate custom device into Google Home

My idea is to have single addressable RGBW LED strips in all my rooms. For the sake of practice and interest, I do not simply want to by some controller, I want to start this project with some custom self-build infrastructure, consisting of some Arduinos and/or raspberry pis. My initial idea was to just setup a simple local server on a raspberry (which controls the arduinos connected to the LEDs) and build myself an app to control the lightning. That part is clear to me and should not be a problem, but I thought it might be a plus to integrate my devices directly to Google Home so I do not need any extra app.
I read through the Smart Home Platform but things are not 100% clear to me. I read things about requirements like public Oauth2 Server. I was wondering, if it is possible to get this working without setting up any server which has to be reached publicly, because otherwise I won't waste time on that topic.
If you want to control your room devices from a smartphone and are satisfied with local operation from few meters away than you should consider BLE on phone and devices.
Obviously, you would need to write your own app, but luckily with BLE you can use publicly available apps such as LightBlu for the dev phase and maybe even for later use (I have not looked into that lately).

{{> loginButtons} not showing on device with wifi off

I am testing my app on an android device and I have a problem with the "{{> loginButtons}". The div is only showing when my device is connected via USB to the computer with its WiFi on. When i disconnect WiFi and the USB the "{{> loginButtons}" disappears.
Kindly assist. I want to have the buttons display even when my device is disconnected and WiFi switched off.
And I want to fly =)
Think about this logically. If you are trying to authenticate a user while your device is offline, what are you doing with the authentication parameters? How --- Where --- are you going to login to?
No where. No where at all.
While your device is tethered, Meteor is smart enough to treat your computer as the application server. Without the tether, or WiFi, your phonegap bundle is trying to connect to something which doesn't exist. I suppose the package authors decided to simply hide their component if there's no application server detected, rather than code in a bunch of error messages.
Instead, what you need to do is to deploy your app. Once deployed, you can use the IP or the domain name as a parameter when you launch Meteor through Cordova. Then your buttons will render, because they can actually do something with themselves.

Trying to detect a windows user switch and close a serial port

I have a application I wrote that uses a serial port (hand scanner connected to it) and I need to detect somehow that another user switched so I can close that port and when the new user logs on to the application it wont get 'port in use' error. Any suggestions? My program is in VB.Net but open to any suggestions.
This is a common issue unfortunately.
I find the best thing to do is create a Windows Service to handle all of the comms so that it works independently of any user being logged in. You can use a WCF/Web Service to get data out of the Windows Service.
I hope this helps.
(I would have posted this as a comment instead of an answer if I could)

Detect event when the user picks up phone without dialing

I am currently linking asterisk to a web application, I am able, via AMI telnet connection, to detect when the line is ringing, when the user is dialing, when he hangs up.
I really would like to know when he picks up the phone but do not compose/dial anything, just taking the phone in his hand.
In telnet on AMI, nothing happens until he really dials something.
Can you help me detecting this event please ?
Phone do nothing when you pickup it, unless it have "Hot-line" feature.
So asterisk even never know you do that.
You need find ATA or Phone with Hot-line and enable that. If so, phone will call hot-line number when you pickup it.

isn't so called push really pull?

Ever since the introduction of push services in IOS I wonder how it works.
From what I found out the push function is basically an open connection that does not close serverside.
But mobiles are connecting at different points of the internet, the only way for a server to know where the mobile is connected is when the mobile tells the server where that it has changed location.
I read something about polling a connection so it stays open.
What advantage is there to manage and keep a changing open connection alive vs just checking if something is to pull?
Internally yes, push is implemented by having your phone poll for new data. The thing that makes push notifications attractive is that they are routed over Apple's service and that has many advantages.
From the phone's point of view, it only has to poll from one service, which means it can conserve bandwidth and piggyback on the normal operations of keeping a cellphone online. That means a lot less battery is used, and you can do things like set your phone to only receive push notifications every half hour, which means that 29 minutes out of every half hour you can turn off the data connection.
From the server's point of view, you no longer need to cache messages or provide quality-of-service guarantees. If you want to send a push notification to a phone that's out of range of a cell-tower for a few minutes, you may need to store the message for a considerable amount of time until the phone comes back online. Apple handles all this for you, and lets your server just be in charge of creating notifications, not storing and relaying them.

Resources