...
project/build.gradle
dosyanızdaki ikirepositories
bölümüne bölümlerine alttaki satırı satırları ekleyin.Code Block maven {url 'https://jitpack.io'} maven { url 'http://developer.huawei.com/repo/'} // skip if your app does not support HMSallowInsecureProtocol(true) }
project/build.gradle
dosyanızdakidependencies
bölümüne alttaki satırları ekleyin.Code Block language none classpath 'com.google.gms:google-services:4.3.10' classpath 'com.huawei.agconnect:agcp:1.6.5.300' // skip if your app does not support HMS
app/build.gradle
dosyanızın en altına alttaki satırları ekleyin.Code Block apply plugin: 'com.google.gms.google-services' apply plugin: 'com.huawei.agconnect' // skip if your app does not support HMS
app/build.gradle
dosyanızındefaultConfig
alanındakiminSdkVersion
değerini21
olarak düzenleyin.app/build.gradle
dosyanızdakitargetSdkVersion
vecompileSdkVersion
değerini32
olarak düzenleyin.AndroidManifest.xml
dosyanızın<application></application>
etiketleri arasına alttaki satırları ekleyin.Code Block language xml <service android:name="euromsg.com.euromobileandroid.service.EuroFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <!-- skip if your app does not support HMS --> <service android:name="euromsg.com.euromobileandroid.service.EuroHuaweiMessagingService" android:exported="false"> <intent-filter> <action android:name="com.huawei.push.action.MESSAGING_EVENT" /> </intent-filter> </service>
AndroidManifest.xml
dosyanıza aşağıdaki meta veri parametrelerini ekleyinCode Block language xml <meta-data android:name="GoogleAppAlias" android:value="google-app-alias" /> <meta-data android:name="HuaweiAppAlias" android:value="huawei-app-alias" /> <meta-data android:name="VisilabsOrganizationID" android:value="VisilabsOrganizationID" /> <meta-data android:name="VisilabsSiteID" android:value="VisilabsSiteID" /> <meta-data android:name="VisilabsSegmentURL" android:value="http://lgr.visilabs.net" /> <meta-data android:name="VisilabsDataSource" android:value="VisilabsDataSource" /> <meta-data android:name="VisilabsRealTimeURL" android:value="http://rt.visilabs.net" /> <meta-data android:name="VisilabsChannel" android:value="Android" /> <meta-data android:name="VisilabsGeofenceURL" android:value="http://s.visilabs.net/geojson" /> <meta-data android:name="VisilabsGeofenceEnabled" android:value="true" /> <!-- Parameters below are optional --> <meta-data android:name="VisilabsRequestTimeoutInSeconds" android:value="30" /> <meta-data android:name="VisilabsRESTURL" android:value="VisilabsRESTURL" /> <meta-data android:name="VisilabsEncryptedDataSource" android:value="VisilabsEncryptedDataSource" /> <meta-data android:name="VisilabsTargetURL" android:value="http://s.visilabs.net/json" /> <meta-data android:name="VisilabsActionURL" android:value="http://s.visilabs.net/actjson" />
Firebase panelinden alacağınız
google-services.json
dosyasını projenizinandroid/app
dizinine ekleyin.Uygulamanızda
HMS
desteği varsaagconnect-services.json
dosyasınıandroid/app
dizinine ekleyin.
...