[android-beginners] Re: droidsans Font

2009-01-20 Thread Fathi

mark,
thank u for replying

i just delete the font folder from inside the android SDK and still it
load the droid font

how it could be happen? from where the emulator laod the font?

regards

On Jan 19, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 Fathi wrote:
  Hello every one,
  i just want to use the droidSans and/or droidٍSeriffontin my
  application I am using emulator to test as i did not have a device

  i tried to create Typeface.Create(DroidSans, Typeface.Normal) but
  theFontnot changed i tried all the droidfontfamily with no result

  i think emulator use only 1font

  any one know any thing about that?

 The emulator has all three of the Droid series of fonts.

 Use Typeface.SANS_SERIF, Typeface.SERIF, or Typeface.MONO as the first
 parameter to Typeface#create().

 --
 Mark Murphy (a Commons Guy)http://commonsware.com

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to get a Content Resolver in static methods?

2009-01-20 Thread Brian 1143

Hi,
I want to access android.provider.Settings so I need a content
resolver.

Could anyone show me how to get a content resolver in frameworks/base/
core/java/android/os/Environment.java.

Thanks.
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] need to know few apis

2009-01-20 Thread srini amul

a) Is there any utility function in andrioid, to convert from ASCII String to 
UTF 16 string (or) Vise versa like STRTOWSTR() / WSTRTOSTR() ?
b) How do i update my surface holder size ? What is the API to do this ?
c) How do  i get a frame which is been displayed on a screen ? What is the API 
to do this ?
 

Thanks  Regards,
P.Sriniamul


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to broadcast key events. or terminate the call?

2009-01-20 Thread Naeem

Hi All,
I want to terminate incoming or outgoing call. But there is no public
API available. I think I will do this if I broadcast key events like
KeyEvent.KEYCODE_ENDCALL.
Anybody can help me how to
 Terminate calls
Or
Broadcast key events


Thanks
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Basic Thread Question

2009-01-20 Thread steve_macleod

anyone have an idea on this one?

thanks

On Jan 19, 10:29 am, steve_macleod steven_macl...@hotmail.com wrote:
 Hi Dave,
 First - thanks for the reply.

 Maybe im missing something here, but what is the app's message
 looper?

 I am creating the thread with the following line:

 mPacManThread = new PacManThread(mSurfaceHolder, context, null);

 The PacManThread takes the following arguments (used the LunarLander
 thread as a reference):

 PacManThread(SurfaceHolder surfaceHolder, Context context, Handler
 handler)

 I have left the handler null. I presume the message looper concept has
 something to do with this handler. I didn't understand its purpose at
 the time, so I left it null.
 I have read the class description, but still in the dark as far as its
 purpose.

 So, I guess my question is, what is a message looper and what
 relationship does it have with the handler argument?

 many thanks,

 On Jan 17, 8:09 pm, Dave Sparks davidspa...@android.com wrote:



  This will put your app's message looper to sleep for 10 seconds, which
  is probably not what you want. As an alternative, you can send
  yourself a delayed message, or you can have your animation thread read
  the system time when it starts up and exit after the 10 seconds has
  expired.

  On Jan 17, 2:55 am, steve_macleod steven_macl...@hotmail.com wrote:

   Hi,
   I am writing an application to get a grip of basic sprite animation. I
   have a surfaceCreated method which looks like this:

   public void surfaceCreated(SurfaceHolder holder) {
                   mPacManThread.setRunning(true);
                   mPacManThread.start();
                   //this thread will wait for 10 seconds, and then kill the
   mPacManThread thread

                   try {
                           Thread.sleep(1);
                           mPacManThread.setRunning(false);
                           Log.d(THREAD STOPPED,The animation thread has 
   been stopped, as
   10 seconds has elapsed.);

                   } catch (InterruptedException e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                   }

           }

   The intention is to start the thread which manages the user input and
   animation, and make the main thread (that is the thread that started
   the view) sleep for 10 seconds, before stopping the animation loop.

   My understanding is that the Thread.sleep(1) will sleep the thread
   from which the request originated (ie the main thread) for 10 seconds.

   However, it looks like the Thread.sleep() is actually working on the
   animation (mPacManThread) instead. Am I missing something fundamental
   here?

   Thanks,- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to broadcast key events. or terminate the call?

