Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

CardIO Activity gets called twice when rejecting request for Camera Permission on Android M and over. #150

Closed
radu-savutiu-deindeal opened this issue May 18, 2016 · 6 comments

Comments

@radu-savutiu-deindeal
Copy link

radu-savutiu-deindeal commented May 18, 2016

Required Information

  • card.io Android SDK Version: //Card.IO
    compile 'io.card:android-sdk:5.3.4'
  • Android Version and Device (Motorola Droid Razr Maxx with Android 4.4.2, Samsung S7 with Android 6.0, etc...): Nexus N with Android N Developer Preview

Issue Description

  • Logs:
05-18 14:43:59.982 4079-4079/ch.deindeal.android.debug I/card.io: card.io 5.3.4 04/22/2016 15:06:12 -0500
05-18 14:43:59.985 4079-4079/ch.deindeal.android.debug D/card.io: Loaded card.io decider library.
05-18 14:43:59.986 4079-4079/ch.deindeal.android.debug D/card.io:     nUseNeon(): false
05-18 14:43:59.986 4079-4079/ch.deindeal.android.debug D/card.io:     nUseTegra():true
05-18 14:43:59.986 4079-4079/ch.deindeal.android.debug D/card.io:     nUseX86():  false
05-18 14:44:00.003 4079-4079/ch.deindeal.android.debug D/card.io: Loaded opencv core library
05-18 14:44:00.022 4079-4079/ch.deindeal.android.debug D/card.io: Loaded opencv imgproc library
05-18 14:44:00.035 4079-4079/ch.deindeal.android.debug I/card.io: Loaded card.io Tegra2 library
05-18 14:44:00.035 4079-4079/ch.deindeal.android.debug D/CardIOActivity: permission denied to camera - requesting it
05-18 14:44:00.070 4079-4079/ch.deindeal.android.debug I/CardIOActivity: onResume()
05-18 14:44:00.086 4079-4079/ch.deindeal.android.debug I/CardIOActivity: onPause()
05-18 14:44:06.936 4079-4079/ch.deindeal.android.debug I/CardIOActivity: onResume()
05-18 14:44:06.936 4079-4079/ch.deindeal.android.debug D/CardIOActivity: nextActivity()
05-18 14:44:06.938 4079-4079/ch.deindeal.android.debug I/CardIOActivity: onResume()
05-18 14:44:06.938 4079-4079/ch.deindeal.android.debug D/CardIOActivity: nextActivity()
05-18 14:44:06.944 4079-4079/ch.deindeal.android.debug D/CardIOActivity: post(Runnable)
05-18 14:44:06.954 4079-4079/ch.deindeal.android.debug D/CardIOActivity: post(Runnable)
05-18 14:44:06.962 4079-4079/ch.deindeal.android.debug I/CardIOActivity: onPause()
05-18 14:44:06.976 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: onCreate()
05-18 14:44:06.977 4079-4079/ch.deindeal.android.debug D/I18nManager: setLanguage(null)
05-18 14:44:06.977 4079-4079/ch.deindeal.android.debug D/I18nManager: null not found.  Attempting to look for de
05-18 14:44:06.977 4079-4079/ch.deindeal.android.debug D/I18nManager: setting locale to:de
05-18 14:44:07.008 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: onResume()
05-18 14:44:07.008 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: setting doneBtn.enabled=false
05-18 14:44:07.008 4079-4079/ch.deindeal.android.debug I/DataEntryActivity: ready for manual entry
05-18 14:44:07.092 4079-4148/ch.deindeal.android.debug D/OpenGLRenderer: Switching from surface 0x77077b5040 to 0x77471c4ac0 (pbuffer)
05-18 14:44:07.226 4079-4148/ch.deindeal.android.debug D/OpenGLRenderer: Switching from surface 0x77471c4ac0 (pbuffer) to 0x77077b5600
05-18 14:44:15.475 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: onCreate()
05-18 14:44:15.476 4079-4079/ch.deindeal.android.debug D/I18nManager: setLanguage(null)
05-18 14:44:15.476 4079-4079/ch.deindeal.android.debug D/I18nManager: null not found.  Attempting to look for de
05-18 14:44:15.476 4079-4079/ch.deindeal.android.debug D/I18nManager: setting locale to:de
05-18 14:44:15.497 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: onResume()
05-18 14:44:15.497 4079-4079/ch.deindeal.android.debug D/DataEntryActivity: setting doneBtn.enabled=false
05-18 14:44:15.497 4079-4079/ch.deindeal.android.debug I/DataEntryActivity: ready for manual entry
05-18 14:44:15.568 4079-4079/ch.deindeal.android.debug W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
05-18 14:44:17.719 4079-4079/ch.deindeal.android.debug D/CardIOActivity: onActivityResult(requestCode:10, resultCode:13274385, ...
05-18 14:44:17.719 4079-4079/ch.deindeal.android.debug D/CardIOActivity: no data in EXTRA_SCAN_RESULT
05-18 14:44:17.723 4079-4079/ch.deindeal.android.debug D/CardIOActivity: onActivityResult(requestCode:10, resultCode:13274385, ...
05-18 14:44:17.723 4079-4079/ch.deindeal.android.debug D/CardIOActivity: no data in EXTRA_SCAN_RESULT
  • Reproduce steps:
  1. Without camera permission available, start the card.io activity
  2. Deny camera permission
  3. Notice 2 'manual entry' CardIOActivity instances are added to the stack
@braebot
Copy link
Member

braebot commented May 23, 2016

Thanks for the bug report! Do you know if this is an issue only on Android N, or have you encountered it on 23 and below?

@ahinton-league
Copy link

We're also experiencing the same issue on android M and over when the user denies camera permission. It seems to be related to the new runtime permissions requests on android M+

@asos-paolobrandi
Copy link

asos-paolobrandi commented Dec 14, 2016

Same problem on Android N on Nexus 6p with card.io v5.4.0 and v5.4.2 as well.

Steps

  1. Deny the Camera access permission
  2. Now you see Card details page to enter manually
  3. Click on cancel button a new screen is shown.

Expected: upon clicking cancel button user should go back to the previous screen.

@cjakubowicz
Copy link

Yes I am getting this same exact problem as well on my N test device.

@lkorth
Copy link
Member

lkorth commented Mar 16, 2017

This has been fixed and will go out in the next release.

@lkorth
Copy link
Member

lkorth commented Mar 17, 2017

The fix for this was just released in 5.5.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants