2016년 12월 18일 일요일

Setting up activitystarter for qr droid


I like to use in my program for creating qr code whichprovides program QR Droid. Here is a guide to the author of the program, but I do not know how to use it in the App Inventorhttp://qrdroid.com/android-developers/#4

Encode (Generate)

✫ Action: You must use this action: la.droid.qr.encode
Intent qrDroid = new Intent( “la.droid.qr.encode” );

✫ Mandatory parameter: You MUST provide text to be encoded (QR code contents) by seting extra “la.droid.qr.code“.
qrDroid.putExtra(“la.droid.qr.code”, “This will be QR code content”);

✫ Optional parameter “size”: By default, QR code size will be automatic, according to with of screen of device. If you want to override this, you can set “la.droid.qr.size” in pixels.
qrDroid.putExtra( “la.droid.qr.size” , 150);

✫ Optional parameter “image”: By default, QR Droid will return to you a full path of generated QR code using Google API, so no image will be really generated and result will start with http://chart.apis.google.com/chart. If you prefer, you can set parameter “la.droid.qr.image” to make QR Droid create this image in user’s SD card and return a local path (ex: /sdcard/QrDroid/tmp/QrDroid_123.png)

qrDroid.putExtra( “la.droid.qr.image” , true);

✫ Call:
startActivityForResult(qrDroid, 0);

✫ Result: Inside onActivityResult(int requestCode, int resultCode, Intent data), you must read result as String. It will contain a remote URL or a local path.
String result = data.getExtras().getString(“la.droid.qr.result”);

-- 
see here Using the Activity Starter
and see several Activity Starter examples here https://puravidaapps.com/snippets.php#2activity

now try something, see also

and if you get stuck, then it would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

-- 
Can you use the Barcode scanner built in to the sensor components to scan your QR code - saves a lot of work?


-- 
-- 
Thanks for help.

I have used puravida and works.

-- 

댓글 없음:

댓글 쓰기