[AC-3499] Application is crashing because of ti.cloud module when we create distribution build for Android.
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-04-21T20:44:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Akash Salunkhe |
Assignee | Shak Hossain |
Created | 2016-04-13T08:08:14.000+0000 |
Updated | 2016-04-21T20:44:01.000+0000 |
Description
Development build is working fine. I am including google play services in the build. But distribution build is crashing on Android devices. I tried to narrow down the problem and found that there is problem in the ti.cloud module where we are calling function subscribe token.
Code of this function is like :
var Cloud = require('ti.cloud');
// subscribe to channel
Cloud.PushNotifications.subscribeToken({
device_token : deviceToken,
channel : 'test123',
type : osname
}, function(e) {
if (e.success) {
// Call for register device function
} else {
//display error
}
});
PFA file for environment details of machine and crash logs.
Attachments
Hello, I am not able to reproduce this issue. I am able to make the app run with both development build and distribution build while using ti.cloud module with the given code. *Steps:* 1. Create a default alloy project for Android with Appcelerator Cloud service enabled. 2. Replace the code in app.js file with the following code.
3. Create a signed apk from the option "Publish-Distribute". 4. Install the apk on Android device and run the app. >> an alert is created. [Screenshot](http://s22.postimg.org/xli70akb5/image.png) Subscribe token does not get successful in my case for obvious reason. Thing to consider here is the app does not get crashed and no error log is produced. Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.4.0.201511241829