iBeacon Native not working on Android 8

Hello everyone,

so I’m having this error while trying to use the iBeacons Native plugin

No such service ComponentInfo{com.example/org.altbeacon.beacon.service.ScanJob}

package.json

{
“name”: “ionicDemo”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
@angular/animations”: “5.2.10”,
@angular/common”: “5.2.10”,
@angular/compiler”: “5.2.10”,
@angular/compiler-cli”: “5.2.10”,
@angular/core”: “5.2.10”,
@angular/forms”: “5.2.10”,
@angular/http”: “5.2.10”,
@angular/platform-browser”: “5.2.10”,
@angular/platform-browser-dynamic”: “5.2.10”,
@ionic-native/core”: “4.7.0”,
@ionic-native/diagnostic”: “^4.7.0”,
@ionic-native/ibeacon”: “^4.7.0”,
@ionic-native/local-notifications”: “^4.7.0”,
@ionic-native/splash-screen”: “4.7.0”,
@ionic-native/status-bar”: “4.7.0”,
@ionic/storage”: “2.1.3”,
“android-versions”: “^1.3.0”,
“com.unarin.cordova.beacon”: “~3.6.1”,
“cordova-android”: “6.3.0”,
“cordova-plugin-badge”: “^0.8.7”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-ibeacon”: “^3.6.1”,
“cordova-plugin-ionic-keyboard”: “^2.0.5”,
“cordova-plugin-ionic-webview”: “^1.1.19”,
“cordova-plugin-local-notification”: “^0.9.0-beta.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova.plugins.diagnostic”: “^4.0.8”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“lodash”: “^4.17.10”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
@ionic/app-scripts”: “3.1.9”,
“typescript”: “~2.6.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-local-notification”: {},
“com.unarin.cordova.beacon”: {},
“cordova.plugins.diagnostic”: {}
},
“platforms”: [
“android”
]
}
}

ionic info

cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.9
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v10.2.1
npm : 6.1.0
OS : macOS High Sierra
Xcode : Xcode 9.3.1 Build version 9E501
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy

Does anyone know what is happening in here?

hi,
for android 8,
plugin.xml need to modify. i don’t know why this configuration is not merge into plugin for version 3.6.1
Reference: https://github.com/petermetz/cordova-plugin-ibeacon/commit/928f9f47110cee40f2abb86e369c6e1fdcfa5bf6#diff-53f390d375398624afe1cfe1125f42bf

you can change it …/plugins/com.unarin.cordova.beacon/plugin.xml

then remove android platform and add platform android it again. (ionic cordova platform …)
it work for me.

Br
Weerayut

1 Like