Android Question some urgent help needed...

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
hello,

there is a very odd thing i have in my application.
i use a magnetic card reader (MSR) connected to the device with an OTG cable.
until recently when i swiped a card it acted as an external hardware keyboard and the msr "keyed" the text into the field with focus.

i just realized that this is no longer working.
same phone - older code works newer code not.
i couldn't find or think of anything as not much was changed in this part

anyone can think of any possible solution / direction ?

thanks
 

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
VERY odd
when using the keyboard the app goes to _textchanged
when using the MSR which acts like a hardware keyboard it never goes to _textchanged
i added a debug stop and it never enters the sub
in older version it worked perfectly
any ideas ?
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
my manifest:

'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: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="20"/>
<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.Light.DarkActionBar")
'End of default text.

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"/>)

'AddApplicationText(<activity android:name="io.card.payment.CardIOActivity" android:configChanges="keyboardHidden|orientation" />)
AddApplicationText(<activity android:name="io.card.payment.CardIOActivity" android:configChanges="orientation" />)
AddApplicationText(<activity android:name="io.card.payment.DataEntryActivity" />)
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
thank you Erel,
there are a lot of changes as i added many features, however none of them had to do anything with either keyboard or the flow of the fields / logic.
i disabled all new libraries and depending code - no change

one thig however i did find - aometimes with no explatantion it reads the first time and then never again.

how can it be that _focuschange / _textchanged are never triggered ?
when i use the keyboard all is fine
but when i use the MSR it reads nothing, neither of the above subs is triggered and it goes to the next field ?

i never touched the keyboard or messed with IME
i don't even have the lib in my project

it seems that when MSR is being used its like it all goes above my project
the most odd thing is that these subs are never triggered
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
interesting -
when i use external keyboard helper - it works like charm... really rocks
but then it hides the soft keyboard

anyone can help how can i use both ?
i read somewhere that it is possible to have this utility but still have the soft keyboard active and alive
this will solve my problem
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
problem seems to be solved.
i downloaded google keyboard and that's it
the original internal keyboard was the problem
thanks all
 
Upvote 0
Top