Sam Sam - 1 year ago 66
Android Question

how to use radiusnetworks proximity kit to show an alert when user enter the one of the Geofence Map Region

I'm trying to integrate the radiusnetworks proximity kit for my android app, I've already created an account on the radiusnetworks and have created kit with 8 Geofence Map Regions 1 Beacon Regions.

how can i configure my android app to alert the user when he enter the one of the Geofence Map Region configured in my radiusnetworks account.


Stack trace
10-31 09:08:02.567 29104-29160/com.appmajik E/Parcelīš• Class not found when unmarshalling:

java.lang.ClassNotFoundException: org.altbeacon.beacon.service.StartRMData
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(
at android.os.Parcel.readParcelableCreator(
at android.os.Parcel.readParcelable(
at android.os.Message.readFromParcel(
at android.os.Message.access$000(
at android.os.Message$1.createFromParcel(
at android.os.Message$1.createFromParcel(
at android.os.IMessenger$Stub.onTransact(
at android.os.Binder.execTransact(
at Method)



android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
I'm using a Physical device

Answer Source

On the Radius Networks download page (after you've logged into their site - not the github repo), there are detailed instructions for setting up geofences. The short version is:

  • Configure Google Play services for your app based on either the your usage of Eclipse or Android Studio:

  • Ensure you're set the proper permissions in your manifest:

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

  • Verify Google Play services support in your app

    Check for Google Play support. For the most recent suggestions by Google, please refer to the Android documentation on checking for Google Play services support.

    Because each app uses Google Play services differently, it's up to you [the app developer] decide the appropriate place in your app to check verify the Google Play services version. For example, if Google Play services is required for your app at all times, you might want to do it when your app first launches. On the other hand, if Google Play services is an optional part of your app, you can check the version only once the user navigates to that portion of your app.

    To verify the Google Play services version, call isGooglePlayServicesAvailable(). If the result code is SUCCESS, then the Google Play services APK is up-to-date and you can continue to make a connection. If, however, the result code is SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED, or SERVICE_DISABLED, then the user needs to install an update. So, call GooglePlayServicesUtil.getErrorDialog() and pass it the result error code. This returns a Dialog you should show, which provides an appropriate message about the error and provides an action that takes the user to Google Play Store to install the update.

    Radius Networks shares some sample code on their page. I would suggest looking at both the Google Play services geofence sample code and the Radius Networks Proximity Kit Android Reference App for two different ideas of how to handle this. Since checking for Google Play services will likely require your app to interact with the user in the event that Google Play services is not installed on the device, or is an incompatible version, this section of the integration is largely up to you the app developer.

  • Lastly, you need to enable geofences in Proximity Kit

Check out the Radius Networks sample app for further details on enabling geofences and implementing the geofence notifier.

To answer your direct question about sending an alert you can send it in the notifier callback:

public void didEnterGeofence(ProximityKitGeofenceRegion region) {
    NotificationCompat.Builder builder =
            new NotificationCompat.Builder(this)
                    .setContentTitle("Proximity Kit Reference Application")
                    .setContentText("A geofence is nearby.")

    NotificationManager notificationManager =
            (NotificationManager) this.getSystemService(
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download