Coder Social home page Coder Social logo

beaconstac / android-sdk Goto Github PK

View Code? Open in Web Editor NEW
16.0 9.0 18.0 6.42 MB

Beaconstac ADVANCED SDK for Android devices

Home Page: https://dashboard.beaconstac.com

License: MIT License

Java 100.00%
beacon sdk ranging-beacons android-sdk ibeacon bluetooth-beacons proximity-advertising proximity-marketing

android-sdk's People

Contributors

bhashkarsharma avatar garimabatra avatar kriti17 avatar ravipratapm avatar vibinvarghese avatar vibinvarghesemobstac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-sdk's Issues

Getting below exception while accessing the beacon properties of rangedBeacons

11-28 06:05:06.140 17142-17142/com.cyient.imaps E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cyient.imaps, PID: 17142
java.lang.RuntimeException: Error receiving broadcast Intent { act=com.mobstac.beaconstac.intent.action.RANGED_BEACON flg=0x10 (has extras) } in com.cyient.imaps.Indoor2DAnd3DActivity$2@64f53988
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:778)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5030)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@64e6c218: Unmarshalling unknown type code 82 at offset 316
at android.os.Parcel.readValue(Parcel.java:2087)
at android.os.Parcel.readListInternal(Parcel.java:2362)
at android.os.Parcel.readArrayList(Parcel.java:1710)
at android.os.Parcel.readValue(Parcel.java:2041)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2321)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.getParcelableArrayList(Bundle.java:1250)
at com.mobstac.beaconstac.core.BeaconstacReceiver.onReceive(BeaconstacReceiver.java:43)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:768)
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5030) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 

Rule Not triggered

I have downloaded the sdk and sample.

Changed following in beaconstac.xml

  • 0 0 to my_organization_id
  • added my API key.

In Admin area (https://manage.beaconstac.com)

  • Added a rule for a beacon and activated it.

Beacon is detected but Rule is not triggered.

public void triggeredRule(Context context, String ruleName, ArrayList actions) this method is never called.

Content provide issue

I have integrated beaconstac in one of my project and it works fine in devices in lollipop and above versions.

But when I am trying to run it on lower versions , i am getting a issue in MSContentProvider class.

Below is the log.

java.lang.RuntimeException: Unable to get provider com.sample.mobile.beacon.MyContentProvider: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.app.ActivityThread.installProvider(ActivityThread.java:4880)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4488)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4428)
at android.app.ActivityThread.access$1300(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1298)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:570)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:236)
at android.content.res.Resources.getString(Resources.java:320)
at com.mobstac.beaconstac.provider.MSContentProvider.getAuthority(MSContentProvider.java:37)
at com.mobstac.beaconstac.provider.MSContentProvider.onCreate(MSContentProvider.java:100)
at com.sample.mobile.beacon.MyContentProvider.onCreate(MyContentProvider.java:31)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1058)
at android.app.ActivityThread.installProvider(ActivityThread.java:4877)
            at android.app.ActivityThread.installContentProviders(ActivityThread.java:4488)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4428)
            at android.app.ActivityThread.access$1300(ActivityThread.java:145)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1298)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5099)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:570)
            at dalvik.system.NativeStart.main(Native Method)

Android Integration issue

There was an upgrade to the Beacon SDK which was launched some time ago and that is causing some issues when we are trying to integrate the SDK and run the sample.

Below is the error log, can you please look and advise:

01-14 14:09:27.625 30370-30370/? I/art: Late-enabling -Xcheck:jni
01-14 14:09:27.699 30370-30370/com.mobstac.beaconstacexample W/System: ClassLoader referenced unknown path: /data/app/com.mobstac.beaconstacexample-2/lib/arm
01-14 14:09:27.738 30370-30392/com.mobstac.beaconstacexample I/GMPM: App measurement is starting up
01-14 14:09:27.743 30370-30392/com.mobstac.beaconstacexample E/GMPM: getGoogleAppId failed with status: 10
01-14 14:09:27.744 30370-30392/com.mobstac.beaconstacexample E/GMPM: Uploading is not possible. App measurement disabled
01-14 14:09:27.802 30370-30370/com.mobstac.beaconstacexample I/Crittercism: Initializing Crittercism 5.0.6 for App ID 55828d0b880e1802279cfe77
01-14 14:09:27.894 30370-30370/com.mobstac.beaconstacexample D/Volley: [1] DiskBasedCache.clear: Cache cleared.
01-14 14:09:27.895 30370-30370/com.mobstac.beaconstacexample D/Volley: [1] DiskBasedCache.clear: Cache cleared.
01-14 14:09:27.997 30370-30439/com.mobstac.beaconstacexample D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: (I8a1ccf9ecb)
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: OpenGL ES Shader Compiler Version: XE031.06.00.01
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: Build Date: 11/02/15 Mon
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: Local Branch: workspace
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: Remote Branch:
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: Local Patches:
01-14 14:09:28.050 30370-30439/com.mobstac.beaconstacexample I/Adreno-EGL: Reconstruct Branch:
01-14 14:09:28.052 30370-30439/com.mobstac.beaconstacexample I/OpenGLRenderer: Initialized EGL, version 1.4
01-14 14:09:29.726 30370-30433/com.mobstac.beaconstacexample E/Volley: [5080] BasicNetwork.performRequest: Unexpected response code 403 for https://beaconstac.mobstac.com/api/1.0/places/?organization=0
01-14 14:09:29.746 30370-30370/com.mobstac.beaconstacexample D/Volley: [1] 3.onErrorResponse: MSPlace
01-14 14:09:29.749 30370-30407/com.mobstac.beaconstacexample E/Volley: [5069] BasicNetwork.performRequest: Unexpected response code 403 for https://beaconstac.mobstac.com/api/1.0/rules/?organization=0&page=1
01-14 14:09:29.762 30370-30370/com.mobstac.beaconstacexample E/Beaconstac ERROR: Error syncing geofence
01-14 14:09:29.762 30370-30370/com.mobstac.beaconstacexample E/Beaconstac ERROR: Server Error

