IBM Support

PI93595: UNABLE TO LAUNCH CAMERA FROM A CORDOVA APP RUNNING ON AN ANDROID NOUGAT DEVICE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Product components impacted:  SDK
    Mobile Devices Operating Systems impacted:  Android Nougat
    User roles impacted:  Developer and User
    Distribution:  Fix Central
    Versions affected:  7.1
    
    A Cordova app that features the use of the device camera is
    deployed on an Android device with the Nougat OS.  When
    attempting to launch the camera, nothing happens.  When
    reviewing the device log, the following is found:
    
    01-31 16:41:19.059 23974 24270 W System.err:
    java.lang.StackOverflowError: stack size 1037KB
    01-31 16:41:19.068 23974 24270 W System.err:  at
    org.apache.cordova.LOG.e(LOG.java:176)
    01-31 16:41:19.068 23974 24270 W System.err:  at
    org.apache.cordova.LOG.e(LOG.java:176)
    01-31 16:41:19.068 23974 24270 W System.err:  at
    org.apache.cordova.LOG.e(LOG.java:176)
    [line repeated many times]
    01-31 16:41:19.144 23974 24270 W System.err:  at
    org.apache.cordova.PluginManager.exec(PluginManager.java:168)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:61)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:40)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Nativ
    e Method)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    org.chromium.base.SystemMessageHandler.handleMessage(SystemMessa
    geHandler.java:9)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    android.os.Handler.dispatchMessage(Handler.java:102)
    01-31 16:41:19.144 23974 24270 W System.err:  at
    android.os.Looper.loop(Looper.java:154)
    01-31 16:41:19.145 23974 24270 W System.err:  at
    android.os.HandlerThread.run(HandlerThread.java:61)
    
    When the app is run on a device with an earlier version of the
    Android OS, the camera works as expected.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of MobileFirst cordova/hybrid  apps on Android Nougat  *
    * who attempts to launch a camera.                             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * A Cordova app that features the use of of the device camera  *
    * is deployed on an Android device with the Nougat OS.When     *
    * attempting to launch the camera, nothing happens.This is     *
    * because in Android Nougat, file URIs are restricted to the   *
    * scope of the same app.This is a problem of cordova plugin,   *
    * to access photos the camera plugin needs to be passed file   *
    * URIs.                                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * -                                                            *
    ****************************************************************
    

Problem conclusion

  • Cordova's solution is to create a custom URI to use in place of
    the file URI.This resolves the issue, however this require
    adding an android support library in order to handle the custom
    uri. Only MobileFirst users who utilize the Cordova camera
    plugin for Android will need to do additional setup.Users who do
    not intend to use the Cordova camera plugin need not to perform
    these steps.
    
    Steps are mentioned here :
    https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm
    .worklight.dev.doc/dev/t_android_cam_api_24.html#t_android_cam_a
    pi_2
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI93595

  • Reported component name

    MOBILE1ST PLATF

  • Reported component ID

    5725I4301

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-02-09

  • Closed date

    2018-04-13

  • Last modified date

    2018-04-13

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    MOBILE1ST PLATF

  • Fixed component ID

    5725I4301

Applicable component levels

  • R710 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
13 April 2018