Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #238 from NIFCLOUD-mbaas/develop
Browse files Browse the repository at this point in the history
Release v4.0.1
  • Loading branch information
morisatoru authored Apr 12, 2021
2 parents 1c1e865 + 153c2ee commit 1b135ef
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 33 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Android

on: [push, pull_request]

jobs:
build_and_test:

runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: build and test
run: cd ncmb-core && ./gradlew build test --continue --info
9 changes: 5 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gradle projectsタブの `ncmb-core > Tasks > other > makejar` を実行する
## 動作環境

本SDKは、Android 7.x ~ 11.x, Android Studio 4.x にて動作確認を行っております。
(※2021年1月時点)
(※2021年4月時点)

## テクニカルサポート窓口対応バージョン

Expand All @@ -45,7 +45,7 @@ Gradle projectsタブの `ncmb-core > Tasks > other > makejar` を実行する
※なお、mobile backend にて大規模な改修が行われた際は、1年半以内のSDKであっても対応出来ない場合がございます。<br>
その際は[informationブログ](https://mbaas.nifcloud.com/info/)にてお知らせいたします。予めご了承ください。

- v3.0.3 ~ (※2021年1月時点)
- v3.0.4 ~ (※2021年4月時点)

## インストール

Expand Down Expand Up @@ -105,6 +105,7 @@ obj.saveInBackground(new DoneCallback() {

## 参考URL集

- [ニフクラ mobile backend](https://mbaas.nifcloud.com)
- [ドキュメント](https://mbaas.nifcloud.com/doc/current)
- [ニフクラ mobile backend](https://mbaas.nifcloud.com/)
- [SDKの詳細な使い方](https://mbaas.nifcloud.com/doc/current/)
- [サンプル&チュートリアル](https://mbaas.nifcloud.com/doc/current/tutorial/tutorial_android.html)
- [ユーザーコミュニティ](https://github.com/NIFCLOUD-mbaas/UserCommunity)
2 changes: 1 addition & 1 deletion ncmb-core/src/main/java/com/nifcloud/mbaas/core/NCMB.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class NCMB {
/**
* Version of this SDK
*/
public static final String SDK_VERSION = "4.0.0";
public static final String SDK_VERSION = "4.0.1";

/**
* Prefix of keys in metadata for NCMB settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public void done(NCMBException saveErr) {
} else if (NCMBException.DATA_NOT_FOUND.equals(saveErr.getCode())) {
//保存失敗 : 端末情報の該当データがない
reRegistInstallation(installation);
} else {
DeviceTokenCallbackQueue.getInstance().execQueue(token,saveErr);
}
}
});
Expand Down Expand Up @@ -112,20 +114,22 @@ private static void updateInstallation(final NCMBInstallation installation) {
@Override
public void done(List<NCMBInstallation> results, NCMBException e) {

//検索された端末情報のobjectIdを設定
try {
installation.setObjectId(results.get(0).getObjectId());
} catch (NCMBException searchErr) {
if (results.size() > 0) {
//検索された端末情報のobjectIdを設定
try {
installation.setObjectId(results.get(0).getObjectId());
} catch (NCMBException searchErr) {

}

//端末情報を更新する
installation.saveInBackground(new DoneCallback() {
@Override
public void done(NCMBException e) {
DeviceTokenCallbackQueue.getInstance().execQueue(installation.getLocalDeviceToken(),null);
}
});

//端末情報を更新する
installation.saveInBackground(new DoneCallback() {
@Override
public void done(NCMBException e) {
DeviceTokenCallbackQueue.getInstance().execQueue(installation.getLocalDeviceToken(), null);
}
});
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"objectId":"7FrmPTBKSNtVjajm","createDate":"2014-06-03T11:28:30.348Z","updateDate":"2014-06-03T11:28:30.348Z","acl":{},"sdkVersion":"4.0.0","timeZone":"Asia/Tokyo","deviceType":"android","deviceType":"android","badge":0,"applicationName":"ncmb-core","appVersion":"1.0","deviceToken":"xxxxxxxxxxxxxxxxxxx","channels":["Ch1"],"key":"value","pushType":"fcm"}
{"objectId":"7FrmPTBKSNtVjajm","createDate":"2014-06-03T11:28:30.348Z","updateDate":"2014-06-03T11:28:30.348Z","acl":{},"sdkVersion":"4.0.1","timeZone":"Asia/Tokyo","deviceType":"android","deviceType":"android","badge":0,"applicationName":"ncmb-core","appVersion":"1.0","deviceToken":"xxxxxxxxxxxxxxxxxxx","channels":["Ch1"],"key":"value","pushType":"fcm"}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"channels": [],
"timeZone": "Asia\/Tokyo",
"applicationName": "UnitTestApp",
"sdkVersion": "4.0.0",
"sdkVersion": "4.0.1",
"deviceToken": "dummyDeviceToken01",
"acl": {
"*": {
Expand All @@ -29,7 +29,7 @@
"channels": [],
"timeZone": "Asia\/Tokyo",
"applicationName": "UnitTestApp",
"sdkVersion": "4.0.0",
"sdkVersion": "4.0.1",
"deviceToken": "dummyDeviceToken02",
"acl": {
"*": {
Expand Down
24 changes: 12 additions & 12 deletions ncmb-core/src/test/assets/yaml/mbaas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "Asia/Tokyo"
pushType: "fcm"
response:
Expand All @@ -148,7 +148,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "Etc/UTC"
key: "value"
pushType: "fcm"
Expand All @@ -164,7 +164,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "UTC"
key: "value"
pushType: "fcm"
Expand All @@ -181,7 +181,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "Asia/Tokyo"
pushType: "fcm"
response:
Expand All @@ -197,7 +197,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "Etc/UTC"
pushType: "fcm"
response:
Expand All @@ -213,7 +213,7 @@
deviceType: "android"
applicationName: "ncmb-core"
appVersion: "1.0"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
timeZone: "UTC"
pushType: "fcm"
response:
Expand Down Expand Up @@ -241,7 +241,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "Asia/Tokyo"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
pushType: "fcm"
response:
Expand All @@ -255,7 +255,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "Asia/Tokyo"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
key: "value_update"
pushType: "fcm"
Expand All @@ -270,7 +270,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "Etc/UTC"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
pushType: "fcm"
response:
Expand All @@ -284,7 +284,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "UTC"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
pushType: "fcm"
response:
Expand All @@ -298,7 +298,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "Etc/UTC"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
key: "value_update"
pushType: "fcm"
Expand All @@ -313,7 +313,7 @@
deviceType: "android"
appVersion: "1.0"
timeZone: "UTC"
sdkVersion: "4.0.0"
sdkVersion: "4.0.1"
applicationName: "ncmb-core"
key: "value_update"
pushType: "fcm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ public void currentInstallation_v1_From_v2() throws Exception {
JSONObject updateJson = installationService.updateInstallation(currentInstallation.getObjectId(), null);
Assert.assertEquals("2014-06-04T11:28:30.348Z", updateJson.getString("updateDate"));
currentInstallation = NCMBInstallation.getCurrentInstallation();
Assert.assertEquals("4.0.0", currentInstallation.getSDKVersion());
Assert.assertEquals("4.0.1", currentInstallation.getSDKVersion());
}

/*
Expand Down

0 comments on commit 1b135ef

Please sign in to comment.