[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: No repository found at https://dl-ssl.google.com/android/eclipse/
has anyone had success with this problem... I am getting this error repeatedly even if I try installing through http:// or .zip file locally: An error occurred during provisioning. Cannot connect to keystore. JKS Cheers, Filipe Gies,Brad wrote: I’m also had the same problem a couple of times (I installed Android on 2 work machines and 2 home machines). In both of the cases where it didn’t work properly the first time, trying again a couple of minutes later worked. Maybe the repository is just very busy?? Sincerely, Brad Gies - NLM Software Southfield, MI, USA - If you get today's work done today, but do it in a way that you can't possibly get tomorrow's work done tomorrow, then you lose. *From:* android-beginners@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *??? *Sent:* Tuesday, August 26, 2008 10:58 AM *To:* android-beginners@googlegroups.com *Subject:* [android-beginners] Re: No repository found at https://dl-ssl.google.com/android/eclipse/ if you can send the picture about what you discrible,I think I need it This e-mail or communication, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential and/or legally privileged material. Any review,retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and permanently delete all copies, electronic or other, you may have or from your computer. Any disclosure, copying, distribution, reliance or use of the contents or information received in error is strictly prohibited. The foregoing applies even if this notice is imbedded in a message that is forwarded or attached. --~--~-~--~~~---~--~~ 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: Android Maps application source code
Great, unfortunately you did it with the M5 version of the SDK, it would be neat to have the new v0.9 maps code :D On Aug 29, 4:56 am, nader [EMAIL PROTECTED] wrote: Hi all, I added this page on my web site, it might help you, it contains Maps application code :), it was hard, but worth it http://nader.shalabi.googlepages.com/androidapplications If there is an interest in the code of the other applications, drop me email, I am still working on them. Nader A. Shalabihttp://nader.shalabi.googlepages.com --~--~-~--~~~---~--~~ 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] getScale replacement for BaseAdapter in 0.9 beta?
Since getScale was deprecated, what should we do to scale images within the gallery view relevant to which image is in focus? --~--~-~--~~~---~--~~ 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] Problem with java.net
I want to test the following code, but the DDMS always display Unknown socket error -1 , I think the code is correct, Must I set up the emulator or soming? Thank you. Source Code: public class SocketApp extends Activity { private Button ok; private TextView tv1; HttpURLConnection uc ; URL url; private static final String ip=code.google.com/android/images/ logo_android.gif; private static final String host=; private static final String path = http://; + ip +host ; ImageView view1; InputStream is; BufferedInputStream bis; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ok = (Button)findViewById(R.id.Button01); ok.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { openConn(); sendRequest(); getRespones(); closeConn(); } }); } private void openConn(){ try { url=new URL(path); uc = (HttpURLConnection)url.openConnection(); uc.setDoInput(true); }catch (MalformedURLException e){ // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void sendRequest(){ try { Log.i([SocketApp], conn begin .); uc.connect(); Log.i([SocketApp],conn end .); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void getRespones(){ try { is = uc.getInputStream(); Log.d(lenght,+uc.getContentLength()); tv1.setText(uc.getContentLength()+); bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); view1.setImageBitmap(bm); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } private void closeConn(){ try { uc.disconnect(); bis.close(); is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } AndroidManifest.xml: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.ltinc.cn application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.SocketApp android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter intent-filter /intent-filter /activity /application /manifest --~--~-~--~~~---~--~~ 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 with java.net
Please take a look at http://groups.google.com/group/android-developers/browse_thread/thread/d2fef5736396f41b/fe1b8d813e0e9eeb?show_docid=fe1b8d813e0e9eeb Regards, sacoskun On Aug 29, 1:37 pm, leafka [EMAIL PROTECTED] wrote: I want to test the following code, but the DDMS always display Unknown socket error -1 , I think the code is correct, Must I set up the emulator or soming? Thank you. Source Code: public class SocketApp extends Activity { private Button ok; private TextView tv1; HttpURLConnection uc ; URL url; private static final String ip=code.google.com/android/images/ logo_android.gif; private static final String host=; private static final String path = http://; + ip +host ; ImageView view1; InputStream is; BufferedInputStream bis; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ok = (Button)findViewById(R.id.Button01); ok.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { openConn(); sendRequest(); getRespones(); closeConn(); } }); } private void openConn(){ try { url=new URL(path); uc = (HttpURLConnection)url.openConnection(); uc.setDoInput(true); }catch (MalformedURLException e){ // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void sendRequest(){ try { Log.i([SocketApp], conn begin .); uc.connect(); Log.i([SocketApp],conn end .); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void getRespones(){ try { is = uc.getInputStream(); Log.d(lenght,+uc.getContentLength()); tv1.setText(uc.getContentLength()+); bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); view1.setImageBitmap(bm); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } private void closeConn(){ try { uc.disconnect(); bis.close(); is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } AndroidManifest.xml: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.ltinc.cn application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.SocketApp android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter intent-filter /intent-filter /activity /application /manifest --~--~-~--~~~---~--~~ 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: I cannot see any thing on the emulator
this kind of TIP should be first thing to be introduced to new android users!!! without mentioning it Android may lose some new developers!!! --~--~-~--~~~---~--~~ 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: Android for Nintendo DS?
Maybe when Android 1.0 is released (and the complete source will be available), will be possible to do that. On Aug 29, 7:42 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello everybody. This is my first question. I have a Nintendo DS Lite with a M3 DS Real and i have this question: ¿Will be Android for the Nintendo DS? I think that Android can use the uLinux called DSLinux and charge all the software needed by Android. The NDS only have 4MB of ram but is possible to use a memory expansion how as the NDS Browser memory (8MB), the M3 DS rumble Ram (32MB) or others. --~--~-~--~~~---~--~~ 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: Android Maps application source code
Working on it :) On Fri, Aug 29, 2008 at 1:20 PM, Guillaume Perrot [EMAIL PROTECTED]wrote: Great, unfortunately you did it with the M5 version of the SDK, it would be neat to have the new v0.9 maps code :D On Aug 29, 4:56 am, nader [EMAIL PROTECTED] wrote: Hi all, I added this page on my web site, it might help you, it contains Maps application code :), it was hard, but worth it http://nader.shalabi.googlepages.com/androidapplications If there is an interest in the code of the other applications, drop me email, I am still working on them. Nader A. Shalabihttp://nader.shalabi.googlepages.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---