Android Scan-Write

The migration of Adempiere modules to iDempiere

Android Scan-Write

Postby red1 » Sun Jan 29, 2017 6:30 am

This Project is Sponsored By SYSNOVA of Bangladesh, Compliments of Zeeshan Hasan. Official notice wiki to follow is at http://wiki.idempiere.org/en/Plugin:_Android_Scan_Write
I have evolved the ERPDeliveryReceipt QR Code scanning to write to a Kanban Board display into something more generic but brilliant. Now you can scan to update any table and set any field value.
Below is the changed code to show how the best is so simple:
GenericWriteSQL.png
GenericWriteSQL.png (36.5 KiB) Viewed 6696 times
The scanned QR Code has to be a 5 comma separated values to be inside this construct:
Code: Select all
SQL: UPDATE [Table] SET [Set]=[Set2] WHERE [Where]=[Where2]
If any values are not provided, it will use the default as shown. In our example we allow the Set to default to 'DocStatus'. Thus not only this can be used in the Kanban Board example, but it is now open to any field in any table in any Postgresql database, even outside iDempiere.

Just set your 5 csv set in a QR Code generator and then scan it in, and press Update DB.

The default is for quick testing of the BedRegistration KanbanBoard example under Red1 Ninja plugin. You can use the QR Code prepared below which is just PatientTwo. The second QR Code is ,,,,PatientOne to check the defaulting csvs works.

PatientTwo.png
PatientTwo.png (16.9 KiB) Viewed 6695 times
CommasPatientOne.png
CommasPatientOne.png (16.74 KiB) Viewed 6696 times
How To Use:
Fetch the APK from http://sourceforge.net/projects/red1/fi ... k/download
After launch, press on the Settings icon and set the URL of your PostgreSQL database and its login/pass
Press Scan and first time it will ask you to install ZXing Code Scanner. After that its ready to use.

DownloadScanner.png
DownloadScanner.png (34.24 KiB) Viewed 6694 times
Generate QR Code from any online generator such as http://www.qr-code-generator.com/

QRCodeGenerator.png
QRCodeGenerator.png (36.45 KiB) Viewed 6694 times
Scan the code.
Update DB and then check your database for the changed value.

You can scan the above codes in conjunction with viewtopic.php?f=45&t=1831#p8843. Watch the movie here.

Sourcecode is committed to http://github.com/red1org/ScanWrite. The URL setting of 10.0.2.2 is for localhost testing inside Android Studio. Any questions please direct to my email at red1@red1.org or red1org@gmail.com giving background info so i can edit and publish them here.

Encountered Issues:
1. Unable to connect - Edit pg_hba.conf and postgresql.conf to allow trust all and listen to any '*'
2. Wrong QR Code - it is OK, i catch exception there and make it continue. Later i will make a pop up listing summary of good and bad scans.

Why Must I Use ScanWrite?
1. It is convenient and superfast to tag anything in the ERP
2. QR code tag is to directly affects a database status or any other field. (You must admit this is brilliant.)
3. iDempiere need not be running. Just the Postgresql Database service is up.
4. Kanban Board example as reference of a brilliant practical use of iDempiere.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Android Scan-Write

Postby red1 » Sun Jan 29, 2017 6:49 pm

Made Release 1.1. Download here in SourceForge. Notes:
1. Landscape Layout will wrap content so that lower button does not cut off.
2. Scan results show toast for three scenarios (see below).
3. If no toast shown it means JDBC connection is either wrongful URL or Postgresql service is not started.

LongLayoutNoRecs.png
LongLayoutNoRecs.png (18.52 KiB) Viewed 6664 times
2Ok.png
2Ok.png (23.59 KiB) Viewed 6664 times
MixOK.png
MixOK.png (27.44 KiB) Viewed 6664 times
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Android Scan-Write

Postby zeeshan » Mon Jan 30, 2017 6:35 pm

zeeshan
 
Posts: 6
Joined: Wed Mar 23, 2011 6:37 pm

Re: Android Scan-Write

Postby red1 » Tue Jan 31, 2017 8:14 am

Hi Zeeshan, done! http://wiki.idempiere.org/en/Plugin:_Android_Scan_Write. Thank you for your ongoing support.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to iDempiere

Who is online

Users browsing this forum: No registered users and 2 guests

cron