diff --git a/README.md b/README.md
index 7391e72..2b9be41 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Gradle:
Add the dependency
```
- implementation 'com.whatspos.sdk:paxstore-3rd-app-android-sdk:9.4.1'
+ implementation 'com.whatspos.sdk:paxstore-3rd-app-android-sdk:9.5.0'
```
##### Tips: In the near future, our platform will only support applications integrated with sdk version v8.7.0 or higher. Please upgrade the sdk to the latest version as soon as possible
diff --git a/demo/build.gradle b/demo/build.gradle
index 0c077d1..2919b2c 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -6,8 +6,8 @@ android {
applicationId "com.pax.android.demoapp"
minSdkVersion 19
targetSdkVersion 31
- versionCode 1041
- versionName "9.4.1"
+ versionCode 1050
+ versionName "9.5.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
@@ -43,15 +43,13 @@ configurations.all {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'net.grandcentrix.tray:tray:0.12.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'org.slf4j:slf4j-android:1.7.25'
- implementation 'com.whatspos.sdk:paxstore-3rd-app-android-sdk:9.4.1'
+ implementation 'com.whatspos.sdk:paxstore-3rd-app-android-sdk:9.5.0'
//to download below imports, please add this to root build.gradle repositories >> maven { url 'https://jitpack.io' }
- implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'commons-io:commons-io:2.7'
diff --git a/demo/src/main/java/com/pax/android/demoapp/BaseApplication.java b/demo/src/main/java/com/pax/android/demoapp/BaseApplication.java
index bce27e1..592301f 100644
--- a/demo/src/main/java/com/pax/android/demoapp/BaseApplication.java
+++ b/demo/src/main/java/com/pax/android/demoapp/BaseApplication.java
@@ -10,7 +10,6 @@
import com.pax.market.android.app.sdk.StoreSdk;
import com.pax.market.android.app.sdk.msg.utils.Notifications;
-import net.grandcentrix.tray.AppPreferences;
/**
* Created by fojut on 2017/8/24.
@@ -29,7 +28,6 @@ public class BaseApplication extends Application {
//todo please make sure get the correct SN here, for pax device you can integrate NeptuneLite SDK to get the correct SN
- public static AppPreferences appPreferences;
@Override
@@ -37,8 +35,6 @@ public void onCreate() {
super.onCreate();
//initial the SDK
initStoreSdk();
- appPreferences = new AppPreferences(getApplicationContext()); // this Preference comes for free from the library
-
}
private void initStoreSdk() {
diff --git a/demo/src/main/java/com/pax/android/demoapp/DownloadParamService.java b/demo/src/main/java/com/pax/android/demoapp/DownloadParamService.java
index fa22031..a67eccb 100644
--- a/demo/src/main/java/com/pax/android/demoapp/DownloadParamService.java
+++ b/demo/src/main/java/com/pax/android/demoapp/DownloadParamService.java
@@ -87,8 +87,8 @@ protected void onHandleIntent(@Nullable Intent intent) {
//todo check the Error Code and Error Message for fail reason
Log.e(TAG, "ErrorCode: " + downloadResult.getBusinessCode() + "ErrorMessage: " + downloadResult.getMessage());
//update download fail info in main page for Demo
- spUtil.setString(DemoConstants.PUSH_RESULT_BANNER_TITLE, DemoConstants.DOWNLOAD_FAILED);
- spUtil.setString(DemoConstants.PUSH_RESULT_BANNER_TEXT, "Your push parameters file task failed at " + sdf.format(new Date()) + ", please check error log.");
+ spUtil.setString(getApplicationContext(), DemoConstants.PUSH_RESULT_BANNER_TITLE, DemoConstants.DOWNLOAD_FAILED);
+ spUtil.setString(getApplicationContext(), DemoConstants.PUSH_RESULT_BANNER_TEXT, "Your push parameters file task failed at " + sdf.format(new Date()) + ", please check error log.");
updateUI(DemoConstants.DOWNLOAD_STATUS_FAILED);
}
}
@@ -101,7 +101,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
}
private void readDataToDisplay() {
- spUtil.setString(DemoConstants.PUSH_RESULT_BANNER_TITLE, DemoConstants.DOWNLOAD_SUCCESS);
+ spUtil.setString(getApplicationContext(), DemoConstants.PUSH_RESULT_BANNER_TITLE, DemoConstants.DOWNLOAD_SUCCESS);
// get specific display data resource sys_cap.p
File parameterFile = getDisplayFile();
@@ -125,15 +125,15 @@ private void saveDisplayFileDataToSp(File parameterFile) {
String bannerSubTextValue = "Files are stored in " + parameterFile.getPath();
Log.i(TAG, "run=====: " + bannerTextValue);
//save result for demo display
- spUtil.setString(DemoConstants.PUSH_RESULT_BANNER_TEXT, bannerTextValue);
- spUtil.setString(DemoConstants.PUSH_RESULT_BANNER_SUBTEXT, bannerSubTextValue);
+ spUtil.setString(getApplicationContext(), DemoConstants.PUSH_RESULT_BANNER_TEXT, bannerTextValue);
+ spUtil.setString(getApplicationContext(), DemoConstants.PUSH_RESULT_BANNER_SUBTEXT, bannerSubTextValue);
List