I am using Trigger.io to develop an application.
After using file.getImage and selecting an image from either the gallery or camera (on Android) I get this error message (Using trigger.io toolkit to run the app).
W Forge : Unhandled intent result, should have been handled by Forge.
The app promptly crashes and restarts.
relevant code:
forge.file.getImage({}, function(file) {
forge.request.ajax({
type: 'POST',
url: "http://example.com/upload/photo",
files: [file],
success: function(e) {
console.log('success');
console.log(JSON.stringify(e));
},
error: function(e) {
console.log('failure');
console.log(JSON.stringify(e));
}
});
What does this error mean?
This problem is caused by the camera taking up memory on older Android devices causing it to unceremoniously shut down some apps to free up more memory.
We’re working on providing more elegant handling of this situation or at least better debug output to tell you what’s going on. The problem in this case was occurring on an Android 2.3 device, and could be worked around by shutting down some open apps / processes.
Update: we released a new foreground camera module to address this issue in our v1.4.41. platform version:
http://current-docs.trigger.io/modules/camera.html#modules-camera