2009-01-20 Thread Mark Murphy

Naeem wrote:
 I want to terminate incoming or outgoing call.

You can't.

 But there is no public API available.

Correct.

 I think I will do this if I broadcast key events like 
 KeyEvent.KEYCODE_ENDCALL.

You can't, except perhaps to your own application (and even that
requires are fair bit of trickery), and that wouldn't help you in this case.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to get a Content Resolver in static methods?

2009-01-20 Thread Mark Murphy

Brian 1143 wrote:
 Hi,
 I want to access android.provider.Settings so I need a content
 resolver.
 
 Could anyone show me how to get a content resolver in frameworks/base/
 core/java/android/os/Environment.java.

Use Context#getContentResolver(). Your activity or service is your Context.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: droidsans Font

2009-01-20 Thread Mark Murphy

Fathi wrote:
 from where the emulator laod the font?

The emulator has the fonts built into the firmware. You cannot remove
them without replacing the firmware.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to reach internet via GPRS/EDGE in Android

2009-01-20 Thread KenKC

Hi All,
Does anyone know how to reach internet via GPRS/EDGE in Android
(Google G1)?
just set corret APN/username/password in settings, then open browser?
Is it?


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Internet on emulator

2009-01-20 Thread Zeeshan Ahmad

Hi there

I have an Ethernet LAN connection in my room and wanted to know as to
whether I can use it to surf the web on the emulator???

If yes then how???

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Basic Thread Question

2009-01-20 Thread Dave Sparks

Android is a message driven application framework. The message looper
is the thread that reads messages queued for your application and
calls the methods in your application based on the message context. By
calling sleep, you effectively put your entire application to sleep
for 10 seconds because it can't respond to any external messages
coming from the framework. You never want to call sleep from any
function that is called directly or indirectly by the framework.


On Jan 19, 2:29 am, steve_macleod steven_macl...@hotmail.com wrote:
 Hi Dave,
 First - thanks for the reply.

 Maybe im missing something here, but what is the app's message
 looper?

 I am creating the thread with the following line:

 mPacManThread = new PacManThread(mSurfaceHolder, context, null);

 The PacManThread takes the following arguments (used the LunarLander
 thread as a reference):

 PacManThread(SurfaceHolder surfaceHolder, Context context, Handler
 handler)

 I have left the handler null. I presume the message looper concept has
 something to do with this handler. I didn't understand its purpose at
 the time, so I left it null.
 I have read the class description, but still in the dark as far as its
 purpose.

 So, I guess my question is, what is a message looper and what
 relationship does it have with the handler argument?

 many thanks,

 On Jan 17, 8:09 pm, Dave Sparks davidspa...@android.com wrote:

  This will put your app's message looper to sleep for 10 seconds, which
  is probably not what you want. As an alternative, you can send
  yourself a delayed message, or you can have your animation thread read
  the system time when it starts up and exit after the 10 seconds has
  expired.

  On Jan 17, 2:55 am, steve_macleod steven_macl...@hotmail.com wrote:

   Hi,
   I am writing an application to get a grip of basic sprite animation. I
   have a surfaceCreated method which looks like this:

   public void surfaceCreated(SurfaceHolder holder) {
   mPacManThread.setRunning(true);
   mPacManThread.start();
   //this thread will wait for 10 seconds, and then kill the
   mPacManThread thread

   try {
   Thread.sleep(1);
   mPacManThread.setRunning(false);
   Log.d(THREAD STOPPED,The animation thread has 
   been stopped, as
   10 seconds has elapsed.);

   } catch (InterruptedException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   }

   }

   The intention is to start the thread which manages the user input and
   animation, and make the main thread (that is the thread that started
   the view) sleep for 10 seconds, before stopping the animation loop.

   My understanding is that the Thread.sleep(1) will sleep the thread
   from which the request originated (ie the main thread) for 10 seconds.

   However, it looks like the Thread.sleep() is actually working on the
   animation (mPacManThread) instead. Am I missing something fundamental
   here?

   Thanks,- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: ebook

2009-01-20 Thread Shuvo

http://www.netbks.com/programming/general-programming-programming/professional-android-application-development_19141.html

http://www.netbks.com/programming/general-programming-programming/android-a-programmers-guide_13579.html

