Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 79

tompos
Veteran developer
Profile
Posts: 75
Reg: Oct 19, 2013
Würzburg
6,850
09/29/17 06:36 AM (3 weeks ago)

Qr Reader error message...

I used the QR Reader plugin in an iOS app...

Now I am trying to generate an Android version of this app. I am aware that the Android version uses another QR app (Barcode scanner...) but I did not reach that point yet, because Android Studio gives me an error message

"error: incompatible types: Cr_rr_qrreader cannot be converted to Fragment" for the following line in qrButonPressed():

Fragment thisFragment = this;

I know that the QR Reader is currently not available in the Plugin market, but perhaps someone knows a shortcut to solving that problem...?

Thanks
Thomas
 
tompos
Veteran developer
Profile
Posts: 75
Reg: Oct 19, 2013
Würzburg
6,850
like
09/29/17 08:28 AM (3 weeks ago)
I have solved it...

I just had to replace "Fragment" with "BT_fragment" in Cr_rr_qrreader.java, but also in IntentIntegratorSupportV4.java.

Now it works...
Best wishes
Thomas
 
SmugWimp
Smugger than thou...
Profile
Posts: 6249
Reg: Nov 07, 2012
Tamuning, GU
80,740
like
09/29/17 08:38 PM (3 weeks ago)
Thanks Thomas. I hadn't gotten around to many Android notes or fixes yet...

Cheers!

-- Smug
 
tompos
Veteran developer
Profile
Posts: 75
Reg: Oct 19, 2013
Würzburg
6,850
like
09/30/17 03:59 AM (3 weeks ago)
Hi Smug,

being mainly focussed on iOS apps, such Android error messages confuse me very quickly. However, the journey was funny... I researched some options to include a QR Scanner library into my app... and landed on the exact solution that Chris had implemented in his plugin... Then only the fragment-line remained... learned a lot on the way ;-).

BTW... did you use the QR plugin in one of your apps? My app will be a portrait-only app... but the external QR scanner seems to be in landscape-only orientation. Is this to be accepted as is or can it be changed in some way? My client is not very happy with this orientation-change... at least, it works...

Cheers!
Thomas
 
SmugWimp
Smugger than thou...
Profile
Posts: 6249
Reg: Nov 07, 2012
Tamuning, GU
80,740
like
09/30/17 06:38 AM (3 weeks ago)
I was going to use it to demo an app for a local car dealership... Basically the QR Code on the car gave you more information in the app... But it never came to be.

Mine are portrait. If I changed it I don't recall, but it shouldn't be too hard; they use xib files, you can just modify that if you wish, or add more for each type of device, etc...

Cheers!

-- Smug
 
tompos
Veteran developer
Profile
Posts: 75
Reg: Oct 19, 2013
Würzburg
6,850
like
10/06/17 07:17 AM (2 weeks ago)
Yes, I completely changed the xib files for my iOS project.

But the Android version loads the external "Barcode Scanner" app that is in landscape mode. I might include the corresponding library into my project and search for the orientation parts... but calling the scanning app from the QR Reader by intent seems so much easier ;-). Perhaps I have to go the extra mile...

Cheers!
Thomas
 
ArthurDent
Apple Fan
Profile
Posts: 6
Reg: Jan 16, 2012
Sweden
9,860
like
10/18/17 12:48 PM (4 days ago)
Is it possible to buy the Barcode scanner plug-in?
 
tompos
Veteran developer
Profile
Posts: 75
Reg: Oct 19, 2013
Würzburg
6,850
like
10/19/17 03:24 AM (4 days ago)
Hi,

the plugin does not show in the plugin market... I had purchased it 2-3 years ago, so I am able to use it in my current projects... with some minor adjustments it still works fine.

As the author of this plugin – Chris – is responsible for the plugin market as well, chances are that it will re-appear in the market someday. I guess that Chris is interested to get a feedback on which of the old plugins is most wanted...

Best wishes
Thomas
 
ArthurDent
Apple Fan
Profile
Posts: 6
Reg: Jan 16, 2012
Sweden
9,860
like
10/19/17 11:39 AM (3 days ago)
Hi Thomas,

And thanks for your quick reply, I will notify Chris and hopefully it will be avaliable soon again.
I did find a solution yesterday that I'm working on right now.
https://github.com/appcoda/QRCodeReader

Best Regards,
Joakim
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.