Implicit broadcast receiver on Android O - broadcast

I wanted to create broadcast receiver to listen battery level changes even if my application is in background. On android Oreo 8.0 implicit broadcast is not working and I can't use JobScheduler as it is supporting api level 21+(Need to support api level 19). How can I solve this issue?

Related

Bluetooth Low Energy device to trigger webservice call

I am looking for a software or easy to use library where I can connect to a BLE device (simple button, like key finder) that could trigger http request upon click.
I already have rest api available on my local network. I need to be able to call it from the device. It can be software for android or windows. Anyone has ideas?

Best push service option for React Native Android/IOS?

I have been following many projects which demonstrate the push service.
But there are many problems specially when the app is closed/kill (IOS too).
My first preference would be using FCM with react-native and followed This project on git. But it too have issues with notifications.
Is there any full proof source showing the push with android/IOS even when closed/kill?Anything is deeply appreciated :)
I have tried Firebase Notification:
https://firebase.google.com/docs/notifications/
- Easy Implementation
- Works really well
- No inbox messaging (as far as i saw - correct me if I am wrong)
At the moment I am using Urban Airship. Wich is not free to use but has a larger SDK to use.
https://www.urbanairship.com/products/mobile-app-engagement/pricing
- Also has Inbox messaging
- Deep Linking
Both are working fine if the app is closed.
I wrote a pretty long chapter in my book on Android push messaging. Here is the flowchart I present on choosing a technology:
You should be able to get a good implemention using GCM/FCM with respect to power off and app close, but the bottom line is, GCM/FCM does not provide quaranteed delivery Quality of Serivce. They also will not quarantee order of message delivery. If you use MQTT, you can get this by setting QOS mode = 2.
MQTT is not hard to implement for Android. You can use the open source Mosquitto broker on the server side. It only take me 15 minutes to set this up on AWS or any unix server.
In your Android app, you then implement your own long lived service, and the Paho Android library is very stable and supports the 3 QoS levels, including QoS=2 which is the guananteed delievery mode.
Anyway, something else to think about. I use MQTT a lot. FCM is great, and it even supports topic messaging now, which is how the MQTT pub/sub model works. You just will never get guanarteed delivery QoS level with FCM.

EMM - MDM notification not being delivered on iOS devices

I have setup WSo2 EMM correctly. Noticed that device information and Get All Applications Notifications go pending and are never delivered to the devices. The status of these notifications in the database table is also P.
The only way to deliver these messages are by pushing the Camera Enable/Disable Operation or some other notifications, then the older pending notifications get delivered.
Seems they are stuck. This also happens to policy enforcement notifications. I have to manually push camera disable/enable to make these works.
Why does this happen? The notifications should be delivered instantly, like they do in Camera Enable/Disable case.
I am connected in Production Mode. Any pointers to sort this out?
I was using Java 1.6 earlier. Once I switched the JDK to 1.7, it appears to so far work well.

Core bluetooth in WatchKit in apple watch?

I want my watch app to be identified by my paired iPhone.I am using CoreBluetooth Framework to implement this. I am transmitting bluetooth signals from my watch app and trying to receive the signal in my iPhone app. I am using the same concept as apple has shown in its sample code (https://developer.apple.com/library/ios/samplecode/BTLE_Transfer/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012927) , the only difference is that my transmitter is the watch app.
Issue
I am unable to detect watch app in my iPhone. I have made sure that all of my hardwares are configured properly and I am configuring the Core bluetooth delegate methods properly. I also suspect if this method will be feasible with iPhone and apple watch.
All suggestions are appreciated. Thanks in advance
This is not possible because your WatchKit app runs as an extension on your iPhone and therefore all Core Bluetooth bluetooth signals are sent from the iPhone itself to itself.
Access to Core Bluetooth on Apple Watch lets your apps bypass the phone and connect directly with the Bluetooth in Apple Watch. Access Core Bluetooth to connect directly with accessories. And with Apple Watch Series 3, your apps can take advantage of built-in cellular and altimeter capabilities.
Please note, since watchOS 6 it's possible to use CoreBluetooth on watchOS.
Check for more informations this link "Creating Independent watchOS Apps"
Be aware there are still some limitations using CoreBluetooth in watchOS for example:
The minimum connection interval is 30ms instead of 15ms (for iOS devices).
The Apple watch can only operate as a central device.
The Apple watch can only be connected to two peripherals at one Time
The peripheral gets disconnected when the app goes into the background.
Maybe this will change when watchOS 7 is out.

ios 7 fetch offline message from xmpp server

I am developing chat application using XMPP protocol.
My development target is iOS 7.0
Every think is working fine user can able to communicate only when they are online.
But I want to notify user message has come when they are offline.
I have tried iphone XMPP App run background
But it doesn’t work for me.
First think it is possible or not?
Using what VIOP, background fetch or some other way?
If yes please let me know. how?.
The thread you are referring mention declaring that your app is a VoIP app to be allowed to constantly run in background.
It is technically possible but has two drawbacks:
If your application does not do voip, Apple will reject it (as misleading).
Battery consumption will be excessive as you will stay connected.
The state of the art is to fallback to Apple push notification service when the TCP connection between the client and the server is not established. This is battery efficient and provide a very good way to notify the user of new messages.