[TIMOB-17277] Android: ACS search user responses function doesn't work.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-07-07T03:31:16.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | n/a |
Components | Android |
Labels | supportTeam |
Reporter | Motiur Rahman |
Assignee | Mostafizur Rahman |
Created | 2014-07-06T08:00:31.000+0000 |
Updated | 2014-07-07T03:31:16.000+0000 |
Description
Search user responses function doesn’t work in ACS . Always its return an error.
[Error]:V8Exception: Exception occurred at undefined:1: Uncaught SyntaxError: Unexpected token ¬
But the same code works as expected on iOS and android GA version.
Affected Version: Android 3.3.0.RC
Testing Environment:
Titanium SDK: 3.3.0.RC, Titanium CLI: 3.3.0 –rc, Android SDK:4.2.2,4.4.2 OS X Version: 10.9.3, Appcelerator Studio: 3.2.3Steps to reproduce the issue:
1. Create a Classic project. 2. Paste this code in app.js file. 3. Enable Cloud service. 4. Create some user first. 5. Run this code with the testing environment.
var win = Ti.UI.createWindow({
backgroundColor : 'green'
});
var Cloud = require('ti.cloud');
function searchDefault() {
Cloud.Users.search({
//q : 'test'
}, function(e) {
if (e.success) {
alert('Success:\n' + 'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' + 'first name: ' + user.first_name + '\n' + 'last name: ' + user.last_name);
}
} else {
alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
}
});
}
// Create a Button.
var search = Ti.UI.createButton({
title : 'Search User',
height : Ti.UI.SIZE,
width : Ti.UI.SIZE,
top : 30,
});
// Listen for click events.
search.addEventListener('click', function() {
searchDefault();
});
// Add to the parent view.
win.add(search);
win.open();
No comments