Skip to content

[Bug Report] Cannot Take New Photos After App Uses Up Android Device Memory #284

@seanwu1105

Description

@seanwu1105

After the app contains multiple proofs, the app will be killed when taking new photos due to insufficient memory. Thus, after the the app recreated by Android, users will find out that the app does not store the new photo.

Steps to Reproduce

  1. Use a low-end Android device.
  2. After install the app, take photo.
  3. When taking photos, do some "memory demanding" tasks, such as zoom in and out, or switch rear and front camera multiple times.
  4. Repeat the steps 3. multiple times, the app should containing multiple photos and thus uses more device memory.
  5. There should be a high chance that Android kills the mylog app and restores it after user takes a photo. The new photo will not be caught by the app (i.e. the PhotoService.create() will not work).

This is the same issue as numbersprotocol/capture-cam#83. We should catch the image after the app is restored by App.addListener('appRestoredResult', ...). The result is in the following format:

{
   "pluginId":"Camera",
   "methodName":"getPhoto",
   "success":true,
   "data":{
      "format":"jpeg",
      "base64String":"...",
      ...
   },
   ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions