huawei integration added & code compatibility issues fix.
parent
6722e19cc5
commit
f20929b1dc
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"agcgw_all":{
|
||||||
|
"CN":"connect-drcn.dbankcloud.cn",
|
||||||
|
"CN_back":"connect-drcn.hispace.hicloud.com",
|
||||||
|
"DE":"connect-dre.dbankcloud.cn",
|
||||||
|
"DE_back":"connect-dre.hispace.hicloud.com",
|
||||||
|
"RU":"connect-drru.hispace.dbankcloud.ru",
|
||||||
|
"RU_back":"connect-drru.hispace.dbankcloud.cn",
|
||||||
|
"SG":"connect-dra.dbankcloud.cn",
|
||||||
|
"SG_back":"connect-dra.hispace.hicloud.com"
|
||||||
|
},
|
||||||
|
"websocketgw_all":{
|
||||||
|
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
|
||||||
|
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
|
||||||
|
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
|
||||||
|
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
|
||||||
|
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
|
||||||
|
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
|
||||||
|
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
|
||||||
|
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
|
||||||
|
},
|
||||||
|
"client":{
|
||||||
|
"cp_id":"2640966000002322881",
|
||||||
|
"product_id":"388421841222408054",
|
||||||
|
"client_id":"1492841575221308864",
|
||||||
|
"client_secret":"9F5ABC6C041C90D9CFC2DB4B032E224026C566D30147D22CC25789DAFF393B14",
|
||||||
|
"project_id":"388421841222408054",
|
||||||
|
"app_id":"111820283",
|
||||||
|
"api_key":"DQEDACmCXaRhehJz6Col9ZoLjfEmJCZn2/FIsIDJccmzQmq61gFYr7msISoMMgprtwaxo5vZ4Gyn2TIj6Y7v+sd1IGqforIJaKyaPA==",
|
||||||
|
"package_name":"com.hmg.atoms"
|
||||||
|
},
|
||||||
|
"oauth_client":{
|
||||||
|
"client_id":"111820283",
|
||||||
|
"client_type":1
|
||||||
|
},
|
||||||
|
"app_info":{
|
||||||
|
"app_id":"111820283",
|
||||||
|
"package_name":"com.hmg.atoms"
|
||||||
|
},
|
||||||
|
"configuration_version":"3.0",
|
||||||
|
"appInfos":[
|
||||||
|
{
|
||||||
|
"package_name":"com.hmg.atoms",
|
||||||
|
"client":{
|
||||||
|
"app_id":"111820283"
|
||||||
|
},
|
||||||
|
"app_info":{
|
||||||
|
"package_name":"com.hmg.atoms",
|
||||||
|
"app_id":"111820283"
|
||||||
|
},
|
||||||
|
"oauth_client":{
|
||||||
|
"client_type":1,
|
||||||
|
"client_id":"111820283"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.example.test_sa;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.huawei.hms.push.HmsMessageService;
|
||||||
|
import com.huawei.hms.push.RemoteMessage;
|
||||||
|
|
||||||
|
public class HService extends HmsMessageService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||||
|
super.onMessageReceived(remoteMessage);
|
||||||
|
|
||||||
|
if (remoteMessage != null) {
|
||||||
|
System.out.println("remote:"+remoteMessage.getData());
|
||||||
|
if (!remoteMessage.getData().isEmpty()) {
|
||||||
|
Log.d("HMS", "Payload" + remoteMessage.getData());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remoteMessage.getNotification() != null) {
|
||||||
|
Log.d("HMS", "Message Notification Body: " + remoteMessage.getNotification().getBody());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,32 +1,52 @@
|
|||||||
//buildscript {
|
buildscript {
|
||||||
// ext.kotlin_version = '1.8.20'
|
ext.kotlin_version = '1.9.25'
|
||||||
// repositories {
|
repositories {
|
||||||
// google()
|
google()
|
||||||
// mavenCentral()
|
mavenCentral()
|
||||||
// }
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
//
|
}
|
||||||
// dependencies {
|
|
||||||
// classpath 'com.android.tools.build:gradle:7.1.2'
|
|
||||||
// classpath 'com.google.gms:google-services:4.3.13'
|
|
||||||
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "com.android.tools.build:gradle:7.1.2"
|
||||||
|
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.force 'androidx.appcompat:appcompat:1.3.0'
|
||||||
|
}
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.buildDir = '../build'
|
rootProject.buildDir = '../build'
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
afterEvaluate { project ->
|
||||||
|
if (project.plugins.hasPlugin("com.android.application") ||
|
||||||
|
project.plugins.hasPlugin("com.android.library")) {
|
||||||
|
project.android {
|
||||||
|
compileSdkVersion 34
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
subprojects {
|
subprojects {
|
||||||
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//subprojects {
|
||||||
|
// project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
|
//}
|
||||||
|
//subprojects {
|
||||||
|
// project.evaluationDependsOn(':app')
|
||||||
|
//}
|
||||||
|
|
||||||
tasks.register("clean", Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx2048m
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|||||||
Loading…
Reference in New Issue