[android-developers] Re: prob in attaching txt file while email from internal package file storage
Hello Bob, Thanks for your suggestion. I have two questions to you.. How do I attach with EXTRA_STREAM in that case while I put the file with Uri.fromFile(). File dirFile = getFilesDir(); File zibraFile = new File(dirFile,zibra.csv); Uri zibraUri = Uri.fromFile(zibraFile); sendIntent.putExtra(Intent.EXTRA_STREAM, zibraUri); But the email does not carry any attachement. Any solution please Please provide any solution as I am unable to attach the file from internal directory. ag On Jun 9, 3:23 am, Bob Kerns r...@acm.org wrote: Please do not construct filenames and Uri's by pasting together strings. The correct way to write this is: Uri.fromFile(new File(Environment.getExternalStorageDirectory(), zibra.txt)) or to make it a bit more clear: File dirFile = Environment.getExternalStorageDirectory(); File zibraFile = new File(dir, zibra.txt); Uri zibraUri = Uri.fromFile(zibraFile); Or, if you need a URI instead of a Uri: URI zibraURI = zibraFile.toURI(); There's also File.toURL(). HOWEVER, the documentation for Intent.EXTRA_STREAM says you need a content: URI (I presume that should be Uri?), not a file: one. If you want to give the other application access to your app's data, create a content provider. Applications don't have access to files belonging to other applications. A content provider (and content: URI) give your application control over what information to make available, and to whom. On Jun 7, 10:33 pm, adag adjo...@googlemail.com wrote: Hello, I am successful in creating file using openFileOutput(). and can read the file using openFileInput(). I am able attach file from external storage sdcard while emailing the same using getExternalStorageDirectory as sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(file://+Environment.getExternalStorageDirectory()+/ zibra.txt)); But while trying to attach file from the openOutputFile stored area using sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(file://+ getFilesDir() + /zibra.txt));, resulting emptied file emailing. My file is stored in /data/data/com.example/files/zibra.txt. Could you please point out what is going wrong in it? Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, recipients); sendIntent.putExtra(Intent.EXTRA_SUBJECT, attachment test); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse (file://+ getFilesDir() + /zibra.txt)); //(file://+Environment.getExternalStorageDirectory()+/ zibra.txt)); sendIntent.setType(text/plain); startActivity(Intent.createChooser(sendIntent, Send mail...)); -- 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] prob in attaching txt file while email from internal package file storage
Hello, I am successful in creating file using openFileOutput(). and can read the file using openFileInput(). I am able attach file from external storage sdcard while emailing the same using getExternalStorageDirectory as sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(file://+Environment.getExternalStorageDirectory()+/ zibra.txt)); But while trying to attach file from the openOutputFile stored area using sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(file://+ getFilesDir() + /zibra.txt));, resulting emptied file emailing. My file is stored in /data/data/com.example/files/zibra.txt. Could you please point out what is going wrong in it? Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, recipients); sendIntent.putExtra(Intent.EXTRA_SUBJECT, attachment test); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse (file://+ getFilesDir() + /zibra.txt)); //(file://+Environment.getExternalStorageDirectory()+/ zibra.txt)); sendIntent.setType(text/plain); startActivity(Intent.createChooser(sendIntent, Send mail...)); -- 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] Stop Application Catch
Hello All, I have five screen in my application. While in performing one action in fifth screen I encountered with Stop Application message. On which, I am getting 3 times Stop Application msg box, which covers 3 previous screen and comes back to the first screen. I understand I must have encountered with Error may be IndexOutOfBoundException which I have not addressed it in my code. I was wondering why it asks for extra 3 times Stop Application system message. It is fine to display an Stop Application system message if I encountered an error in any screen it should stop that particular screen and should come to the next screen on. How can I trap/catch such incidents not to occur in the consecutive screen. Please provide your valuable suggestion. If the above description is not clear at any place please let me know that I be more clear to you. Sincerely, adjo -- 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] Stop Application Catch
Hello, I have 5 screen in which I am encountering Stop Application error which makes my application to stop. Here I know that an exception which supposed to be addressed inside the code on which the error is occurring. The Stop Application System Message is forcing the next 3 screen to close until it reaches to the 1st screen of the application. Is there any scope(or the way by handling) that I can stop that system message not to occur onto the next screen of any uncontrolled such error. Please reply with your valuable suggestion would be grateful. Thanks and Regards, adjo -- 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: Stop Application Catch
Hello Mark, Thanks Mark. I am exercising adb logcat, DDMS, or the DDMS perspective in Eclipse to fix the bug. I took the 1st paragraph's point(then your code is crashing four times) of your answer of my query. Thanks for your answer. Thanks and Regards, adjo On May 26, 12:01 am, Mark Murphy mmur...@commonsware.com wrote: adag wrote: Hello, I have 5 screen in which I am encountering Stop Application error which makes my application to stop. Here I know that an exception which supposed to be addressed inside the code on which the error is occurring. The Stop Application System Message is forcing the next 3 screen to close until it reaches to the 1st screen of the application. Is there any scope(or the way by handling) that I can stop that system message not to occur onto the next screen of any uncontrolled such error. The system message will occur when your code crashes. If the system message is appearing four times, then your code is crashing four times. Use adb logcat, DDMS, or the DDMS perspective in Eclipse to fix the bug. Then, the system message will go away. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- 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 athttp://groups.google.com/group/android-developers?hl=en -- 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] How to narrow down the method that is involved in exception from the pid
Hello, I was getting IllegalStateException caused by the cursor. The logcat is as follows: Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.sqlitecur...@437c0e60 on null that has not been deactivated or closed I/dalvikvm( 585): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) I/dalvikvm( 585): at dalvik.system.NativeStart.run(Native Method) I/dalvikvm( 585): Uncaught exception thrown by finalizer (will be discarded): I understand the 585 is PID but I have used many cursor which I have taken care off properly. But may one among those is giving this exception. I was unable to narrow down to particular portion in the code from this exception. Could anybody help me to know, how could I understand which cursor / line of code , from the error that I see in the logcat -- 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] Sqlite cursor closable problem
Hello, I am receiving finalizing closable issues. the snippet from the logcat as follows: I/dalvikvm( 585): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.sqlitecur...@437c0e60 on null that has not been deactivated or closed I/dalvikvm( 585): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) I/dalvikvm( 585): at dalvik.system.NativeStart.run(Native Method) I/dalvikvm( 585): Uncaught exception thrown by finalizer (will be discarded): -- Here I do understand the problem is related to cursor that may not have handled with in the code. here pid 585 basically the main process ID. But I do I narrow down to the code that particular cursor need to take care form this error in logcat. Please note I am using many cursors as I retrieving records from the DB. And I have already taken care of all the cursor. But these error forcing me to look that some cursor is overlooked. Could anybody throw some light that would help me to track down the particular cursor that are causing these trouble. -- 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: Always retrieve incomplete result from database
Hello Monica, It seems the query is not correct. Missing quotes for WHERE_MONTH_YEAR The correct query needs to treat WHERE_MONTH_YEAR as variable. It should look like as follows: return mDb.rawQuery(select t_date from finance + where t_month= +\' + selectedMonth + \' and + t_year = ' + selectedYear+', null); Hope this would resolve your problem. ag On May 3, 4:58 pm, Monica Chrismawati monica.rady...@gmail.com wrote: Hi all, currently develop an application and when I catch data from database, the record always incomplete. I am curios whether this is because I use distinct, but when removed distinct, the incomplete result also come too. For the example I query to get all dates using rawQuery: public Cursor getAllDates(String selectedMonth, String selectedYear){ String WHERE_MONTH_YEAR = t_month = '+selectedMonth+' and t_year=' + selectedYear+'; return mDb.rawQuery(select t_date from finance where t_month='+selectedMonth+' and t_year = '+selectedYear+', null); } the call method for the example: getAllDates(June, 2010); when the query execute using command line with query: select t_date from finance where t_month='June' and t_year='2010'; the result should be: 7 8 but in the emulator I get only 8. Anybody ever got issue like this? This is because of what? Somebody please help me, thanks a lot. -- 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 athttp://groups.google.com/group/android-developers?hl=en -- 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: how to lunch a activity from prefrence
Hello Mohammad, If you are talking about the preference activated from the xml using activity please refer the api demos that is provided. developer.android.com/resources/samples/ApiDemos/res/xml/ advanced_preferences.html The example are quite self explanatory and covers all the possible usage of preference even how to launch a new activity from it. You can then use it as you require. Hope this would help. Please let me know if you need any more clarification. ag On May 3, 6:15 pm, Mohammad Siddiqui siddiqui.m...@gmail.com wrote: Hi everyone, I want to lunch a actvitity when click on a prefrence(inflated form the xml ). how we can do it Thanks -- 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 athttp://groups.google.com/group/android-developers?hl=en -- 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] How to refer an attribute value to the other attribute in the same element of layout
Hello, I have problem to solve. I have listview in which android:background=#7W value I would would like to put it in the android:cacheColorHint= the value of the android:background. If anybody put some light how to refer the other attribute value to another attribute of the same element would be grateful. ListView android:id=@id/android:list android:background=#7W android:divider=#B0B0B0 android:dividerHeight=1dip android:smoothScrollbar=true android:fastScrollEnabled=true android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:choiceMode=multipleChoice android:cacheColorHint= = I would like to refer the same value of android:background / Thanks ad ag -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How to refer an attribute value to the other attribute in the same element of layout
Thanks Mark for your reply, But my requirement is little different. basically I am changing listview android:background Color dynamically. As you know that while list gets prepared every time, first it refers to the android:cacheColorHint from the cache to draw the list otherwise the scrolling of list gives a broken color of predefined cache color with black. Therefore I was looking if I can refer the attribute of background to the cacheColorHint then changing the background would not also conflict with the listview background color. Otherwise I can also use getListView().setBackgroundResource(R.Color.light_blue); But I am affraid how to handle the cacheColorHint. getListView().setCacheColorHint is not working in this case. Other than using transparent with android:cacheColorHint. any light Mark would be wonderful. On Apr 4, 1:10 am, Mark Murphy mmur...@commonsware.com wrote: adag wrote: Hello, I have problem to solve. I have listview in which android:background=#7W value I would would like to put it in the android:cacheColorHint= the value of the android:background. If anybody put some light how to refer the other attribute value to another attribute of the same element would be grateful. ListView android:id=@id/android:list android:background=#7W android:divider=#B0B0B0 android:dividerHeight=1dip android:smoothScrollbar=true android:fastScrollEnabled=true android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:choiceMode=multipleChoice android:cacheColorHint= = I would like to refer the same value of android:background / Use a color resource to define the value, then reference the resource from both attributes. http://developer.android.com/guide/topics/resources/available-resourc... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] problem in aligning right column in the list
Hello All, I am having multiple choice list where I have three column like below * Col1 Col2 Col3 * Col2 and Col3 should be right aligned with a gap of 10 px in between LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal TextView android:id=@+id/TextView01 android:text=my list android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginLeft=4dip android:gravity=center_vertical android:textStyle=bold android:textColor=#00 / LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal android:baselineAligned=true android:gravity=right android:baselineAlignedChildIndex=1 TextView android:id=@+id/TextView03 android:text=0 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentRight =true android:layout_alignRight=@+id/TextView04 android:layout_marginRight=20px android:gravity=right android:maxWidth=10dip android:textSize=20px android:textStyle=bold android:textColor=#00/ TextView android:id=@+id/TextView04 android:text=0 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=right android:layout_marginRight=10px android:textSize=20px android:textStyle=bold android:textColor=#00/ /LinearLayout /LinearLayout ** But the layout is not coming as expected. Col1 and Col2 are coming next to Each other, But I can restrict Col3 to be right Aligned. Col1Col2 Col3 Any further suggestion to make it correct would be really appreciable. Regards, adag -- 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: problem in aligning right column in the list
Worked out with android:weightSum quite nice..!!! On Dec 2, 1:18 pm, adag adjo...@googlemail.com wrote: Hello All, I am having multiple choice list where I have three column like below * Col1 Col2 Col3 * Col2 and Col3 should be right aligned with a gap of 10 px in between LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal TextView android:id=@+id/TextView01 android:text=my list android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginLeft=4dip android:gravity=center_vertical android:textStyle=bold android:textColor=#00 / LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal android:baselineAligned=true android:gravity=right android:baselineAlignedChildIndex=1 TextView android:id=@+id/TextView03 android:text=0 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentRight =true android:layout_alignRight=@+id/TextView04 android:layout_marginRight=20px android:gravity=right android:maxWidth=10dip android:textSize=20px android:textStyle=bold android:textColor=#00/ TextView android:id=@+id/TextView04 android:text=0 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=right android:layout_marginRight=10px android:textSize=20px android:textStyle=bold android:textColor=#00/ /LinearLayout /LinearLayout ** But the layout is not coming as expected. Col1 and Col2 are coming next to Each other, But I can restrict Col3 to be right Aligned. Col1Col2 Col3 Any further suggestion to make it correct would be really appreciable. Regards, adag -- 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] Problem in retrieving EditText field from alertdialog
Hello all, I am facing some not understandable error. Could anybody help to put light on it The variable edtTxt is returning null and encoutering nullpointer exception while I am trying to run and entered text in the txt_edit field. Here is the code. -- code -- AlertSample.java --- LayoutInflater factory = LayoutInflater.from (this); final View txtEntryview = factory.inflate (R.layout.sample_alert_edit,null); return new AlertDialog.Builder(AlertSample.this) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(Enter Name) .setView(txtEntryview) .setPositiveButton(OK, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { EditText edtxt = (EditText) findViewById (R.id.txt_edit); Editable strTxtforSearch = edtxt.getEditableText(); getWorkDone(strTxtforSearch.toString()); } }) ---sample_alert_edit.xml LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical TextView android:id=@+id/txtID android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=Enter Location to Search: android:gravity=left android:textAppearance=?android:attr/ textAppearanceMedium / EditText android:id=@+id/txt_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip android:scrollHorizontally=true android:capitalize=none android:gravity=fill_horizontal / /LinearLayout Any response is appreciable. -- 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: Problem with communicating Thread with progressBar
Lance, Wonderful. Thanks very much for your kind explanation. Re, ag On Nov 14, 11:53 am, Lance Nanek lna...@gmail.com wrote: Is this what you are trying to do? final Handler mHandler = new Handler() { public void handleMessage(Message msg) { Log.i(TAG, Received message. Checking if location still null.); if(location!=null){ Log.i(TAG, Location not null. Dismissing dialog.); dismissDialog(DIALOG1_KEY); } else { Log.i(TAG, Location null. Sending delayed message to check again later.); sendEmptyMessageDelayed(0, 100); } }}; showDialog(DIALOG1_KEY); mHandler.sendEmptyMessageDelayed(0, 100); No new thread needed. That said, why not just have whatever sets the location to not be null also trigger the dialog to be dismissed? If it is on another thread it can send the Location in a message and have the assignment and dismiss happen on the UI thread just as easily as the above causes the check to happen on the UI thread. Re Looper#prepare and Looper#loop, you would only need to call those if you created a Handler on your new thread. You are creating the Handler on the thread that was creating your new thread. If that thread is the UI thread, it doesn't need the looper calls because it already has a message queue running. Looper#loop doesn't cause your own code to loop anyway, it causes the code that gives out messages to handlers to loop. On Nov 14, 5:22 am, adag adjo...@googlemail.com wrote: Hello, Here is my code: -- final Handler mHandler = new Handler(){ public void handleMessage(Message msg) { if(location!=null){ Log.i(TAG, got message from handler); dismissDialog(DIALOG1_KEY); //this.getLooper().quit(); } } }; showDialog(DIALOG1_KEY); new Thread(new Runnable() { public void run() { Looper.prepare(); try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } mHandler.sendEmptyMessage(0); Looper.loop(); }//end of run }).start(); The problem is as follows: progressBar is showing correctly. mHandler obtains the message but only once(for the first time). But I need to make it in loop(as Looper.loop should have worked in this case), so it calls mHandler handleMessage in every loop(but its not happening in this case). The outcome progressBar kept on rotating though the condition in the handleMessage (if(location!=null) )is getting satisfied in the mean time of the active progressbar. How can I make mHandle,sendEmptyMessage to call in each loop so I can check for this (if(location!=null)) condition. Any Suggestion would be very helpful ag -- 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] Not able to connect device using adb -d shell command from vista
Hello, I am trying to use adb -d shell command to start a shell on device (android dev 1 phone ) from my vista command line. But whenever I try giving such command it does not open any shell or interaction on the phone device. But instead it goes to the next line in the cmd as '$'. any help would really appreciable. I have installed adb_usb_windows. Previously I used work well with the emulator. Using adb command never troubled me. But now with new device, I am not able to open a shell using adb -d shell command on the phone. Thanks in Advance, adag --~--~-~--~~~---~--~~ 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: Not able to connect device using adb -d shell command from vista
Hello Jason, adb -d shell supposed to be opening a shell on phone deivce. But in my case it is not happening. Re, adag On Oct 23, 6:52 pm, Jason Proctor jason.android.li...@gmail.com wrote: that means it's working :-) Hello, I am trying to use adb -d shell command to start a shell on device (android dev 1 phone ) from my vista command line. But whenever I try giving such command it does not open any shell or interaction on the phone device. But instead it goes to the next line in the cmd as '$'. any help would really appreciable. I have installed adb_usb_windows. Previously I used work well with the emulator. Using adb command never troubled me. But now with new device, I am not able to open a shell using adb -d shell command on the phone. Thanks in Advance, adag -- jason.vp.engineering.particle --~--~-~--~~~---~--~~ 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] manipulating cursor - need to edit column retrieved data before setListAdapter
I am intending to listing data which are retrieved from the database. I need to show edited data(from the retrieved DB data ) into the screen while the data is in screen in list view. I am using cursor to fetch the data from the database. to bind the data in setListAdapter, I am using SimpleCursorAdapter. The cursor has one string column which I need to edit to show. -- Cursor cur = DBH.query(true,DB_TABLE, new String[]{MY_FIELD}); String form[] = String[]{DBA.MY_FIELD}; int[] to = new int[]{R.id.lstTxt}; SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.layout.main, cur, from, to); setListAdapter(sca); -- I need to edit MY_FIELD to show into the screen. Do I need to use setFilterQueryProvider? If so , then how to do that... sca.setFilterQueryProvider(new FilterQueryProvider(){ @Override public Cursor runQuery(CharSequence constraint) { // Here I need to append string with the MY_FIELD to show in the screen // Do Not understand how to do it return null; } }); If any other way then how?? Could anybody help me in this??? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---