Commit 7613d990 by Kim Jinsung

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

parent c8119673
......@@ -59,11 +59,11 @@
</intent-filter>
</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>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"></action>
</intent-filter>
</service>
</service-->
<receiver android:name="jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver" android:exported="true">
<intent-filter>
......@@ -95,7 +95,7 @@
</provider>
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
......
......@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
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'
dependencies {
implementation project(':ABVJE_UI_Android')
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.0'
}
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
buildToolsVersion '30.0.2'
defaultConfig {
minSdkVersion 23
......@@ -80,7 +80,8 @@ android {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions "default" // OK
......@@ -133,23 +134,27 @@ android {
}
import org.ajoberstar.grgit.*
task gitInfo << {
description 'update githash.txt with current hash'
def grgit = Grgit.open(project.file('..'))
def gitfile=file('assets/githash.txt')
gitfile.write grgit.head().id
task gitInfo {
doLast {
description 'update githash.txt with current hash'
def grgit = Grgit.open(project.file('..'))
def gitfile = file('assets/githash.txt')
gitfile.write grgit.head().id
}
}
preBuild.dependsOn gitInfo
task convertToPackage << {
description 'convert to package for google-services.json'
def appModuleRootFolder = '.'
def googleServicesJson = 'google-services.json'
copy {
from "fcm"
include "$googleServicesJson"
into "$appModuleRootFolder"
expand PACKAGE_NAME : app_custompackagename
task convertToPackage {
doLast {
description 'convert to package for google-services.json'
def appModuleRootFolder = '.'
def googleServicesJson = 'google-services.json'
copy {
from "fcm"
include "$googleServicesJson"
into "$appModuleRootFolder"
expand PACKAGE_NAME : app_custompackagename
}
}
}
preBuild.dependsOn convertToPackage
......
......@@ -7,7 +7,7 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
buildToolsVersion '30.0.2'
defaultConfig {
minSdkVersion 23
......
......@@ -8,12 +8,12 @@ apply plugin: 'com.android.library'
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.0'
implementation project(':ABVJE_BL')
implementation project(':ABVJE_Res_Default_Android')
api 'com.google.firebase:firebase-core:11.4.0'
api 'com.google.firebase:firebase-messaging:11.4.0'
api 'com.android.support:appcompat-v7:21.0.+'
api 'com.google.firebase:firebase-core:21.1.1'
api 'com.google.firebase:firebase-messaging:23.0.8'
api 'androidx.appcompat:appcompat:1.0.0'
implementation 'commons-codec:commons-codec:1.10'
implementation 'net.lingala.zip4j:zip4j:1.3.2'
implementation 'com.google.guava:guava:18.0'
......@@ -27,7 +27,7 @@ dependencies {
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
buildToolsVersion '30.0.2'
defaultConfig {
minSdkVersion 23
......
package jp.agentec.abook.abv.cl.push;
import com.google.firebase.iid.FirebaseInstanceIdService;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
public class ABVInstanceIDListenerService extends FirebaseInstanceIdService {
private static final String TAG = "ABVInstanceID";
@Override
public void onTokenRefresh() {
Logger.i(TAG, "onTokenRefresh()");
PreferenceUtil.putUserPref(this, AppDefType.UserPrefKey.NEED_SEND_TOKEN, true);
}
}
//package jp.agentec.abook.abv.cl.push;
//
//import com.google.firebase.iid.FirebaseInstanceIdService;
//
//import jp.agentec.abook.abv.bl.common.log.Logger;
//
//import jp.agentec.abook.abv.cl.util.PreferenceUtil;
//import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
//
//
//public class ABVInstanceIDListenerService extends FirebaseInstanceIdService {
// private static final String TAG = "ABVInstanceID";
//
// @Override
// public void onTokenRefresh() {
// Logger.i(TAG, "onTokenRefresh()");
// PreferenceUtil.putUserPref(this, AppDefType.UserPrefKey.NEED_SEND_TOKEN, true);
// }
//
//}
......@@ -2,7 +2,7 @@ package jp.agentec.abook.abv.cl.push;
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.cl.util.ThreadUtil;
......@@ -27,7 +27,8 @@ public class FcmManager {
}
private static String getFcmTokenWithRetryCount(int retryCount) {
String token = FirebaseInstanceId.getInstance().getToken();
// String token = FirebaseInstanceId.getInstance().getToken();
String token = "dafss";
if (token != null) {
return token;
}
......@@ -37,7 +38,7 @@ public class FcmManager {
ThreadUtil.sleep(1000);// 1sec
count++;
Logger.d("FcmManager", "[getFcmTokenWithRetry]:retry_count=" + count);
token = FirebaseInstanceId.getInstance().getToken();
// token = FirebaseInstanceId.getInstance().getToken();
}
return token;
......
......@@ -3,8 +3,8 @@ package jp.agentec.abook.abv.launcher.android;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;
import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.log.Logger;
......
......@@ -13,7 +13,7 @@ import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.support.v4.content.FileProvider;
import androidx.core.content.FileProvider;
import android.util.Log;
import android.widget.Toast;
......
......@@ -32,7 +32,7 @@ import android.widget.PopupWindow;
import android.widget.ScrollView;
import android.widget.TextView;
import com.google.firebase.iid.FirebaseInstanceId;
//import com.google.firebase.iid.FirebaseInstanceId;
import com.google.zxing.WriterException;
import org.xwalk.core.XWalkView;
......@@ -160,8 +160,9 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 更新されてない
return;
}
String fcmToken = FirebaseInstanceId.getInstance().getToken();
boolean isSendSuccess = false;
// String fcmToken = FirebaseInstanceId.getInstance().getToken();
String fcmToken = "abc";
boolean isSendSuccess = false;
// CMSに送信
if (getRInteger(R.integer.push_message) == 1 && fcmToken != null) {
try {
......
......@@ -4,7 +4,7 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import androidx.core.app.ActivityCompat;
import android.view.View;
import java.io.IOException;
......@@ -12,7 +12,6 @@ import java.io.InputStream;
import java.io.OutputStream;
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.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
......
package jp.agentec.abook.abv.ui.home.helper;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
......@@ -10,7 +8,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import java.util.ArrayList;
......
......@@ -10,7 +10,7 @@ import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.support.v4.content.FileProvider;
import androidx.core.content.FileProvider;
import android.webkit.MimeTypeMap;
import android.widget.Toast;
......
......@@ -6,7 +6,7 @@ buildscript {
google()
}
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
// in the individual module build.gradle files
}
......
......@@ -127,4 +127,6 @@ BLJAR_NAME=ABVJE_BL.jar
#store用の場合、armv7,x86両方ビルド
#storeではない場合、armv7のみビルド
isStoreProduct=false
\ No newline at end of file
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
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
buildToolsVersion '30.0.2'
defaultConfig {
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