Search code examples
androidbluetooth-lowenergyandroid-bluetoothaltbeacon

Android SDK Sensoro sensor Services not available


I am trying to add the Sensoro Smart Beacon -4AA android SDK to my android application. The instruction on their official page Sensoro Development show that I should download SDK folder and put it in libs folder, I added them as shown in the screenshot. Then add the following services to my Manifest file :

 <service android:name="com.sensoro.beacon.kit.BeaconProcessService"/>
        <service android:name="com.sensoro.beacon.kit.BeaconService"/>
        <service android:name="com.sensoro.beacon.kit.IntentProcessorService"/>

But the application can't detect the services and I searched for files with the names of the services but I didn't find them. I think the services files should be available in the SDK folder but I can't find them. Is that correct or I am missing something

enter image description here

this is the manifest file code:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="project.college.qmeup">

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Qmeup"

        android:usesCleartextTraffic="true">
        <service android:name="com.sensoro.beacon.kit.BeaconProcessService"/>
        <service android:name="com.sensoro.beacon.kit.BeaconService"/>
        <service android:name="com.sensoro.beacon.kit.IntentProcessorService"/>
        <activity android:name=".Admin"></activity>
        <activity android:name=".Usermain" />
        <activity android:name=".Login" />
        <activity android:name=".Registeration" />
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Solution

  • To add jar files to an Android Studio project you typically do two things:

    1. Put the jar files in the app/libs folder
    2. Modify your app/build.grade file to point to this folder

    You shown putting the jars in the root /libs folder (not under app) and do not mention adding the reference to build.grade. See this answer for more info:

    https://stackoverflow.com/a/25660223

    Shameless plug: If you get totally stuck, you might want to try using my open source Android Beacon Library, which is easier to set up, has full documentation and good support. (It is so good that I even support other people’s libraries, too!) https://altbeacon.github.io/android-beacon-library