Spanish Problema con QRCodeReaderView [SOLUCIONADO]

roerGarcia

Active Member
Licensed User
Longtime User
Buenas grupo.

Tengo tres telefonos en pruebas con b4a.

La aplicacion del foro que lee QR funciona en un MotoG4 con Android 7.0 pero no asi en un LG XStyle Android 6.1 ni con un Samsung On5 con Android 6.1.

Descargue una aplicacion del Play que hace lo mismo y manipula la camara, lee el Qr y lo interpreta en los tres telefonos, entonces no es que el Telefono (LG/Samsung) no lo pueda hacer sino que tengo un problema con algo en la aplicacion del foro.

Que mas debo revisar?
La version de B4a es la nueva, la 9.

Esto es lo que arroja:

Registo conectado a: samsung SM-G550T1
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.<init>(Camera.java:568)
at android.hardware.Camera.open(Camera.java:405)
at com.google.zxing.client.android.camera.open.GingerbreadOpenCameraInterface.open(GingerbreadOpenCameraInterface.java:57)
at com.google.zxing.client.android.camera.open.CameraManager.openDriver(CameraManager.java:77)
at com.dlazaro66.qrcodereaderview.QRCodeReaderView.surfaceCreated(QRCodeReaderView.java:116)
at android.view.SurfaceView.updateWindow(SurfaceView.java:720)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:215)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1014)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2603)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1528)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7524)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:622)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
 

Descartex

Well-Known Member
Licensed User
Longtime User

roerGarcia

Active Member
Licensed User
Longtime User
De hecho ya lo habia revisado.

Me da esto:

B4A Versión: 9.00
Parseando código. (0.02s)
Building folders structure. (0.03s)
Compilando código. (0.09s)
Compilado códigos de diseños. (0.01s)
Organizando librerías. (0.00s)
Generando el fichero R. Error
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

Y el post que refieres va muy avanzado, por eso abri este.

Gracias por contestar!

PD. Resolver el tema sera la diferencia entre mostrar una serie de aplicaciones moviles de campo (no en oficinas) capaces de reaccionar mas 'rapidamente' y con mayor 'precision' o mostrar solo aplicaciones tradicionales que por sus mismas caracteristicas (abre, clic, cierra, envia, etc) no son tan funcionales fuera de un escritorio dentro de una oficina. *** Este es mi problema ***
 

roerGarcia

Active Member
Licensed User
Longtime User

Ok, con ese tip, quedo resuelto.

Pero... la aplicacion de lectura de QR sigue sin funcionar.

Data: Hay una gran diferencia entre el manifiest del QR Reader y el Camera

Manifiest del QRCode Reader
'<supports-screens android:largeScreens="true"
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
'AddManifestText(
'<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
'<supports-screens android:largeScreens="true"
' android:normalScreens="true"
' android:smallScreens="true"
' android:anyDensity="true"/>)
'SetApplicationAttribute(android:icon, "@drawable/icon")
'SetApplicationAttribute(android:label, "$LABEL$")
'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'End of default text.
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)
'AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.ACCESS_FINE_LOCATION")
AddPermission("android.permission.WAKE_LOCK")
AddPermission("android.permission.DEVICE_POWER")
'AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.FLASHLIGHT")

AddPermission("android.hardware.camera")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'AddApplicationText(<activity android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"
' android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
' android:windowSoftInputMode="stateAlwaysHidden">
' </activity>)
Produce este error:
Registo conectado a: LGE LG-K200
--------- beginning of system
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.<init>(Camera.java:548)
at android.hardware.Camera.open(Camera.java:361)
at com.google.zxing.client.android.camera.open.GingerbreadOpenCameraInterface.open(GingerbreadOpenCameraInterface.java:57)
at com.google.zxing.client.android.camera.open.CameraManager.openDriver(CameraManager.java:77)

La aplicacion Camera tiene este:

'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
Y funciona en Android 6.1 en un LGxStyle

Que estoy perdiendo en camino?

Gracias anticipadas.
 

roerGarcia

Active Member
Licensed User
Longtime User
Resuelto.
Novato no lee la documentación completa.
Asunto de permisos por Android 6.
 
Last edited:

Descartex

Well-Known Member
Licensed User
Longtime User

Esto se resume con un RTFM!!!!

No te preocupes... nos ha pasado a todos (y nos seguira pasando)
Un saludo.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…