[android-beginners] Re: problem wid the sdcard
I tried file:///sdcard/test.txt too but still it does not work... Do we have to set any permissions or something to open a sdcard file through application? I think we should be able to browse the sdcard files through applications.. because in real phone when we insert an sdcard, we are able to open all kind of files like a word file or text file. You said i can browse the android filesystem from DDMS file explorer. I can browse my sdcard folders from my application. I also created some folders and files in sdcard through my application. So what could be reason I am not able to open a file? Can you please help me with this... Thanks, On Thu, Aug 28, 2008 at 4:23 PM, Megha Joshi [EMAIL PROTECTED] wrote: 2008/8/28 Amin [EMAIL PROTECTED] I have added some text files in my sdcard image using adb push . What I am trying to do is making a file browser for sdcard. and I can see all the folders and files i created in my sdcard img through my application. Now what i want is, I want to view that text files in my application. Can you please tell me how can I do this? I already tried this Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(file://home/sdcard.img/test.txt)); change your path to file:///sdcard/test.txt ...Android filesystem is different from your machine's filesystem so file://home/sdcard.img/test.txt. wont work. You can browse the android filesystem from DDMS file explorer... But does not work. Thanks On Aug 28, 1:55 pm, Megha Joshi [EMAIL PROTECTED] wrote: 2008/8/28 immu [EMAIL PROTECTED] Hi Thanks for u reply !!! But still i am unable to see files(jpeg/mp3) in my Emulator iam opening the Emulator with command emulator -sdcard mypathHere but no result... i have a doubt now , can i see those files from Emulator ? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html On Aug 28, 1:54 am, Megha Joshi [EMAIL PROTECTED] wrote: Did you load the sdcard to emulator? for detailed instructions see the link below:http://code.google.com/android/reference/emulator.html#sdcard How do you view the files in emulator? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html 2008/8/27 immu [EMAIL PROTECTED] Hi i have add some files(jpeg/mp3) in sdcard image, but i am unable to see them from Emulator can any one help me...plzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
Payal Amin wrote: I think we should be able to browse the sdcard files through applications.. because in real phone when we insert an sdcard, we are able to open all kind of files like a word file or text file. If by real phone you mean iPhone, I'm not aware that it has a Word viewer. Or an SD card slot, for that matter. If by real phone you mean Symbian, I believe there are third-party Word viewers, but I am not aware there is one that is part of the operating system. The only real phone that has a Word viewer built in by the mobile OS maker is Windows Mobile, AFAIK. Maybe Blackberry -- I am not sure if they wrote their own or if they licensed somebody else's reader. The point is, I am unclear why you think it is a given that the mobile OS creator has to provide Word viewers as part of the actual operating system, given that few of their competitors do. -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: All titles, revisions, ebook formats, just $35/year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
My question was, if I can browse through sdcard and I know that the file is ...txt then why can't I open it like all other files? To quote from the documentation: http://code.google.com/android/reference/android/content/Intent.html For data that is not a content: URI and where no explicit type is included in the Intent, instead the scheme of the intent data (such as http: or mailto:) is considered. Again like the action, if we are matching a scheme it must be listed by the component as one it can handle. You are assuming that Uri.parse(file://home/sdcard.img/test.txt) yields something that an Activity can understand and respond to. That does not appear to be the case given your symptoms, though I haven't tried it myself. You may wish to try using an explicit MIME type, to see if that helps (see Intent#setDataAndType()), but I suspect there simply is no view a *.txt file activity built into the operating system. That simply means you need to create a *.txt-file-viewer activity, no different than you might need to create a *.doc-file-viewer activity if you wanted to view Word files, or a *.csv-file-viewer activity if you want to view CSV files, etc. Please bear in mind that Android is not a file-centric OS to the extent that, say, Windows Mobile is. Neither is iPhone, near as I can tell. Paradigms like file browsers that may be trivial in one mobile OS may be somewhat more work in other mobile OSes, like Android or iPhone, just as things that may be relatively easy on Android (e.g., mapping application) might be excruciatingly painful on another mobile OS. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
Hi Mark, thanks a lot for your reply. now I am able to open and view the txt file using some other file operations.. May be I will make different activity to read the txt file from sdcard. Thanks On Fri, Aug 29, 2008 at 11:36 AM, Mark Murphy [EMAIL PROTECTED]wrote: My question was, if I can browse through sdcard and I know that the file is ...txt then why can't I open it like all other files? To quote from the documentation: http://code.google.com/android/reference/android/content/Intent.html For data that is not a content: URI and where no explicit type is included in the Intent, instead the scheme of the intent data (such as http: or mailto:) is considered. Again like the action, if we are matching a scheme it must be listed by the component as one it can handle. You are assuming that Uri.parse(file://home/sdcard.img/test.txt) yields something that an Activity can understand and respond to. That does not appear to be the case given your symptoms, though I haven't tried it myself. You may wish to try using an explicit MIME type, to see if that helps (see Intent#setDataAndType()), but I suspect there simply is no view a *.txt file activity built into the operating system. That simply means you need to create a *.txt-file-viewer activity, no different than you might need to create a *.doc-file-viewer activity if you wanted to view Word files, or a *.csv-file-viewer activity if you want to view CSV files, etc. Please bear in mind that Android is not a file-centric OS to the extent that, say, Windows Mobile is. Neither is iPhone, near as I can tell. Paradigms like file browsers that may be trivial in one mobile OS may be somewhat more work in other mobile OSes, like Android or iPhone, just as things that may be relatively easy on Android (e.g., mapping application) might be excruciatingly painful on another mobile OS. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
2008/8/28 immu [EMAIL PROTECTED] Hi Thanks for u reply !!! But still i am unable to see files(jpeg/mp3) in my Emulator iam opening the Emulator with command emulator -sdcard mypathHere but no result... i have a doubt now , can i see those files from Emulator ? The emulator does not have a file browser...you will have to use File Explorer in DDMS: http://code.google.com/android/reference/ddms.html On Aug 28, 1:54 am, Megha Joshi [EMAIL PROTECTED] wrote: Did you load the sdcard to emulator? for detailed instructions see the link below:http://code.google.com/android/reference/emulator.html#sdcard How do you view the files in emulator? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html 2008/8/27 immu [EMAIL PROTECTED] Hi i have add some files(jpeg/mp3) in sdcard image, but i am unable to see them from Emulator can any one help me...plzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
I have added some text files in my sdcard image using adb push . What I am trying to do is making a file browser for sdcard. and I can see all the folders and files i created in my sdcard img through my application. Now what i want is, I want to view that text files in my application. Can you please tell me how can I do this? I already tried this Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(file://home/sdcard.img/test.txt)); But does not work. Thanks On Aug 28, 1:55 pm, Megha Joshi [EMAIL PROTECTED] wrote: 2008/8/28 immu [EMAIL PROTECTED] Hi Thanks for u reply !!! But still i am unable to see files(jpeg/mp3) in my Emulator iam opening the Emulator with command emulator -sdcard mypathHere but no result... i have a doubt now , can i see those files from Emulator ? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html On Aug 28, 1:54 am, Megha Joshi [EMAIL PROTECTED] wrote: Did you load the sdcard to emulator? for detailed instructions see the link below:http://code.google.com/android/reference/emulator.html#sdcard How do you view the files in emulator? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html 2008/8/27 immu [EMAIL PROTECTED] Hi i have add some files(jpeg/mp3) in sdcard image, but i am unable to see them from Emulator can any one help me...plzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
2008/8/28 Amin [EMAIL PROTECTED] I have added some text files in my sdcard image using adb push . What I am trying to do is making a file browser for sdcard. and I can see all the folders and files i created in my sdcard img through my application. Now what i want is, I want to view that text files in my application. Can you please tell me how can I do this? I already tried this Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(file://home/sdcard.img/test.txt)); change your path to file:///sdcard/test.txt ...Android filesystem is different from your machine's filesystem so file://home/sdcard.img/test.txt. wont work. You can browse the android filesystem from DDMS file explorer... But does not work. Thanks On Aug 28, 1:55 pm, Megha Joshi [EMAIL PROTECTED] wrote: 2008/8/28 immu [EMAIL PROTECTED] Hi Thanks for u reply !!! But still i am unable to see files(jpeg/mp3) in my Emulator iam opening the Emulator with command emulator -sdcard mypathHere but no result... i have a doubt now , can i see those files from Emulator ? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html On Aug 28, 1:54 am, Megha Joshi [EMAIL PROTECTED] wrote: Did you load the sdcard to emulator? for detailed instructions see the link below:http://code.google.com/android/reference/emulator.html#sdcard How do you view the files in emulator? The emulator does not have a file browser...you will have to use File Explorer in DDMS:http://code.google.com/android/reference/ddms.html 2008/8/27 immu [EMAIL PROTECTED] Hi i have add some files(jpeg/mp3) in sdcard image, but i am unable to see them from Emulator can any one help me...plzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem wid the sdcard
Did you load the sdcard to emulator? for detailed instructions see the link below: http://code.google.com/android/reference/emulator.html#sdcard How do you view the files in emulator? The emulator does not have a file browser...you will have to use File Explorer in DDMS: http://code.google.com/android/reference/ddms.html 2008/8/27 immu [EMAIL PROTECTED] Hi i have add some files(jpeg/mp3) in sdcard image, but i am unable to see them from Emulator can any one help me...plzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---