http://www.netbks.com/programming/general-programming-programming/android-essentials_11231.html

regards

Shuvo
Bangladesh University of Engineering and Technology ( BUET )
rejwan.shuvo.googlepages.com

On Jan 18, 12:09 pm, Robin robinve...@gmail.com wrote:
 Hi Everyone,

  I am quite new to Android. If anyone has any ebook (offline mode) for
 android, please send it across to me. robinve...@gmail.com. Also, if
 some tutorial on troubleshooting ADT installation is available, please
 let me know.

 Best Regards,
 Robin
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] APK file size and compiling in Eclipse

2009-01-20 Thread Tom

My APK file size is 1.3M compiled out of Eclipse.  No manner of
tweakings of the project settings seems to change the size of this
(specifically Java Compiler / Classfile Generation toggles for
debugger info).  Besides reducing the res/drawable image sizes, are
there other things to help reduce the size?

Thanks!
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: ebook

2009-01-20 Thread Josh Dobbs
I'm quite sure they are not distributing free ebook versions. Thhat site is
whack! they are giving away other peoples property and asking for
donations!?!?


While I don't presume to speak on behalf of the authors of those books,
those links appear to point to illegal copies. I am not aware of any of
those books being freely distributed in ebook form.

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Malformed URL

2009-01-20 Thread Kas

Hi,

I am trying to fetch an image and render it in an activity. But I keep
getting a MalformedURLException.

Here's my code snippet:

protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
String img = http://chart.apis.google.com/chart?cht=p3chd=t:
60,40chs=250x250chl=Hello|World;
URL imgUrl;
try {
imgUrl = new URL(img);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ImageView imgViewer = new ImageView(this);
imgViewer.setImageBitmap(BitmapFactory.decodeStream
(imgUrl.openStream()));
setContentView(imgViewer);
}

Thoughts?

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Problem with looping through the buttons in the Layout

2009-01-20 Thread James Yum

Hi Anil,

Reflection may work for you. Here's an untested example (with
exception handling omitted):

Field field = R.id.class.getField(button + i);
int id = field.getInt(null);

Cheers,
James

On Sun, Jan 18, 2009 at 4:01 AM, amadamala amadam...@gmail.com wrote:

 I'm using TableLayout for my application.
 I do have 16 buttons (4 rows and 4 columns) inside the layout.

 I'm able to assign the text to each button by assigning value to
 R.id.Button01, 02, 03  Button16.

 Take this as an example code.


((Button)findViewById(R.id.Button01)).setText(list.get
 (0).toString());

 ((Button)findViewById(R.id.Button02)).setText(list.get(1).toString
 ());

 ((Button)findViewById(R.id.Button03)).setText(list.get(2).toString
 ());

 ((Button)findViewById(R.id.Button04)).setText(list.get(3).toString
 ());

 ((Button)findViewById(R.id.Button05)).setText(list.get(4).toString
 ());

 ((Button)findViewById(R.id.Button06)).setText(list.get(5).toString
 ());

 ((Button)findViewById(R.id.Button07)).setText(list.get(6).toString
 ());

 ((Button)findViewById(R.id.Button08)).setText(list.get(7).toString
 ());

 ((Button)findViewById(R.id.Button09)).setText(list.get(8).toString
 ());

 ((Button)findViewById(R.id.Button10)).setText(list.get(9).toString
 ());

 ((Button)findViewById(R.id.Button11)).setText(list.get(10).toString
 ());

 ((Button)findViewById(R.id.Button12)).setText(list.get(11).toString
 ());

 ((Button)findViewById(R.id.Button13)).setText(list.get(12).toString
 ());

 ((Button)findViewById(R.id.Button14)).setText(list.get(13).toString
 ());

 ((Button)findViewById(R.id.Button15)).setText(list.get(14).toString
 ());

 ((Button)findViewById(R.id.Button16)).setText(list.get(15).toString
 ());


 But what I want is similar to following code.

  for(int i=0; i 16; i++)
  {

   ((Button)findViewById(R.id.Button[i] )).setText(list.get
 (i).toString());
  }

 Thanks,
 -Anil

 


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Help with path syntax for reading file off SD card

2009-01-20 Thread James Yum

Hi,

What is the error?

Cheers,
James

On Sun, Jan 18, 2009 at 1:22 PM, robotissues jason.van.an...@gmail.com wrote:

 I am trying to create a very simple mp3 player with one button that
 plays one song.  I found misc code here and there as a start.  I am
 running the application via Eclipse onto  my G1 which is attached via
 USB.  The application runs fine on the phone, screen loads, button
 click event gets fired, etc ... the problem is that when mp.prepare()
 is called, it throws an error ... here is the code:

mp.setDataSource(/sdcard/music/lonelydays.mp3);
mp.prepare();

 I copied a file to  /music/lonelydays.mp3 on the sd card.

 Looking for feedback on what I am missing.

 Thank You.



 


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Generating MD5 Fingerprint of the SDK Debug Certificate

2009-01-20 Thread James Yum

Hi Greg,

keytool is in the bin subdirectory of the JDK.

Cheers,
James

On Mon, Jan 19, 2009 at 1:07 PM, Greg Corradini gregcorrad...@gmail.com wrote:
 Hello,
 I'm trying to use the following keytool command to generate a Map Key for
 the debug certificate:
 keytool -list -alias androiddebugkey -keystore C:\Documents and
 Settings\corr1gre\Local Settings\Application Data\Android\debug.keystore
 -storepass android -keypass android

 I'm using Windows XP, eclipse 3.4 and android SDK 1.0. keytool is not
 being recognized as a command.

 Any ideas?


 


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Generating MD5 Fingerprint of the SDK Debug Certificate

2009-01-20 Thread Greg Corradini
Thks James,
I saw that in another post, but it didn't make sense along side the official
documentation where they tell you to generate it from the debug.keystore in
the windows xp local settings.

I'll try generating it from that directory. I'll also put in a request to
change the documentation on the android page.

Sent from mobile phone. Forgive my fat-fingered mistakes.

On Jan 20, 2009 6:02 PM, James Yum j...@google.com wrote:


Hi Greg,

keytool is in the bin subdirectory of the JDK.

Cheers,
James

On Mon, Jan 19, 2009 at 1:07 PM, Greg Corradini gregcorrad...@gmail.com
wrote:  Hello,  I'm try...

--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Loading dialog

2009-01-20 Thread Ivan Soto
I ended up using the method described in this post:
http://www.helloandroid.com/node/243

hope someone else find it useful :)


