1

我正在使用 Trigger.io 开发应用程序。

file.getImage从图库或相机(在 Android 上)使用并选择图像后,我收到此错误消息(使用 trigger.io 工具包运行应用程序)。

W Forge   : Unhandled intent result, should have been handled by Forge.

该应用程序会立即崩溃并重新启动。

相关代码:

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));
        }
    });

这个错误是什么意思?

4

2 回答 2

1

我也在旧设备上看到了这个问题。显然,这也是 Phonegap 和 Native android 应用程序的常见问题。在这个线程上可以看到更多:

PhoneGap 摄像头重启应用

以下插件是为解决此问题的 Phonegap 开发的。如果可以为 Trigger.io 开发类似的东西,我会很棒

http://code.google.com/p/foreground-camera-plugin/

于 2012-12-03T09:51:10.167 回答
0

此问题是由于相机在较旧的 Android 设备上占用内存导致它毫不客气地关闭某些应用程序以释放更多内存。

我们正在努力为这种情况提供更优雅的处理,或者至少提供更好的调试输出来告诉您发生了什么。这种情况下的问题发生在 Android 2.3 设备上,可以通过关闭一些打开的应用程序/进程来解决。

更新:我们在 v1.4.41 中发布了一个新的前景摄像头模块来解决这个问题。平台版本: http ://current-docs.trigger.io/modules/camera.html#modules-camera

于 2012-07-26T02:42:57.820 回答