A library that gives you access to Orchextra platform from your Android sdkVersionAppInfo.
Start by creating a project in Orchextra Dashboard, if you haven't done it yet. Go to "Setting" > "SDK Configuration" to get the api key and api secret, you will need these values to start Orchextra SDK.
Orchextra SDK is composed of Orchextra Core, and add-on
- Geofences
- IBeacons
- Push Notifications
- Barcode/qr Scanner
- Image recognition
Add gigigo maven repository
allprojects {
repositories {
maven {
url "https://dl.bintray.com/gigigo-desarrollo/maven"
}
}
}
Add dependencies you need
implementation 'com.gigigo.orchextra:core:x.x.x'
implementation 'com.gigigo.orchextra:geofence:x.x.x'
implementation 'com.gigigo.orchextra:indoorpositioning:x.x.x'
implementation 'com.gigigo.orchextra:scanner:x.x.x'
Staging environment
stagingImplementation 'com.gigigo.orchextra:core:x.x.x-S'
stagingImplementation 'com.gigigo.orchextra:geofence:x.x.x-S'
stagingImplementation 'com.gigigo.orchextra:indoorpositioning:x.x.x-S'
stagingImplementation 'com.gigigo.orchextra:scanner:x.x.x-S'
Quality environment
debugImplementation 'com.gigigo.orchextra:core:x.x.x-Q'
debugImplementation 'com.gigigo.orchextra:geofence:x.x.x-Q'
debugImplementation 'com.gigigo.orchextra:indoorpositioning:x.x.x-Q'
debugImplementation 'com.gigigo.orchextra:scanner:x.x.x-Q'
Orchextra orchextra = Orchextra.INSTANCE;
orchextra.setStatusListener(orchextraStatusListener);
orchextra.setErrorListener(orchextraErrorListener);
OrchextraOptions options =
new OrchextraOptions.Builder().firebaseApiKey(config.getFirebaseApiKey())
.firebaseApplicationId(config.getFirebaseApplicationId())
.deviceBusinessUnits(deviceBusinessUnits)
.triggeringEnabled(true)
.anonymous(false)
.debuggable(true)
.build();
orchextra.init(getApplication(), apiKey, apiSecret, options);
orchextra.setScanTime(30);
orchextra.getTriggerManager().setGeofence(OxGeofenceImp.Factory.create(getApplication()));
orchextra.setNotificationActivityClass(MainActivity.class);
orchextra.setErrorListener(new OrchextraErrorListener() {
@Override public void onError(@NonNull Error error) {
hideLoading();
Log.e(TAG, error.toString());
Toast.makeText(EditActivity.this, "Error: " + error.getMessage(), Toast.LENGTH_SHORT)
.show();
}
});
orchextra.setOrchextraCustomActionListener(new CustomActionListener() {
@Override public void onCustomSchema(@NonNull String customSchema) {
Toast.makeText(MainActivity.this, "CustomSchema: " + customSchema, Toast.LENGTH_LONG)
.show();
}
});
orchextra.getToken(new OrchextraTokenReceiver() {
@Override public void onGetToken(@NonNull String oxToken) {
Toast.makeText(MainActivity.this, "Token:" + oxToken, Toast.LENGTH_SHORT).show();
}
});
Deploy Orchextra to Gigigo repository
Add bintray.user
and bintray.apikey
on your local.propeties
Update version
in dependencies.gradle
and execute deployLib
gradle command.
./gradlew deployLib
Copyright 2018 Orchextra
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.