Android Open Source - boundaries-android Boundaries App






From Project

Back to project page boundaries-android.

License

The source code is released under:

MIT License

If you think the Android project boundaries-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.contexthub.boundaries;
/*  w w  w . jav a 2  s .c  o m*/
import android.app.Application;
import android.content.Context;
import android.util.Log;

import com.chaione.contexthub.sdk.ContextHub;
import com.chaione.contexthub.sdk.SensorPipelineEvent;
import com.chaione.contexthub.sdk.SensorPipelineListener;

/**
 * Created by andy on 10/20/14.
 */
public class BoundariesApp extends Application implements SensorPipelineListener {

    private static Context instance;

    public BoundariesApp() {
        instance = this;
    }

    public static Context getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        ContextHub.init(this, "YOUR-APP-ID-HERE");
        ContextHub.getInstance().addSensorPipelineListener(this);
    }

    @Override
    public void onEventReceived(SensorPipelineEvent event) {
        Log.d(getClass().getName(), event.getEventDetails().toString());
    }

    @Override
    public boolean shouldPostEvent(SensorPipelineEvent sensorPipelineEvent) {
        return true;
    }

    @Override
    public void onBeforeEventPosted(SensorPipelineEvent sensorPipelineEvent) {

    }

    @Override
    public void onEventPosted(SensorPipelineEvent sensorPipelineEvent) {

    }
}




Java Source Code List

com.contexthub.boundaries.ApplicationTest.java
com.contexthub.boundaries.BoundariesApp.java
com.contexthub.boundaries.MainActivity.java
com.contexthub.boundaries.fragments.AboutFragment.java
com.contexthub.boundaries.fragments.GeofenceCreateDialogFragment.java
com.contexthub.boundaries.fragments.GeofenceEditDialogFragment.java
com.contexthub.boundaries.fragments.GeofenceListFragment.java
com.contexthub.boundaries.fragments.GeofenceUpdateDialogFragment.java
com.contexthub.boundaries.fragments.GeofencesMapFragment.java