What?
hi,
Is it possible for me to configure the onsignal platform with Traccar services? Because I saw that by the documentation only firebase
hi,
I am using firebase but I am having this message.
Invalid PKCS#8 data. - IOException (... < NotificatorFirebase:79 < <gener:-1 < *:-1 < ... < NotificatorManager:70 < ...)
Traccar.xml
<entry key='notificator.firebase.serviceAccount'>
{
"type": "service_account",
"project_id": "name",
"private_key_id": "****88787878hb****989uf9d98d***",
"private_key": "-----BEGIN PRIVATE KEY-----\*********************\n-----END PRIVATE KEY-----\n"
"client_email": "878787878787877-apps.googleusercontent.com",
"client_id": "878787878787877"
}
</entry>
There must be some issue with your firebase configuration.
hi,
In firebase I send a test message and it arrives in the app. I'm thinking it must be a detail.
Are there any other parameters that I'm missing?
hi,
I managed to download the correct file with all the information. But now there is no error but the push notification does not arrive in the app.
remembering that if I send it through the firebase link, the notification arrives in the app
now i'm in this phase here
https://www.traccar.org/forums/topic/firebase-traccar-55-push-notifications/
I think it's missing to put this code in the app
FileInputStream serviceAccount =
new FileInputStream("path/to/serviceAccountKey.json");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.build();
FirebaseApp.initializeApp(options);
i found this
app>build.gradle
if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
task copyJson(type: Copy) {
from '../../environment/google-services'
into '.'
include 'traccar-manager-android.json'
rename('traccar-manager-android.json', 'google-services.json')
}
afterEvaluate {
preBuild.dependsOn copyJson
}
}
hi
I found the file to download the correct file with all the information. But now there is no error but the push notification does not arrive in the app.
Remembering that if I send it through the firebase website, the test notification arrives in the app
Do you have any suggestions for me to look into?
<!--FIREBASE-->
<entry key='notificator.firebase.serviceAccount'>
{
"type": "service_account",
"project_id": "namxxx",
"private_key_id": "88787878",
"private_key": "-----BEGIN PRIVATE KEY--xxxxxxxx---\87878787878787/",
"client_email": "firebase-admixxxxxxx@.gserviceaccount.com",
"client_id": "99898xxxxxxx9898989",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-admi.xxxxxxxgserviceaccount.com",
"universe_domain": "googleapis.com"
}
</entry>
Check if your user has the notification token.
"user has the notification token."
where can i see this?
In user attributes.
I found it and saw that there is a token there! Do I replace it with another value?
hi
Notification Push One Signal is possible?