[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.
var win1 = Titanium.UI.createWindow({ title : 'Tab 1', backgroundColor : '#fff' }); win1.open(); var Cloud = require('ti.cloud'); var deviceToken; Cloud.PushNotifications.subscribeToken({ device_token : deviceToken, channel : 'test123', type: Ti.Platform.name == 'android' ? 'android' : 'ios' }, function(e) { if (e.success) { alert('Success' ); } else { alert('Error' );; } });