このURL(https://docs.monaca.io/ja/tutorials/phonegap_push/)の通りにFirebaseからgoogle-services.jsonを取得し、
追加してますが、「push.on('registration'」を実行時にpushプラグイン上、
「gcm_defaultSenderId」を取得する箇所で、以下のエラーが出て返却されており、
原因がわからず困っています。
「No package identifier when getting value for resource number 0x00000000
execute: Got Resources NotFoundException String resource ID #0x0」
google-service.jsonは、config.xmlと同場所に
config.xmlのandroidの箇所に以下は追加しております。
<resource-file src="google-services.json" target="google-services.json" />
<resource-file src="google-services.json" target="app/google-services.json" />
cordova version:7.1.0
phonegap-plugin-push:2.1.3
js
1var push = PushNotification.init({ 2 android: { 3 senderID: '123456' /*←適当なものを設定してます。*/ 4 }, 5 ios: { 6 senderID: '123456', 7 alert: "true", 8 badge: "true", 9 sound: "true" 10 // }, 11 // windows: { 12 } 13 }); 14 15 push.on('error', function(e) { 16 console.log(e.message); 17 }); 18 19 console.log("pushon registration"); 20 // デバイストークン取得時のイベント 21 push.on('registration', function(data) { 22 console.log("registration"); 23 24 });

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/27 06:16