Skip to content

Commit

Permalink
core sdk v2.0.110
Browse files Browse the repository at this point in the history
  • Loading branch information
poojamishra24 committed Apr 1, 2020
1 parent 5bf2f4c commit 6039825
Show file tree
Hide file tree
Showing 285 changed files with 793 additions and 320 deletions.
Binary file modified DemoApp/.DS_Store
Binary file not shown.
Binary file not shown.
116 changes: 116 additions & 0 deletions DemoApp/mist-sample-background/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions DemoApp/mist-sample-background/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions DemoApp/mist-sample-background/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion DemoApp/mist-sample-background/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 16 additions & 13 deletions DemoApp/mist-sample-background/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
applicationId "com.mist.sample.background"
minSdkVersion 21
targetSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
Expand All @@ -25,29 +26,31 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
implementation "org.java-websocket:Java-WebSocket:1.4.0"

// MistSDK
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

// Using jCenter
// implementation 'com.mist:core-sdk:1.5.0'
//---Mist SDK JCenter implementation
// implementation 'com.mist:core-sdk:2.0.110'
implementation "org.java-websocket:Java-WebSocket:1.4.0"

// Using AAR
implementation(name:'mist-mobile-sdk', ext:'aar')
// Note: In case, you are using Mist SDK manual installation, use the implementation below after adding the .aar files. Please comment the JCenter implementation because you can not both at the same time.
implementation(name:'mistsdk-framework', ext:'aar')
implementation(name:'mist-mobile', ext:'aar')

// Butterknife
// Butter knife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

// Gson
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.5'

// Picasso
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation 'com.google.guava:guava:23.3-android'

Expand Down
Binary file not shown.
Binary file modified DemoApp/mist-sample-background/app/libs/mist-mobile.aar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />

<uses-library android:name="org.apache.http.legacy" android:required="false" />


</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class HomeFragment extends Fragment {

public static final String TAG = HomeFragment.class.getSimpleName();

public static String portalSDKToken = "PHBpcMnTmO4akRTznjkYUTUL2NWy9zAq"; // REPLACE THIS TOKEN
public static String portalSDKToken = "";// REPLACE THIS MOBILE SDK SECRET TOKEN HERE
private HomeFragmentListener listner;

private Unbinder unbinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,21 +506,12 @@ public void onDestroyView() {
MistManager.newInstance(mainApplication).destroy();
}

@Override
public void onBeaconDetected(MSTBeacon[] mstBeacons, String s, Date date) {
// Not needed
}

@Override
public void onBeaconDetected(JSONArray beaconArray, Date dateUpdated) {
// Not needed
}

@Override
public void onBeaconListUpdated(HashMap<String, HashMap<Integer, Integer[]>> hashMap, Date date) {
// Not needed
}

@Override
public void onVirtualBeaconListUpdated(MSTVirtualBeacon[] virtualBeacons, Date dateUpdated) {
// Not needed
Expand All @@ -536,11 +527,6 @@ public void onClientInformationUpdated(String clientName) {
// Not needed
}

@Override
public void onReceivedSecret(String s, String s1, String s2, String s3) {
// Not needed
}

@Override
public void receivedLogMessageForCode(String message, MSTCentralManagerStatusCode code) {
// Not needed
Expand All @@ -561,18 +547,5 @@ public void onPressureUpdated(double pressure, Date dateUpdated) {
// Not needed
}

@Override
public void onZoneStatsUpdated(MSTZone[] mstZones, Date date) {
// Not needed
}

@Override
public void onClientUpdated(MSTClient[] mstClients, MSTZone[] mstZones, Date date) {
// Not needed
}

@Override
public void onAssetUpdated(MSTAsset[] mstAssets, MSTZone[] mstZones, Date date) {
// Not needed
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ public void init(String sdkToken, MSTCentralManagerIndoorOnlyListener indoorOnly
}
orgData = SharedPrefUtils.readConfig(mApp.get(), sdkToken);
if (orgData == null || orgData.getSdkSecret() == null || orgData.getSdkSecret().isEmpty()) {
if (mstOrgCredentialsManager == null) {
mstOrgCredentialsManager = new MSTOrgCredentialsManager(mApp.get(), this);
}
mstOrgCredentialsManager.enrollDeviceWithToken(sdkToken);

MSTOrgCredentialsManager.enrollDeviceWithToken(mApp.get(), sdkToken, this);
} else {
connect(indoorOnlyListener, appMode);
}
Expand All @@ -98,11 +94,11 @@ public void init(String sdkToken, MSTCentralManagerIndoorOnlyListener indoorOnly
*/
private synchronized void connect(MSTCentralManagerIndoorOnlyListener indoorOnlyListener, AppMode appMode) {
if (mstCentralManager == null) {
mstCentralManager = new MSTCentralManager(mApp.get(),
orgData.getOrgId(),
orgData.getSdkSecret(),
indoorOnlyListener);
try{

mstCentralManager = new MSTCentralManager(mApp.get(), orgData.getOrgId(), orgData.getSdkSecret());
mstCentralManager.setMSTCentralManagerIndoorOnlyListener(indoorOnlyListener);

try {
mstCentralManager.setEnvironment(Utils.getEnvironment(envType));
} catch (Exception e) {
Log.e(TAG, e.getLocalizedMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.text.TextUtils;
import android.util.Log;

import com.mist.sample.background.service.MSTSDKBackgroundService;

/**
* Created by anubhava on 02/04/18.
Expand Down Expand Up @@ -78,10 +77,15 @@ public static String getEnvironment(String envType) throws Exception {
env = "Production";
} else if (envType.charAt(0) == 'E') {
env = "EU";
} else if (envType.charAt(0) == 'K') {
env = "Kalam";
} else {
throw new Exception("Invalid environemnt is specified");
} else if (envType.charAt(0) == 'S') {
env = "Staging";
} else if (envType.charAt(0) == 'G') {
env = "GCP-Production";
} else if (envType.charAt(0) == 'g') {
env = "GCP-Staging";
}
else {
throw new Exception("Invalid environment is specified");
}
return env;
}
Expand All @@ -103,6 +107,6 @@ public static boolean isValidToken(String token) {
return (token.charAt(0) == 'P' ||
token.charAt(0) == 'S' ||
token.charAt(0) == 'E' ||
token.charAt(0) == 'K');
token.charAt(0) == 'G');
}
}
2 changes: 1 addition & 1 deletion DemoApp/mist-sample-background/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.2.1'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Apr 02 12:26:15 IST 2018
#Tue Jan 14 13:22:08 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Empty file modified DemoApp/mist-sample-indoor-location/.gitignore
100644 → 100755
Empty file.
Binary file not shown.
Loading

0 comments on commit 6039825

Please sign in to comment.