Change android package name and correct error notification token 🔨
continuous-integration/drone/push Build is passing Details

pull/59/head
Emre KARTAL 2 years ago
parent d4493fc128
commit a55e27c4f4

@ -28,7 +28,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.example.justmusic"
namespace "com.justdev.justmusic"
compileSdkVersion 33
ndkVersion flutter.ndkVersion
@ -48,7 +48,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.justmusic"
applicationId "com.justdev.justmusic"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 19

@ -12,6 +12,58 @@
"package_name": "com.example.justmusic"
}
},
"oauth_client": [
{
"client_id": "994903990520-a3im0ap1qqrs6j2u97v302v119e4jgbo.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.justmusic",
"certificate_hash": "b08e11598626ceeaaf75c6a3f71dce7af0846a07"
}
},
{
"client_id": "994903990520-tbbnoqubdo6eeo1d5iv94g7dofsdjnma.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.justmusic",
"certificate_hash": "883f6f500f08166c76009ec56ce77d98bb9fb831"
}
},
{
"client_id": "994903990520-rdk6ldrmbi71ddqt84qfhtuficm7ngon.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCjkofl0nvfzQqRZPv_-H99WoyYa7O660g"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "994903990520-9jsnq9ipdn7smk7tlbdd20i7j6sl3jcd.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.justmusic"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:994903990520:android:056f0394b9fb14410a9b0d",
"android_client_info": {
"package_name": "com.justdev.justmusic"
}
},
"oauth_client": [
{
"client_id": "994903990520-rdk6ldrmbi71ddqt84qfhtuficm7ngon.apps.googleusercontent.com",

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.justmusic">
package="com.justdev.justmusic">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.justmusic">
package="com.justdev.justmusic">
<application
android:label="JustMUSIC"
android:name="${applicationName}"

@ -1,4 +1,4 @@
package com.example.justmusic
package com.justdev.justmusic
import io.flutter.embedding.android.FlutterActivity

@ -33,17 +33,9 @@ class UserViewModel {
login(String pseudo, String password) async {
try {
var token;
await _authService.login(pseudo, password);
if (firebase_auth.FirebaseAuth.instance.currentUser!.emailVerified) {
await updateUserCurrent();
if (!kIsWeb) {
token = await FirebaseMessaging.instance.getToken();
if (_userCurrent.token != token) {
_userService.updateTokenNotify(_userCurrent.id, token);
_userCurrent.token = token;
}
}
} else {
throw ("Le mail n'a pas encore été vérifié");
}
@ -62,6 +54,14 @@ class UserViewModel {
final user = await MyApp.db.collection("users").doc(firebase_auth.FirebaseAuth.instance.currentUser?.uid).get();
User data = UserMapper.toModel(user);
_userCurrent = data;
if (!kIsWeb) {
var token;
token = await FirebaseMessaging.instance.getToken();
if (_userCurrent.token != token) {
_userService.updateTokenNotify(_userCurrent.id, token);
_userCurrent.token = token;
}
}
} catch (e) {
print(e);
}

Loading…
Cancel
Save