J'ai ce problème, j'utilise le module CloudPush pour récupérer le jeton dans mon application, et dans tous les travaux de test ok, mais quand je télécharge l'application sur le magasin et le téléchargement des personnes En l'occurrence, l'application ne récupère pas le jeton, je remarque cette erreur chaque fois que je crée une instance de cloudPush.Android - CloudPush ne fonctionne pas sur la production
[INFO] : *** Vamos a validar
[INFO] : *** CREATE INSTANCE OF CLOUDHPUSH!!!!!!!!!
[ERROR] : TiHTTPClient: (TiHttpClient-10) [30,1458] HTTP Error (java.io.IOException): 404 : Not Found
[ERROR] : TiHTTPClient: java.io.IOException: 404 : Not Found
[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1283)
[ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818)
[INFO] : *** BEFORE SINGLE CALL BACK
[INFO] : *** BEFORE retrieveDeviceToken
[INFO] : Choreographer: Skipped 46 frames! The application may be doing too much work on its main thread.
[INFO] : art: Background partial concurrent mark sweep GC freed 3578(221KB) AllocSpace objects, 0(0B) LOS objects, 24%% free, 15MB/20MB, paused 5.096ms total 51.635ms
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : W/InstanceID/Rpc: Found 10076
[INFO] : Device Token: APA91bHU56CLjjEcMyroqoWH3VJFCSqBIKT2A7Amctdjiuw1Rk5a8upzfJJotfIUTh6619Wx-g7OG2rTMuceHm4r8ASz41K_bEYG1vh2q3_mwTM0ERbij4asAB4IPKIUkEZQCW9HcAFL
Mon code est:
var self = Ti.UI.createWindow({
orientationModes: [ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT],
backgroundColor: params.color6,
backgroundImage: "/images/fondo.jpg",
navBarHidden:true,
exitOnClose:true,
fullscreen:true
});
self.addEventListener("open", function(){
Ti.API.info("*** Vamos a validar");
if(Ti.Platform.osname=='android'){
Ti.API.info("*** CREATE INSTANCE OF CLOUDHPUSH!!!!!!!!!");
var CloudPush = require('ti.cloudpush');
Ti.API.info("*** BEFORE SINGLE CALL BACK");
CloudPush.setSingleCallback(true);
Ti.API.info("*** BEFORE retrieveDeviceToken");
CloudPush.retrieveDeviceToken({
success: function deviceTokenSuccess(e) {
var token = e.deviceToken;
Ti.API.info('Device Token: ' + e.deviceToken);
Utiles.RegistrarEnServidor(token);
},
error: function deviceTokenError(e) {
Ti.API.info("*** Failed to register for push");
}
});
Je ne sais pas ce que je fais mal ... à tester tout fonctionne très bien, mais l'application dans le magasin de jeu ne fonctionne pas, le jeton ne obtient récupéré.
Appcelerator Titanium Studio de construire: 4.9.1.201707200100
SDK: 6.1.2GA
CloudPush: 4.0.3
Rien ne semble être faux dans votre code, mais pouvez-vous essayer en supprimant cette ligne ** CloudPush.setSingleCallback (true); **? –
C'est le seul changement que je n'ai jamais utilisé en utilisant Cloudpush. –
Merci @PrashantSaini mais le problème persiste ... –