• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android Qr Image

Hai I am new to android. i know how to generate qr image in online in my progaram. but i want how to generate qr image by using jar files.
 
public class MainActivity extends Activity {
public static void main(String[] args) {
ByteArrayOutputStream out = QRCode.from("Hello World")
.to(ImageType.PNG).stream();

try {
FileOutputStream fout = new FileOutputStream(new File(
"C:\\QR_Code.JPG"));

fout.write(out.toByteArray());

fout.flush();
fout.close();

} catch (FileNotFoundException e) {
// Do Logging
} catch (IOException e) {
// Do Logging
}
}
}


this is my qr code. but i am got error:The method from(String) is undefined for the type QRCode

i add all jar files.
so what can i do?
 
String dim2[][] = {
{"Name", "Id","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"},
{"sandeep", "100","12.00pm to 1.00pm","","1.00pm to 2.00pm","","","",""},
{"amit", "101","","","1.00pm to 2.00pm","","12.00pm to 1.00pm","",""}
};
SQLiteDatabase studentDB=null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try{
studentDB=openOrCreateDatabase("studentDB", Context.MODE_PRIVATE, null);
//for (int i = 0; i< 9 ; i++) {
String create="create table if not exists student1(dim2[0][0] varchar(20),dim2[0][1] varchar(20),dim2[0][2] varchar(20),dim2[0][3] varchar(30))";
studentDB.execSQL(create);
Toast.makeText(MainActivity.this, "Database created :", Toast.LENGTH_SHORT).show();
//}
}
catch(Exception e){
Toast.makeText(MainActivity.this, "Exception Occured:"+e.toString(), Toast.LENGTH_SHORT).show();
}

}


in that my data base is created and why my table is not created.
 
Please wrap your code in [code] and [/code] tags. This keeps your code properly formatted and makes it easier to read.
 
Back
Top Bottom