Thanks,
Ankit

Beacon could not be synced

Dear Beaconstac, I've faced the issue and confuse API Key and MY_DEVELOPER_TOKEN. Is it the same?

2022-11-10 16:18:39.162 11552-11631/com.mobstac.beaconstacdemo E/Volley: [588] BasicNetwork.performRequest: Unexpected response code 401 for https://beaconstac.mobstac.com/api/2.0/rules/?page_size=20&organization=ALL
2022-11-10 16:18:39.229 11552-11632/com.mobstac.beaconstacdemo E/Volley: [589] BasicNetwork.performRequest: Unexpected response code 401 for https://beaconstac.mobstac.com/api/2.0/beacons/?page_size=20&organization=ALL
2022-11-10 16:18:39.474 11552-11631/com.mobstac.beaconstacdemo E/Volley: [588] BasicNetwork.performRequest: Unexpected response code 401 for https://beaconstac.mobstac.com/api/2.0/rules/?page_size=20&organization=ALL
2022-11-10 16:18:39.482 11552-11552/com.mobstac.beaconstacdemo E/Beaconstac: com.mobstac.beaconstac.core.MSException: Rule could not be synced
2022-11-10 16:18:39.519 11552-11632/com.mobstac.beaconstacdemo E/Volley: [589] BasicNetwork.performRequest: Unexpected response code 401 for https://beaconstac.mobstac.com/api/2.0/beacons/?page_size=20&organization=ALL
2022-11-10 16:18:39.531 11552-11552/com.mobstac.beaconstacdemo I/BluetoothAdapter: BluetoothAdapter() : com.mobstac.beaconstacdemo
2022-11-10 16:18:39.540 11552-11552/com.mobstac.beaconstacdemo E/Beaconstac: com.mobstac.beaconstac.core.MSException: Beacon could not be synced

platform

Hello, I would like the source code of the online platform too, can you share?

proximity monitoring in background?

Is this feature available?

It doesn't seems to be possible to register any kind of bootstrap monitor that restart the Activity when the beacon is found in background usage

What Redeem in Media Card

Hi,

We have implemented Beacon on Android and iPhone both, to recieve cards on iPhone we get JSON and on android we get action list, now when we approach near a beacon we can see the cards in form of pop up but the action written below the card is not shown, for eg. in Photo card there are two actions for user "Dismiss and Redeem" how do we get these action and how does it work? Similarly for Media card there is option to "Dismiss and Watch" which we are not getting in response? As of now we have created custom lable/action button "View and Cancel" but shall this not be something that we should get directly from Beacon based on the action associated with each card?

Please advise.

Thanks,
Ankit

BeaconAdapter gives ClassCastException

Hi Kriti,

I tried the example given in the sdk with my credentials by replacing organisation id, api_key.
but I am getting the beacon Id as 0 and following the error

11-28 04:18:47.251 21441-21441/com.mobstac.beaconstacdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mobstac.beaconstacdemo, PID: 21441
java.lang.RuntimeException: Error receiving broadcast Intent { act=com.mobstac.beaconstac.intent.action.RANGED_BEACON flg=0x10 (has extras) } in com.mobstac.beaconstacdemo.MainActivity$3@25181cc
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.mobstac.beaconstac.models.MSBeacon
at com.mobstac.beaconstacdemo.BeaconAdapter$1.compare(BeaconAdapter.java:62)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:320)
at java.util.TimSort.sort(TimSort.java:185)
at java.util.Arrays.sort(Arrays.java:1998)
at java.util.Collections.sort(Collections.java:1900)
at com.mobstac.beaconstacdemo.BeaconAdapter.notifyDataSetChanged(BeaconAdapter.java:62)
at com.mobstac.beaconstacdemo.MainActivity$3.rangedBeacons(MainActivity.java:255)
at com.mobstac.beaconstac.core.BeaconstacReceiver.onReceive(BeaconstacReceiver.java:45)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:746) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 

Could you please check this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.