【问题标题】:Trigger.io: : Unhandled intent resultTrigger.io: : 未处理的意图结果
【发布时间】:2012-07-23 18:59:22
【问题描述】:

我正在使用 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));
        }
    });

这个错误是什么意思?

【问题讨论】:

  • 您在哪个版本的 Android 上进行测试,这是设备还是模拟器?
  • 好的,你能把你正在使用的 src/config.json 发送到 support@trigger.io 看看我们是否可以重新创建,谢谢!

标签: javascript trigger.io


【解决方案1】:

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

PhoneGap camera restarts the application

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

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

【讨论】:

    【解决方案2】:

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

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

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

    【讨论】:

    • 我们在我们的工具包中找不到任何相机模块
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多