Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seanwu1105 opened this issue Aug 31, 2020 · 0 comments

Comments

@seanwu1105
Copy link
Contributor

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-lite#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":"...",
      ...
   },
   ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant