Commit 7613d990 by Kim Jinsung

初回アプリ起動時、落ちる問題の仮対応

parent c8119673
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
</intent-filter> </intent-filter>
</service> </service>
<service android:name="jp.agentec.abook.abv.cl.push.ABVInstanceIDListenerService" android:exported="true"> <!--service android:name="jp.agentec.abook.abv.cl.push.ABVInstanceIDListenerService" android:exported="true">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"></action> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"></action>
</intent-filter> </intent-filter>
</service> </service-->
<receiver android:name="jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver" android:exported="true"> <receiver android:name="jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver" android:exported="true">
<intent-filter> <intent-filter>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</provider> </provider>
<provider <provider
android:name="android.support.v4.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider" android:authorities="${applicationId}.provider"
android:exported="false" android:exported="false"
android:grantUriPermissions="true"> android:grantUriPermissions="true">
......
...@@ -4,7 +4,7 @@ buildscript { ...@@ -4,7 +4,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'org.ajoberstar:gradle-git:0.12+' classpath 'org.ajoberstar:gradle-git:0.12+'
classpath 'com.google.gms:google-services:3.1.0' classpath 'com.google.gms:google-services:4.0.1'
} }
} }
...@@ -13,12 +13,12 @@ apply plugin: 'com.google.gms.google-services' ...@@ -13,12 +13,12 @@ apply plugin: 'com.google.gms.google-services'
dependencies { dependencies {
implementation project(':ABVJE_UI_Android') implementation project(':ABVJE_UI_Android')
implementation 'com.android.support:multidex:1.0.3' implementation 'androidx.multidex:multidex:2.0.0'
} }
android { android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '31.0.0' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
...@@ -80,7 +80,8 @@ android { ...@@ -80,7 +80,8 @@ android {
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
} }
flavorDimensions "default" // OK flavorDimensions "default" // OK
...@@ -133,15 +134,18 @@ android { ...@@ -133,15 +134,18 @@ android {
} }
import org.ajoberstar.grgit.* import org.ajoberstar.grgit.*
task gitInfo << { task gitInfo {
doLast {
description 'update githash.txt with current hash' description 'update githash.txt with current hash'
def grgit = Grgit.open(project.file('..')) def grgit = Grgit.open(project.file('..'))
def gitfile=file('assets/githash.txt') def gitfile = file('assets/githash.txt')
gitfile.write grgit.head().id gitfile.write grgit.head().id
}
} }
preBuild.dependsOn gitInfo preBuild.dependsOn gitInfo
task convertToPackage << { task convertToPackage {
doLast {
description 'convert to package for google-services.json' description 'convert to package for google-services.json'
def appModuleRootFolder = '.' def appModuleRootFolder = '.'
def googleServicesJson = 'google-services.json' def googleServicesJson = 'google-services.json'
...@@ -151,6 +155,7 @@ task convertToPackage << { ...@@ -151,6 +155,7 @@ task convertToPackage << {
into "$appModuleRootFolder" into "$appModuleRootFolder"
expand PACKAGE_NAME : app_custompackagename expand PACKAGE_NAME : app_custompackagename
} }
}
} }
preBuild.dependsOn convertToPackage preBuild.dependsOn convertToPackage
......
...@@ -7,7 +7,7 @@ apply plugin: 'com.android.library' ...@@ -7,7 +7,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '31.0.0' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
......
...@@ -8,12 +8,12 @@ apply plugin: 'com.android.library' ...@@ -8,12 +8,12 @@ apply plugin: 'com.android.library'
dependencies { dependencies {
implementation 'com.android.support:multidex:1.0.3' implementation 'androidx.multidex:multidex:2.0.0'
implementation project(':ABVJE_BL') implementation project(':ABVJE_BL')
implementation project(':ABVJE_Res_Default_Android') implementation project(':ABVJE_Res_Default_Android')
api 'com.google.firebase:firebase-core:11.4.0' api 'com.google.firebase:firebase-core:21.1.1'
api 'com.google.firebase:firebase-messaging:11.4.0' api 'com.google.firebase:firebase-messaging:23.0.8'
api 'com.android.support:appcompat-v7:21.0.+' api 'androidx.appcompat:appcompat:1.0.0'
implementation 'commons-codec:commons-codec:1.10' implementation 'commons-codec:commons-codec:1.10'
implementation 'net.lingala.zip4j:zip4j:1.3.2' implementation 'net.lingala.zip4j:zip4j:1.3.2'
implementation 'com.google.guava:guava:18.0' implementation 'com.google.guava:guava:18.0'
...@@ -27,7 +27,7 @@ dependencies { ...@@ -27,7 +27,7 @@ dependencies {
android { android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '31.0.0' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
......
package jp.agentec.abook.abv.cl.push; //package jp.agentec.abook.abv.cl.push;
//
import com.google.firebase.iid.FirebaseInstanceIdService; //import com.google.firebase.iid.FirebaseInstanceIdService;
//
import jp.agentec.abook.abv.bl.common.log.Logger; //import jp.agentec.abook.abv.bl.common.log.Logger;
//
import jp.agentec.abook.abv.cl.util.PreferenceUtil; //import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; //import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
//
//
public class ABVInstanceIDListenerService extends FirebaseInstanceIdService { //public class ABVInstanceIDListenerService extends FirebaseInstanceIdService {
private static final String TAG = "ABVInstanceID"; // private static final String TAG = "ABVInstanceID";
//
@Override // @Override
public void onTokenRefresh() { // public void onTokenRefresh() {
Logger.i(TAG, "onTokenRefresh()"); // Logger.i(TAG, "onTokenRefresh()");
PreferenceUtil.putUserPref(this, AppDefType.UserPrefKey.NEED_SEND_TOKEN, true); // PreferenceUtil.putUserPref(this, AppDefType.UserPrefKey.NEED_SEND_TOKEN, true);
} // }
//
} //}
...@@ -2,7 +2,7 @@ package jp.agentec.abook.abv.cl.push; ...@@ -2,7 +2,7 @@ package jp.agentec.abook.abv.cl.push;
import android.content.Context; import android.content.Context;
import com.google.firebase.iid.FirebaseInstanceId; //import com.google.firebase.iid.FirebaseInstanceId;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.cl.util.ThreadUtil; import jp.agentec.abook.abv.cl.util.ThreadUtil;
...@@ -27,7 +27,8 @@ public class FcmManager { ...@@ -27,7 +27,8 @@ public class FcmManager {
} }
private static String getFcmTokenWithRetryCount(int retryCount) { private static String getFcmTokenWithRetryCount(int retryCount) {
String token = FirebaseInstanceId.getInstance().getToken(); // String token = FirebaseInstanceId.getInstance().getToken();
String token = "dafss";
if (token != null) { if (token != null) {
return token; return token;
} }
...@@ -37,7 +38,7 @@ public class FcmManager { ...@@ -37,7 +38,7 @@ public class FcmManager {
ThreadUtil.sleep(1000);// 1sec ThreadUtil.sleep(1000);// 1sec
count++; count++;
Logger.d("FcmManager", "[getFcmTokenWithRetry]:retry_count=" + count); Logger.d("FcmManager", "[getFcmTokenWithRetry]:retry_count=" + count);
token = FirebaseInstanceId.getInstance().getToken(); // token = FirebaseInstanceId.getInstance().getToken();
} }
return token; return token;
......
...@@ -3,8 +3,8 @@ package jp.agentec.abook.abv.launcher.android; ...@@ -3,8 +3,8 @@ package jp.agentec.abook.abv.launcher.android;
import android.app.Activity; import android.app.Activity;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
import android.support.multidex.MultiDex; import androidx.multidex.MultiDex;
import android.support.multidex.MultiDexApplication; import androidx.multidex.MultiDexApplication;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
......
...@@ -13,7 +13,7 @@ import android.database.Cursor; ...@@ -13,7 +13,7 @@ import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Environment; import android.os.Environment;
import android.support.v4.content.FileProvider; import androidx.core.content.FileProvider;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
......
...@@ -32,7 +32,7 @@ import android.widget.PopupWindow; ...@@ -32,7 +32,7 @@ import android.widget.PopupWindow;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.TextView; import android.widget.TextView;
import com.google.firebase.iid.FirebaseInstanceId; //import com.google.firebase.iid.FirebaseInstanceId;
import com.google.zxing.WriterException; import com.google.zxing.WriterException;
import org.xwalk.core.XWalkView; import org.xwalk.core.XWalkView;
...@@ -160,7 +160,8 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -160,7 +160,8 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 更新されてない // 更新されてない
return; return;
} }
String fcmToken = FirebaseInstanceId.getInstance().getToken(); // String fcmToken = FirebaseInstanceId.getInstance().getToken();
String fcmToken = "abc";
boolean isSendSuccess = false; boolean isSendSuccess = false;
// CMSに送信 // CMSに送信
if (getRInteger(R.integer.push_message) == 1 && fcmToken != null) { if (getRInteger(R.integer.push_message) == 1 && fcmToken != null) {
......
...@@ -4,7 +4,7 @@ import android.content.DialogInterface; ...@@ -4,7 +4,7 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnClickListener;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import android.view.View; import android.view.View;
import java.io.IOException; import java.io.IOException;
...@@ -12,7 +12,6 @@ import java.io.InputStream; ...@@ -12,7 +12,6 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import jp.agentec.abook.abv.bl.acms.type.LoginMode;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
......
package jp.agentec.abook.abv.ui.home.helper; package jp.agentec.abook.abv.ui.home.helper;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
...@@ -10,7 +8,7 @@ import android.content.pm.PackageManager; ...@@ -10,7 +8,7 @@ import android.content.pm.PackageManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.provider.Settings; import android.provider.Settings;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -10,7 +10,7 @@ import android.content.res.Configuration; ...@@ -10,7 +10,7 @@ import android.content.res.Configuration;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.support.v4.content.FileProvider; import androidx.core.content.FileProvider;
import android.webkit.MimeTypeMap; import android.webkit.MimeTypeMap;
import android.widget.Toast; import android.widget.Toast;
......
...@@ -6,7 +6,7 @@ buildscript { ...@@ -6,7 +6,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.6.4'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
......
...@@ -128,3 +128,5 @@ BLJAR_NAME=ABVJE_BL.jar ...@@ -128,3 +128,5 @@ BLJAR_NAME=ABVJE_BL.jar
#store用の場合、armv7,x86両方ビルド #store用の場合、armv7,x86両方ビルド
#storeではない場合、armv7のみビルド #storeではない場合、armv7のみビルド
isStoreProduct=false isStoreProduct=false
android.useAndroidX=true
android.enableJetifier=true
\ No newline at end of file
#Tue Feb 19 17:59:22 JST 2019 #Fri Oct 14 17:44:58 KST 2022
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '31.0.0' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment