[android-beginners] Re: How do I set the value of an EditText

2009-03-21 Thread Tseng

An error message would be helpful Otherwise it's hard to help you,
other than guessing what could be the reasons for it.

Maybe you haven't set the ID correctly, using a wrong ID (which
doesn't even exist in the XML Layout file) or you're using
setContentView/setView after you have using findViewById. This could
throw up a NullPointer Exception when you try to access (because
findViewById returns 0 if no layout has been set or the View with this
ID was not found).


On Mar 20, 9:00 pm, Lovedumplingx lovedumpli...@gmail.com wrote:
 That's what I thought too but I crash the task every time the activity
 that contains this code is started:

 EditText userText = (EditText) findViewById(R.id.userText);
 userText.setText(userParam);

 This is the basic way I thought to have the value set but it crashes
 every time.

 On Mar 19, 10:53 pm, Isaac Waller ad...@isaacwaller.com wrote:



  A String _is_ a CharSequence. There is no need for a cast.

  On Mar 19, 3:35 pm, Will sem...@gmail.com wrote:

   Cast the String to a CharSequence.

   String x = foo;
  EditTextET;
   ET.setText((CharSequence) x);

   On Mar 19, 10:43 am, Lovedumplingx lovedumpli...@gmail.com wrote:

Ok...so I've scoured and scoured and played and fiddled but I can't
figure it out.

I want to allow the user to set preferences for an application and I
want the preferences to be displayed in theEditTextarea if/when they
come back to change them again.

In my head I'm thinking I would be able to use setText() but no...that
takes a CharSequence and I have a string and don't know how to make a
CharSequence (which according to what I've read is supposed to be a
read-only thing anyway).

So...does anyone know how to put text into anEditTextfield without
relying on the XML?  I really want to do this via application
preferences.

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: MODIFY_AUDIO_SETTINGS permission

2009-03-21 Thread sm1

i tried this permission in one of my apps and it ran fine, on an adp1.

i seached the issues and found nothing;
here http://code.google.com/p/android/issues/list

there may be another problem in your app or what you're trying to do
is not supported by the current version of android. it is currently
quite limited in the audio functions accessible by apps.

maybe someone else here knows about this, and if not then please post
in the issues list. these get looked at by android/google staff, but
you have to be patient, many issues don't get timely attention. the
staff appear to be overworked these days.

serge

On Mar 18, 1:45 pm, Beth emez...@gmail.com wrote:
 Hello there,

 I first wrote to the android developer group about this and I got no
 responses.  Has anybody successfully set the MODIFY_AUDIO_SETTINGS use
 permission?  I try to set it and get a permission exception with every
 run of my application.  Thanks for any insight you might have.

 Regards,
 Beth
--~--~-~--~~~---~--~~
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: MODIFY_AUDIO_SETTINGS permission

2009-03-21 Thread sm1

my app also uses-permission WRITE_SETTINGS. maybe you could add this
one also and try.
serge

On Mar 21, 12:10 pm, sm1 sergemas...@gmail.com wrote:
 i tried this permission in one of my apps and it ran fine, on an adp1.

 i seached the issues and found nothing;
 herehttp://code.google.com/p/android/issues/list

 there may be another problem in your app or what you're trying to do
 is not supported by the current version of android. it is currently
 quite limited in the audio functions accessible by apps.

 maybe someone else here knows about this, and if not then please post
 in the issues list. these get looked at by android/google staff, but
 you have to be patient, many issues don't get timely attention. the
 staff appear to be overworked these days.

 serge

 On Mar 18, 1:45 pm, Beth emez...@gmail.com wrote:

  Hello there,

  I first wrote to the android developer group about this and I got no
  responses.  Has anybody successfully set the MODIFY_AUDIO_SETTINGS use
  permission?  I try to set it and get a permission exception with every
  run of my application.  Thanks for any insight you might have.

  Regards,
  Beth
--~--~-~--~~~---~--~~
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 do I set the value of an EditText

2009-03-21 Thread sm1

i use

  myEditText.setText(hello, TextView.BufferType.EDITABLE);

works fine
serge

On Mar 21, 5:55 am, Tseng tseng.priv...@googlemail.com wrote:
 An error message would be helpful Otherwise it's hard to help you,
 other than guessing what could be the reasons for it.

 Maybe you haven't set the ID correctly, using a wrong ID (which
 doesn't even exist in the XML Layout file) or you're using
 setContentView/setView after you have using findViewById. This could
 throw up a NullPointer Exception when you try to access (because
 findViewById returns 0 if no layout has been set or the View with this
 ID was not found).

 On Mar 20, 9:00 pm, Lovedumplingx lovedumpli...@gmail.com wrote:

  That's what I thought too but I crash the task every time the activity
  that contains this code is started:

  EditText userText = (EditText) findViewById(R.id.userText);
  userText.setText(userParam);

  This is the basic way I thought to have the value set but it crashes
  every time.

  On Mar 19, 10:53 pm, Isaac Waller ad...@isaacwaller.com wrote:

   A String _is_ a CharSequence. There is no need for a cast.

   On Mar 19, 3:35 pm, Will sem...@gmail.com wrote:

Cast the String to a CharSequence.

String x = foo;
   EditTextET;
ET.setText((CharSequence) x);

On Mar 19, 10:43 am, Lovedumplingx lovedumpli...@gmail.com wrote:

 Ok...so I've scoured and scoured and played and fiddled but I can't
 figure it out.

 I want to allow the user to set preferences for an application and I
 want the preferences to be displayed in theEditTextarea if/when they
 come back to change them again.

 In my head I'm thinking I would be able to use setText() but no...that
 takes a CharSequence and I have a string and don't know how to make a
 CharSequence (which according to what I've read is supposed to be a
 read-only thing anyway).

 So...does anyone know how to put text into anEditTextfield without
 relying on the XML?  I really want to do this via application
 preferences.

 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: How to config G1 to make both browser and MMS work?

2009-03-21 Thread Tomas

Hi,

try setting the apntype for the browser APN to default and the
apntype for the MMS APN to mms, I have similar setup (two APN) on my
G1 from T-mobile.

Cheers
T.

On Mar 18, 8:37 am, FayGU gqm...@gmail.com wrote:
 I have a G1 phone and use it in mainland China.
 But I can't config it to work with browser and MMS at the same time.
 However with differentAPN, the browser and MMS can work seperately.
 For browser, I use followingAPNconfig:
 ---
 name:cmnetapn: cmnet
 proxy:blank
 port:blank
 username:blank
 password:blank
 server:blank
 mmsc:blank
 mms proxy:blank
 mms port:blank
 mcc:460
 mnc:00apntype:blank
 --

 For MMS, I use followingAPNconfig:
 --
 name:cmwapapn: cmwap
 proxy:blank
 port:blank
 username:blank
 password:blank
 server:blank
 mmsc:http://mmsc.monternet.com
 mms proxy:010.000.000.172
 mms port:80
 mcc:460
 mnc:00apntype:blank
 ---

 When above two APNs both exists, only browser can work. MMS doesn't
 work any more.

 Does any google export know that how to config G1 to make both browser
 and MMS work?
 If it's a known issue, is there any roadmap to fix it?
 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] Search within Android Mailing Lists

2009-03-21 Thread Ashutosh Agrawal
Hi,
Searching in Android mailing lists has now become easy with

http://android-search.blogspot.com/

Cheers,
Ashutosh

--~--~-~--~~~---~--~~
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-03-21 Thread konbuscoo...@gmail.com

Don't you think download from the server is too slow for a video
file ?
I still don't get why the video couldn't be played as a resource

Does there anyone else got more luck ?
Please help , thank you very much !

On Jan 21, 12:21 pm, Mahesh Vaghela mah...@indianic.com wrote:
 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:
 

[android-beginners] error in xml for hello world

2009-03-21 Thread xxdjxx

hey, is there a certain namespace this should be set to, because for
some reason it comes up as an error in Eclipse.

a href=http://s539.photobucket.com/albums/ff351/xXdj415Xx/?
action=viewcurrent=helloworldxmlerror.jpg target=_blankimg
src=http://i539.photobucket.com/albums/ff351/xXdj415Xx/
helloworldxmlerror.jpg border=0 alt=Photobucket/a

--~--~-~--~~~---~--~~
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 xml for hello world

2009-03-21 Thread Xavier Ducrohet

I would be more helpful if you told us the actual error.

Look in the Problems view of Eclipse.

Xav

On Fri, Mar 20, 2009 at 9:58 PM, xxdjxx xxdj41...@gmail.com wrote:

 hey, is there a certain namespace this should be set to, because for
 some reason it comes up as an error in Eclipse.

 a href=http://s539.photobucket.com/albums/ff351/xXdj415Xx/?
 action=viewcurrent=helloworldxmlerror.jpg target=_blankimg
 src=http://i539.photobucket.com/albums/ff351/xXdj415Xx/
 helloworldxmlerror.jpg border=0 alt=Photobucket/a

 




-- 
Xavier Ducrohet
Android Engineer, Google.

--~--~-~--~~~---~--~~
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: Droidweb.com

2009-03-21 Thread Jean-Baptiste Queru

android-discuss would have been a much better place to post your announcement.

Thanks,
JBQ

On Fri, Mar 20, 2009 at 11:03 AM, triplem triplemwebdesi...@gmail.com wrote:

 I've recently started a blog / forum dedicated to covering Android. I
 plan to cover the latest news reguarding Android, including new
 devices, programs, and other developments. Furthermore, there is a
 forum community in which I hope to bring developers such as yourself,
 and users together for an exchange of programming ideas, and ideas on
 the direction to which the Android platform should take.

 Right now the forum / blog is bare, but updates are coming daily .
 Also I need knowledgeable people like you to start a community before
 I can have a successful forum.

 Check it out @ DroidWeb.com

 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---