[android-developers] HTC hero z images problem
HI all. I am maidul .I have one year exp with andoid os. Currently I face a problem that HTC DESIRE Z does not show images from sd card or gallary. I want to show images .How I show images by coding. Can anyone give some coding hints. Thanks and Regards Maidul Islam -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Alerm Trigger
Hi all I am android Developer. I developed a project. Alerm : User can set date time . A alerm will trigger when time is matching. My work: Two Java Class:-- MyDate Class ,SqlDatabase class; Mydata will catch user data and pass it to the sql class. I catch that date , time and store in sqlite database with java coding. this two class is work fine.I check it. I use Four class to handle ALerm . BrodcastReceiver: Reboot, ALermManager; Services:WAkeFullIntent service class ,APpservice class. Reboot running when system is rebooting. It is running before system is switching off. It is call Alermmanager after some time .I set the time. "mgr.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+12, PERIOD, pi);" Alermmanager direct call Appservice class wittout any work. It send "" WakefulIntentService.sendWakefulWork(context, AppService.class);"" Appservice class call WakefullIntentService without any work. public AppService() { super("AppService"); wakefullIntent class work and send to AlermManager class. after work alerm manager will send appservice class . I catch system current date .it is work in fine. then I open database and try to catch database data. My code Calendar cal = Calendar.getInstance(); //SimpleDateFormat df = new SimpleDateFormat("MM/dd/ hh:mm:ss"); SimpleDateFormat df = new SimpleDateFormat("d:M:"); SimpleDateFormat d = new SimpleDateFormat("H:m"); df.setLenient(false); d.setLenient(false); String s = df.format(cal.getTime()); String t = df.format(cal.getTime()); System.out.println("s.."+s); // System.out.println("\n..."); //dbAddEvent=new MultiColumndb(this); db.open(); aa=Long.parseLong(s); Cursor cr=db.getAddEvent(aa); if (cr.moveToFirst()) { do { Log.v("ArrayList","RowCount :"+cr.getPosition()+" "+"Column Count :"+cr.getString(0)+" "+cr.getString(1)); date[i]=cr.getString(0); // title[positionsEvents]=addEventsCr.getString(1); //Log.v("titles", title[positionsEvents]); //positionsEvents++; } while (cr.moveToNext()); cr.close(); db.close(); }; System.out.println(date[i]); //String a=Alert.getString(0).toString() +Alert.getString(1).toString()+Alert.getString(2).toString(); //String b=Alert.getString(1).toString(); } catch (Exception e) { // TODO: handle exception Log.e("Exception", e.getMessage(), e); } I use this code in onHandleIntent method in wakefullIntent Service. I use this code in doWakefulWork in APPservice class. I use this code in Reboot class . Everywhere I get A error that is Null Java.lang.nullpointerException. SO what is my fault. If anyone help me . Please help me . -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Alerm Trigger
On Feb 26, 4:34 am, Justin Anderson wrote: > What does the stacktrace say? > > On Fri, Feb 25, 2011 at 6:41 AM, Maidul Islam wrote: > > > Hi all > > I am android Developer. I developed a project. > > > Alerm : > > User can set date time . A alerm will trigger when time is matching. > > > My work: > > Two Java Class:-- MyDate Class ,SqlDatabase class; > > Mydata will catch user data and pass it to the sql class. > > I catch that date , time and store in sqlite database with java > > coding. > > > this two class is work fine.I check it. > > > I use Four class to handle ALerm . > > > BrodcastReceiver: Reboot, ALermManager; > > Services:WAkeFullIntent service class ,APpservice class. > > > Reboot running when system is rebooting. It is running before system > > is switching off. > > It is call Alermmanager after some time .I set the time. > > "mgr.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, > > > SystemClock.elapsedRealtime()+12, > > PERIOD, > > pi);" > > > Alermmanager direct call Appservice class wittout any work. > > It send "" WakefulIntentService.sendWakefulWork(context, > > AppService.class);"" > > > Appservice class call WakefullIntentService without any work. > > public AppService() { > > super("AppService"); > > wakefullIntent class work and send to AlermManager class. > > after work alerm manager will send appservice class . > > > I catch system current date .it is work in fine. > > > then I open database and try to catch database data. > > My code > > > Calendar cal = Calendar.getInstance(); > > //SimpleDateFormat df = new SimpleDateFormat("MM/dd/ > > hh:mm:ss"); > > SimpleDateFormat df = new > > SimpleDateFormat("d:M:"); > > SimpleDateFormat d = new SimpleDateFormat("H:m"); > > df.setLenient(false); > > d.setLenient(false); > > String s = df.format(cal.getTime()); > > String t = df.format(cal.getTime()); > > > System.out.println("s.."+s); > > // > > System.out.println("\n..."); > > //dbAddEvent=new MultiColumndb(this); > > db.open(); > > aa=Long.parseLong(s); > > Cursor cr=db.getAddEvent(aa); > > > if (cr.moveToFirst()) > > { > > do { > > > Log.v("ArrayList","RowCount :"+cr.getPosition()+" "+"Column > > Count :"+cr.getString(0)+" "+cr.getString(1)); > > date[i]=cr.getString(0); > > > // > > title[positionsEvents]=addEventsCr.getString(1); > > //Log.v("titles", title[positionsEvents]); > > //positionsEvents++; > > } while (cr.moveToNext()); > > cr.close(); > > db.close(); > > > }; > > > System.out.println(date[i]); > > //String a=Alert.getString(0).toString() > > +Alert.getString(1).toString()+Alert.getString(2).toString(); > > //String b=Alert.getString(1).toString(); > > > } catch (Exception e) { > > // TODO: handle exception > > Log.e("Exception", e.getMessage(), e); > > } > > > I use this code in onHandleIntent method in wakefullIntent Service. > > I use this code in doWakefulWork in APPservice class. > > I use this code in Reboot class . > > > Everywhere I get A error that is > > Null > > Java.lang.nullpointerException. > > > SO what is my fault. If anyone help me . > > > Please help me . > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > Here is my Logcat Result. Exception is null java .lang.NullPointerException > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Retrieve Data from Database
I create a class and sqlite dbhelper class that strore data in sqlite database . Now I want to access data from out side off project. I want to access data from database directly in another class another package . already android have sqlite data base.so is there any need to add sqlite jar file?? so i want to connect jdbc. how can i connect jdbc ?? I create a class .I just check if connection is on /off. Class.forName("org.sqlite.JDBC"); Class.forName("SQLite.JDBCDriver"); Connection conn = DriverManager.getConnection("jdbc:sqlite:/data/data/ com.gallait.mDate/db.sqlite"); //Connection conn = // DriverManager.getConnection("jdbc:sqlite:Eventsdb"); Statement stat = conn.createStatement(); System.out.println("conn success"); conn.close(); System.out.println("conn close");\\ what can I pass in Class.forName("") There is Error shown. Class is not found. so How can i write in Class.forName() and getConnction method(?)? Please help me? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en