Help in Uri

Put your problem here if it does not fit any of the other categories.

Help in Uri

Postby saty_32016 » Tue Mar 18, 2008 10:16 am

Hi All,

I have a code in which i want to have whole set of path from file system of emulator.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Bundle extras = getIntent().getExtras();
  2.  
  3.                
  4.  
  5.                 /* Lets get those file paths and
  6.  
  7.                  * convert them into ContentURIs
  8.  
  9.                  */
  10.  
  11.                 String[] fileList = extras.getStringArray(BUNDLE_EXTRA_FILELIST);
  12.  
  13.                
  14.  
  15.                 mUrls = new Uri[fileList.length];
  16.  
  17.                 for(int i=0; i < fileList.length; i++) {
  18.  
  19.                         try {
  20.  
  21.                                 mUrls[i] = new Uri(fileList[i]);
  22.  
  23.  
  24.  
  25. }
  26.  
  27.                         catch(URISyntaxException e) {
  28.  
  29.                                 /* Ok, this is not error handling,
  30.  
  31.                                  * it is more like error ignoring.
  32.  
  33.                                  * Do you agree, Simo <img src="http://www.anddev.org/images/smilies/smile.png" alt=":)" title="Smile" />
  34.  
  35.                                  */
  36.  
  37.                                 Log.e(TAG, "Invalid content URI");
  38.  
  39.                         }                      
  40.  
  41.                 }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


what can i use from android.net.Uri in place of "getStringArray".so that i can use it.

Thanks in advance.
Last edited by saty_32016 on Tue Mar 18, 2008 11:03 am, edited 1 time in total.
saty_32016
Developer
Developer
 
Posts: 27
Joined: Mon Mar 10, 2008 4:47 am

Top

Postby kiran » Tue Mar 18, 2008 10:43 am

android.os.Uri?? i couldn't find that. The code you mentioned above should work well in m3. getStringArray(String) was removed from android.os.Bundle in m5. I was also trying to find out a way to replace getStringArray(String). Pls post if you find out a solution.

Thanks & Regards,
Kiran
:) smile it is the key that fits the lock of everybody's heart
User avatar
kiran
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Thu Nov 22, 2007 11:36 am
Location: India

Postby saty_32016 » Tue Mar 18, 2008 11:02 am

kiran wrote:android.os.Uri?? i couldn't find that. The code you mentioned above should work well in m3. getStringArray(String) was removed from android.os.Bundle in m5. I was also trying to find out a way to replace getStringArray(String). Pls post if you find out a solution.

Thanks & Regards,
Kiran


Sorry wrote wrong in hurry.......................... :) :)
it was android.net.Uri edited above post. if u find any link please let me know.
saty_32016
Developer
Developer
 
Posts: 27
Joined: Mon Mar 10, 2008 4:47 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Alexa [Bot], Google [Bot], Majestic-12 [Bot] and 22 guests