On Mon, Jan 19, 2009 at 4:34 PM, Ivan Soto ivanso...@gmail.com wrote:

 Ok, I'm trying with this now:
 showDialog(DIALOG2_KEY);
 new Thread(new Runnable(){
 public void run(){
 TwitAdapter twadapter = new TwitAdapter(
 getBaseContext(),
 R.layout.list_item , fillTwitter(
 http://twitter.com/statuses/public_timeline.xml?count=10;)
  );
 setListAdapter(twadapter);
 }
 }).start();
 removeDialog(DIALOG2_KEY);

 but it crashes saying:
 01-19 23:33:36.294: ERROR/AndroidRuntime(310):
 android.view.ViewRoot$CalledFromWrongThreadException: Only the original
 thread that created a view hierarchy can touch its views.


 Any ideas?

 On Fri, Jan 16, 2009 at 12:03 PM, Ivan Soto ivanso...@gmail.com wrote:

 I've been trying to do that:

 showDialog(DIALOG2_KEY);
 new Thread(new Runnable(){
 public void run(){
 TwitAdapter twadapter = new TwitAdapter( this,
 R.layout.list_item , fillTwitter(
 http://twitter.com/statuses/public_timeline.xml?count=10;)
  );
 setListAdapter(twadapter);
 }
 }).start();
 removeDialog(DIALOG2_KEY);

 but it won't run because I need to refer to the context instead of this
 in the TwitAdapter.

 And I have no idea how to do that.

 Any help?


 On Fri, Jan 16, 2009 at 6:47 AM, conan amit.r...@gmail.com wrote:


 Write your adapter code in a separate handler thread.

 HTH

 On Jan 16, 10:55 am, Ivan Soto ivanso...@gmail.com wrote:
  Hi I'm trying to display a Loading dialog, however it shows up AFTER it
  shows the listadapter. this is the code:
 
  showDialog(DIALOG2_KEY);
 
  TwitAdapter twadapter = new TwitAdapter(
  this,
  R.layout.list_item , fillTwitter(
 http://twitter.com/statuses/public_timeline.xml?count=10;)
   );
  setListAdapter(twadapter);
  removeDialog(DIALOG2_KEY);
 
  any idea?
 
  Thanks

 




--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Error in using push command

2009-01-20 Thread James Yum

Hi,

Did you create a disk image and load it in the emulator?

http://code.google.com/android/reference/emulator.html#sdcard

Cheers,
James

On Sat, Jan 17, 2009 at 12:47 AM, srini amul srinia...@yahoo.com wrote:
 Hi,

 I am trying to copy the file to the emulator. I used a below command

 adb push video.mp4 /sdcard/video.mp4

 But its giving a below error

 failed to copy video.mp4 to /sdcard/video.mp4: Read only file system

 How do i solve this error ?
 Thanks  Regards,
 P.Sriniamul
 
 Check out the all-new Messenger 9.0! Click here.
 


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Help with path syntax for reading file off SD card

2009-01-20 Thread jtaylor

Just to be sure, use Environment.getExternalStorageDirectory() instead
of referring directly to the the sdcard file directory.

- Juan T.

On Jan 18, 4:22 pm, robotissues jason.van.an...@gmail.com wrote:
 I am trying to create a very simple mp3 player with one button that
 plays one song.  I found misc code here and there as a start.  I am
 running the application via Eclipse onto  my G1 which is attached via
 USB.  The application runs fine on the phone, screen loads, button
 click event gets fired, etc ... the problem is that when mp.prepare()
 is called, it throws an error ... here is the code:

                         mp.setDataSource(/sdcard/music/lonelydays.mp3);
                         mp.prepare();

 I copied a file to  /music/lonelydays.mp3 on the sd card.

 Looking for feedback on what I am missing.

 Thank You.
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to set an image as WebView's background

2009-01-20 Thread James Yum

Hi,

Here's an example that may help:

http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/WebViewDemo/

It places all HTML related assets under the assets directory.

Cheers,
James

On Tue, Jan 20, 2009 at 9:10 AM, sagar saagar.par...@gmail.com wrote:

 Hello every1...
 I have 1 webview..It displays text fine..I want an image to be this
 text's background..for that I must use body background=some
 image...body...
 now how can i access this 'some image'..i have my background image in
 drawable folder..

 


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Basic Thread Question

2009-01-20 Thread jtaylor



On Jan 20, 12:04 pm, Dave Sparks davidspa...@android.com wrote:
 Android is a message driven application framework. The message looper
 is the thread that reads messages queued for your application and
 calls the methods in your application based on the message context. By
 calling sleep, you effectively put your entire application to sleep
 for 10 seconds because it can't respond to any external messages
 coming from the framework. You never want to call sleep from any
 function that is called directly or indirectly by the framework.


So never call Sleep in an Android Application?


- Juan T.


--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to broadcast key events. or terminate the call?

2009-01-20 Thread Naeem

anybody can help me that how to broadcast key events.
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Problem in playing a video file

2009-01-20 Thread Mahesh Vaghela
Thanks Dave,

Your ideas have really help me a lot. I have start working on getting a web
server from where I can download my files.

I will come back here when I finish that task.


Thanks again for your thoughtful help.




On Tue, Jan 20, 2009 at 10:47 PM, Dave Sparks davidspa...@android.comwrote:


 You can use res/raw for audio files that aren't too large. As I said
 earlier, I think the problem with video files is that the appt
 compiler compresses them. You could decompress them yourself and copy
 them to the SD card. Or you could download the files from a server
 when the application installs.

 On Jan 19, 3:30 am, Mahesh Vaghela mah...@indianic.com wrote:
  Hi Dave,
 
  Thanks for the info.
  Finally I have decided to put all my audio data to SD card.
  I can do this as suggested by you for a manual check.
 
  *adb push /path/on/workstation/video.mp4 /sdcard*
 
  This will work on my emulator.
  If I want to do this for a real device than my code should first push all
 my
  audio data in the user's SD card.
 
  Can you please show me a way how to do this?
 
  Is there any predefined folder like drawable/raw (Or some other like
 this)
  which can directly put our data in sdcard instead of application's
 private
  folder?
 
  On Sun, Jan 18, 2009 at 1:34 AM, Dave Sparks davidspa...@android.com
 wrote:
 
 
 
 
 
   You can call android.os.Environment.getExternalStorageDirectory() to
   get the path to the external storage device. That will handle the case
   where recommended external store is no the SD card but some other
   device.
 
   If there is no external storage, you can try saving to your app's
   private data directory. Another alternative it to stream the media
   from a server, but this obviously introduces the complexity and cost
   of maintaining the service for your users.
 
All of the Android standard apps (camera, music, sound recorder) that
   create or use media files assume that the device will have external
   storage. In the end, you have to decide whether it's worth supporting
   users that don't have external storage.
 
   On Jan 17, 1:29 am, Mahesh Vaghela mah...@indianic.com wrote:
Dave,
 
Thank you very much for replying soon. I understand how to push my
 mp4 in
   a
sd card and retrive the same.
 
I am a bit curious to know limitation of doing this.
 
1. sd card may not be an part of all the Android devices.
2. If it is the case, all users may not purchase it as an extra item
considering extra cost.
3. If so, an application which reads only from  an sd card may not
 work
properly on all devices.
 
Can you please guide me if there is an alternate way for storing the
   media
files? I know I can directly keep this in, with my apk under raw
 folder,
   but
this will made an application larger to download.
 
The total disk size available for an android application is only 70
 mb.
   So
one has to think for keeping his apk size to minimum.
 
On Sat, Jan 17, 2009 at 12:57 PM, Dave Sparks 
 davidspa...@android.com
   wrote:
 
 adb push /path/on/workstation/video.mp4 /sdcard
 
 In the code, use the SD card path for the setDataSource() call:
 
 mMediaPlayer.setDataSource(/sdcard/video.mp4);
 
 On Jan 16, 9:06 pm, Mahesh Vaghela mah...@indianic.com wrote:
  Hi Dave,
 
  I like your line:
  *
  As a first step, I would try pushing it to the SD card and
 playing
   it
 from
  there.*
 
  Can you please show a way to push a mp4 or mp3 file in a sd card?
 
  On Sat, Jan 17, 2009 at 6:46 AM, Dave Sparks 
   davidspa...@android.com
 wrote:
 
   Can you be a bit more explicit when you say nothing happens?
 
   Usually - no matter what kind of bug you might have - something
   happens, it's just not what you expected to happen. For
 example, do
   you have log output?
 
   My guess is that you cannot use an MP4 as a raw resource
 because it
   gets compressed. I can't recall if we exclude it or not, but
 you
   normally don't want to bundle a resource like a video file into
   your
   resources. As a first step, I would try pushing it to the SD
 card
   and
   playing it from there.
 
   On Jan 16, 7:49 am, srini amul srinia...@yahoo.com wrote:
Below is a step which i tried to play a mp4 file. But nothing
 happens.
   Could someone please help me out ?
 
Steps which I tried:
***
a) I added a SurfaceView element in main.xml
b) I uploaded a video.mp4 file in res/raw directory
 
Below is my main.xml:
--
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=
http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
 
SurfaceView android:id=@+id/SurfaceView01

[android-beginners] Export to sim somewhat working...

2009-01-20 Thread Greg

Ok I wrote an application based off the SIM import tool located on the
latest source for Android, its crude but it should work, i need help
polishing it off and I would hope that it would make it into the main
tree in time for release.

THIS IS CODE EMBEDDED IN THE SOURCE NOT THE SDK.

I was wondering if there was a way to attach the files needed on here
so others can take a look and touch up/finish up the code?

The part I am having most trouble at is the actual writing to SIM
portion as the emulator doesn't have a fake SIM I can't actually see
if the code works, but I think it does, although it is lacking so data
check features (ie. check to see if the entry already exists on the
SIM card and copy or don't copy, as well as there is no feature for
onListItemClick() so nothing happens when you tap it/select it).

The export all feature seems to work fine with no force close, the
import one seems to force close for some reason...

Either way if someone is willing to help finish this thing off id be
happy to provide the code, and id love to see this in the next build.

Thanks,

Greg.
--~--~-~--~~~---~--~~
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
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---