Android Apps Not Scanning

As more and more devices are being shipped with Android 10 we are increasing getting reports of problems with beacon apps built for previous versions of Android. We mentioned this issue back in October last year.

To compound the problem, many popular Chinese manufacturers such as Oppo, Huawei and Xiaomi also now using Android 10 in their forked versions of Android. Not only are these manufacturers inheriting the Android 10 problem but their devices also suffer from problems running services, such as Bluetooth scanning, in background. The problem is that these manufacturers also add their own additional background throttling (and killing) mechanisms into the OS that make Bluetooth unreliable. The site dontkillmyapp documents the known problems and some workarounds for various forks of Android.

If you think you might be a victim of these issues, try using another, perhaps older, Android smartphone to isolate the problem.

Bluetooth Beacons Study Guide

Bluetooth SIG have updated their Introduction to Bluetooth Beacons. It provides advice and examples how to use beacons from iOS, Android and Raspberry Pi using the respective Bluetooth APIs.

The examples show how to scan for AltBeacon which is unusual because most people will want to scan for iBeacon because AltBeacon is sent by very few beacons. This is less of a problem on Android and Raspberry Pi where slightly modified code can be used. However, on iOS, the suggested APIs won’t work for iBeacon because Apple removes the iBeacon data from the Bluetooth scan response data to force you to use the iBeacon specific APIs which aren’t mentioned in the guide.

iBeacons for Android, iBeacons for iOS

We often gets asked what are the best beacons for iOS and/or Android. As mentioned in our post on Which Beacons Are The Most Compatible, all beacons, whether iBeacon or Eddystone, are compatible with iOS and Android.

The universal compatibility comes about because all beacons are slight derivations of a few standard circuit designs and firmware provided by Texas Instruments, Dialog and Nordic who produce the System On a Chip (SoC) inside beacons.

Instead, you should be looking at more physical aspects such as battery size, battery life, range, on-off buttons, waterproofing and included sensors.

View iBeacons

iBeacon App Development Companies

There are a large number of offshore development companies currently spamming social media, claiming to do iBeacon development. We recommend you do your due dilligence before engaging development as many like to say ‘yes’ to anything and it’s often companies such as ours that have to pick up the pieces.

Here’s are some things to consider when looking for an iBeacon app developer:

  • Can they give examples of iBeacon apps they have written?
  • Can they give you references to past work who you can talk to?
  • Do they release development versions regularly so you can test and gauge progress? If everything is released at the end, it’s likely you are going to end up disappointed.
  • Who will actually be doing the development? There can be intermediaries in the development ecosystem that confuse and compound communications problems. Right from the start, you need to be talking direct with the person who will be doing the development.
  • Do they really understand you? Many aren’t native English speakers and if you are getting misunderstandings during initial engagement, this doesn’t bode well for the development.
  • Have they provided constructive comments on your proposed app rather than just saying ‘yes’? Developers should be able to improve on your ideas so as to get the best out of iOS and Android.
  • Getting iBeacon apps through Apple approval can be difficult. Can they give you examples why and the possible mitigations?

App development is an area where cheapest isn’t usually the best. Compromised development will cost you in the longer term through late or aborted development, tricky problems, significant end user support, poor app reviews and difficulty adapting the apps in the future for future phones and new features.

Beaconzone was founded by app developers in 2015 after we had previously created several iBeacon art gallery apps. We have since written many more iBeacon and Bluetooth LE apps on iOS and Android.
Read about beaconzone.solutions

nRF Connect Features

Nordic, the manufacturer of the System on a Chip (SoC) in most beacons, has a new blog post on Five Things You Didn’t Know About Nordic’s Mobile Development Apps. The post mentions less visible features of nRF Connect on iOS and Android. For example, you can get a useful RSSI graph by dragging the screen towards the right from the centre:

nRF Connect is the main app we recommend for testing beacons. iOS recently received a completely new version. nRF Connect also has macros that can speed up testing.

Android Bluetooth LE Resources

If you are considering developing Bluetooth LE on Android, you should take a look at Stuart Kent’s Android Bluetooth Low Energy Resources on GitHub. He provides lots of links to introductions, videos, libraries, guides, questions on Stack Overflow and example app source code.

If you need more information take a look at the Android section of the BluetoothLE Wiki. If you need to rely on background processing read Don’t Kill My App.

Android 10 Asking for Location Permission

If you have upgraded to Android 10 then you will find you are asked whether particular apps, especially those using maps or Bluetooth, can use Location permission (all the time, only while using the app or Deny). Something like:

You will find that this screen appears, for each app using Location, at a seemingly random time. Why is this? Why do apps you haven’t just started suddenly ask for the permission? What are they doing? How should you answer?

The change of Android location permissions to include ‘only while using the app’ is part of Android 10. For app architectural purposes, some apps get location or Bluetooth scan in an Android Service that runs in background. This Service can be started and stopped by the Android OS according to whether the OS needs resources and also when an app is upgraded. The starting of the Service might cause it to get location or do an initial Bluetooth scan, as part of startup, even though the app isn’t going to use this information. These things used to be transparent but now have the knock on affect of causing the OS to ask for the first-time permission seemingly at a random time.

If, for example in the above BBC Weather app, you need the app to show the latest weather for a location on a widget or otherwise use location-related data in background then select ‘Allow all the time’. Otherwise select ‘Allow only while using the app’. Beware of selecting ‘Deny’ as it’s likely it might cause the app to malfunction in some way.

Our empirical experiences are that Android 10 background restrictions do actually noticeably improve battery life, unlike previous Android ‘Doze’ and App Standby restrictions that seemed to create pain and no gain.