[android-developers] Home Screen source code in SDK 1.0

2009-02-06 Thread Jose Cortes

Hello everybody.

I have been looking the home Screen source code (The Launcher code) in
the Android project page: http://android.git.kernel.org/

And, in this case, there are some classes that are not implemented in
the actual public SDK (1.0), like android.provider.LiveFolders. I
supose that is normal, because they are continuing developing and
creating new packages and so...

The thing is... Does anyone know a place to get the soure code to the
actual launcher (home) with the public/official SDK?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question on Multicomplete Text View

2009-02-06 Thread for android
I need to use a CursorAdapter to display the contacts in an auto complete
view.When the user has selected/typed the contacts he wants , how do i
retrieve the ids of the contacts he has typed in or selected.

I tried to use the onItemClicked,but if the user has typed the contact name
himself,I have no way of knowing the id of the typed contact.

Thanks for your time.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] File Reading Writing Problem

2009-02-06 Thread Sajid Iqbal

I am trying to read  write a text file, what am I doing is

1- Have made a text file raw folder in res (in my project)
2- try to read this file from code, inside an activity, below is the code

InputStream 
inputStram=appContext.getResources().openRawResource(R.raw.TestFile);
byte btArray[]= new byte[1000];
inputStram.read(btArray);
Log.i(,btArray.toString());
}catch(Exception exp)
{
Log.i(,File Exception);
}

-2ndly how I could write to a file.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-06 Thread suhas gavas
Hi,
I have used media player in my formal game which was 2d game ...
At that time I used view  . But now its 3d game and so i have
extended surfcae view . So much rendering is done at run time
. So i thing this must be issue as cpu is overloaded and i have
checked this in ddms (CPU Usage). I m yet not satisfied
with media player api of android .. Also prb with sound pool is that
some times sample sound is not ready to play as might be some problem in
that ... Truley i think sound api should be well furnished as i have
checked on iphone and the game works fine as sounds are also played 
I mean that same game is working fine on iphone with huge sound files in
term of size also


On Fri, Feb 6, 2009 at 12:04 PM, Dave Sparks davidspa...@android.comwrote:


 Suggest you try running top to find out what's hogging the CPU.

 On Feb 5, 9:22 pm, suhas gavas suhas.ga...@gmail.com wrote:
  Hi,
  No ... i m not playing 6 to 7 mp3 files at same time ..
  later that day i have tried with just playing one single file and same
 issue
  . But then i tried SoundPool api and it worked fine
  . Then also i wonder what was the prb with mediaplayer
 
  On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks davidspa...@android.com
 wrote:
 
   If you are playing 6 or 7 MP3 files at the same time, you are probably
   saturating the CPU just decoding the audio.
 
   On Feb 5, 1:10 am, suhas gavas suhas.ga...@gmail.com wrote:
hi,
 
My program is a 3d game . And i m creating 6 to 7
 media
player in my game .. so is this y the warning is flashed ?
 
On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks davidspa...@android.com
 
   wrote:
 
 The message could be a clue, it's trying to tell you that the CPU
 is
 overloaded, i.e. you're trying to do too much. Have you tried
 running
 top to check the CPU load?
 
 On Feb 4, 10:32 pm, suhas suhas.ga...@gmail.com wrote:
  Hi all,
  I m using mp3 sound in my game (used wav format also) 
  while
  playing sound i get problem as  obtainBuffer timeout (is the CPU
  pegged) and then sound gets played after some time i.e it is not
  syncronized with the game play ... plz help me with this
 issue
 
  Thnxs
  Suhas
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SSL certificate bypassing for DigiCert

2009-02-06 Thread Eric Chan
I met the same problem as you, if any solution please let me know?


Best Regards

Eric Chan

On Fri, Jan 9, 2009 at 1:17 AM, NitroDesk gsuku...@gmail.com wrote:


 Hello,
 We have pulled a lot of hair out for this one.

 We use the DefaultHttpClient to connect with exchange servers. In
 order to get past sites with self issued certs, we save the cert in a
 file, then when connecting, we get the keystore, add the saved
 certificate to the keystore as a TrustedCertificateEntry. This works
 for all self-certified sites, and most other sites which dont have
 their roots in the trusted list.

 BUT with Digicert issued certificates, doing this still causes the no
 trusted certificate error.
 I was wondering if anyone else had this problem, or if the Android
 group is even aware of this.
 Note that we HAVE to use DefaultHttpClient, and using the other
 classes is not something we are able to do.

 Even adding all the certs in the chain to the keystore does not seem
 to help.

 thanks and regards
 -g
 



-- 
Best Regards

Eric Chan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView: Disable Focus Highlight

2009-02-06 Thread Marco Schmitz

otherwise try it with your own theme. you need to take a look at
theme.xml and styles.xml in your sdk in order to manipulate your list
selector (which is shown above your list items, so manipulating them
wont help)

greetings
darolla

2009/2/6 BoD bodl...@gmail.com:
 Thanks a lot, I'll try that.

 BoD

 On Feb 6, 2009 12:29 AM, Emmanuel emmanuel.ast...@gmail.com wrote:


 In order not to have the items selectable, I disable them by code
 ( but it is perhaps doable in the xml files ), in the adapter
 definition :

 ListAdapter adapter = new SimpleCursorAdapter(MyList, Layout, c,
new String[] { Name, Score }, to)
 {
public boolean areAllItemsEnabled()
{
return false;
}

public boolean isEnabled(int position)
{
return false;
}
 };

 and it's ok...

 Emmanuel
 http://androidblogger.blogspot.com/


 On Feb 5, 12:08 am, BoD bodl...@gmail.com wrote:
 I too have this problem.
 I tried this solution (setting the listSelector to #), but
 even though it does suppress the Orange background there's a side
 effect: the text is darker.
 Isn't there a proper way to completely disable the focusable/
 selectable behavior of a ListView? If you can make it not clickable,
 it should make sense that it is also not possible to select cells.

 Thanks for your help!

 BoD

 On Feb 2, 12:47 pm, Mark Murphy mmur...@commonsware.com wrote:

  fahad wrote:
   Hi,

   I've set the row (view) being used in a ListView as non-focusable
   along with non-clickable and have set the listview's focusable flag to
   false as well. However, I still get the yellow highlight when I use
   the scroll-ball on my device. How can I disable the yellow highlight
   and use my own special view/color instead upon focus?

   Any help would be much appreciated.

  android:listSelector in your ListView XML will allow you to change the
  color/drawable used for the highlight. You can also set it to be fully
  transparent (#) and roll your own highlighting, if you feel
  the need.

  --
  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 Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to add 3-4 items in list view

2009-02-06 Thread Marco Schmitz

you need to create an xml for each children row. please take a look at
the 14 list source codes inside your api samples.

greetings,
darolla

2009/2/6 munish munish.sha...@lntinfotech.com:

 Can any one please tell me how to add multiple items (images/text) in
 list view
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to add 3-4 items in list view

2009-02-06 Thread munish

hey thanx
Marco.

On Feb 6, 3:16 pm, Marco Schmitz netzprofi.ma...@googlemail.com
wrote:
 you need to create an xml for each children row. please take a look at
 the 14 list source codes inside your api samples.

 greetings,
 darolla

 2009/2/6 munish munish.sha...@lntinfotech.com:





  Can any one please tell me how to add multiple items (images/text) in
  list view- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to programmically add a new contact in android

2009-02-06 Thread MichaMicha

values.clear();
doesn't look right, right?

On 6 feb, 08:30, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
 Hi,

 I am trying to programmically add a new contact in android.

 What I did is this:

   Uri uri = Contacts.People.CONTENT_URI;
                 values.put(Contacts.PeopleColumns.NAME, mydummyuser1);
                 Uri newuri = myActivity.getContentResolver().insert(uri, 
 values);

                 Uri phoneUri = Uri.withAppendedPath(newuri,
 Contacts.People.Phones.CONTENT_DIRECTORY);

                 values.clear();
                 values.put(Contacts.PhonesColumns.ISPRIMARY, 1);
                 values.put(Contacts.PhonesColumns.TYPE,
 Contacts.PhonesColumns.TYPE_CUSTOM);
                 values.put(Contacts.PhonesColumns.LABEL, Other);

                 String formattedPhone = 
 PhoneNumberUtils.formatNumber(555666);
                 values.put(Contacts.PhonesColumns.NUMBER, formattedPhone);
                 Uri newPhoneUri =
 myActivity.getContentResolver().insert(phoneUri, values);

 But as soon as I kill and restart my emulator, the contact that I add is gone.

 Can you please tell me why?

 Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads

2009-02-06 Thread blindfold

 I had only problems with memory leaks beetween application launches.

I had exactly the same problem until recently, and for the time being
just used System.exit(1) at the end of onDestroy() for a fresh
restart. Causing a memory exception might have partially the same
effect, but probably without any guarantees.

Regards

On Feb 6, 12:21 pm, ad avra...@gmail.com wrote:
 Exception throwed on application start causes bitmaps memory freeing.
 That's all, I had only problems with memory leaks beetween application
 launches. So that's the best solution for me right now.
 Regards.
 avram

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] access to class not allowed

2009-02-06 Thread johnny

I get an apk file from somewhere. I tried to install it the emulator
successfully. (The emulator is built from the latest code in AOSP
which should be cupcake or later). But I can't launch the application
from the GUI. It complains The application xxx has stopped
unexpectedly. After checking the logcat, I find the message access
to class not allowed. It seems that that process is not allowed to
instantiate the Activity class.

Since I can install the apk successfully, I am curious why I can't
launch it as a user.

BTW, I tried two ways to install the app. 1) by copying it to /system/
app and rebuild the system.img 2) by using adb install. Both getting
the same error message.

I tried to extract the AndroidManifest.xml file from the apk.  But it
seems that the file is scrambled and can't read.

Any idea?

Thanks,
Johnny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Read/write JPEG metadata (e.g. in EXIF format)

2009-02-06 Thread Mike Reed

There is not (afaik) yet. What specific uses do you have (to help
scope the request)?

On Fri, Feb 6, 2009 at 5:43 AM, GiladH gila...@gmail.com wrote:

 Hey guys,

 Is there a way to directly access a Jpeg's file metadata, without
 having to go through the ImageManager services?


 Tnx, GiladH


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BitmapShader performance

2009-02-06 Thread Mike Reed

Doh! You've stumbled across a known missing optimization. No promises,
but this has been identified as an future optimization.

The dirty details are that the current code has special optimizations
for a straight drawBitmap when there is no matrix (other than
translate). In addition, there is another optimization for SRC mode
with 32bit bitmaps, where the blitter can literally call memcpy, since
there is no need to inspect the src pixels for blending. Neither of
these optimizations exist (yet) for the bitmapshader code.

On Thu, Feb 5, 2009 at 5:41 PM, tomgibara m...@tomgibara.com wrote:

 Romain, Thanks for the explanation.


 On Feb 5, 10:26 pm, Romain Guy romain...@google.com wrote:
 Tom,

 A shader is a per-pixel operation, which lets you apply it to any
 shape, respecting alpha blending as well. As such it is not surprising
 that your first method is faster.



 On Thu, Feb 5, 2009 at 2:08 PM, tomgibara m...@tomgibara.com wrote:

  I'm experimenting with tiling a fullscreen image (480x320px ARGB
  bitmap) with a square image (160x160px ARGB bitmap). My initial
  implementation was naive:

  public void render(Canvas canvas) {
 final int size = tile.getWidth();
 final int w = canvas.getWidth();
 final int h = canvas.getHeight();
 for (int y = 0; y  h; y += size) {
 for (int x = 0; x  w; x += size) {
 canvas.drawBitmap(tile, x, y, null);
 }
 }
  }

  Then I remembered that Paint supports a Shader, so I swapped this
  implementation for something much more satisfying:

  public void render(Canvas canvas) {
 canvas.drawPaint(paint);
  }

  Where paint is initialized outside this method with:

  paint = new Paint();
  paint.setShader(new BitmapShader(tile, Shader.TileMode.REPEAT,
  Shader.TileMode.REPEAT));

  I expected that using a BitmapShader would be competitive with the
  first implementation and probably slightly faster. But initial
  benchmarking indicates that the first method is more than twice as
  fast (almost 3x as fast if PorterDuff.Mode.SRC is used for both). I
  found that surprising.

  Is there a good reason that the BitmapShader is necessarily much
  slower, or does it point to a deficiency in its implementation?

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to add 3-4 items in list view

2009-02-06 Thread mscwd01

This was a little confusing to me at first so I hope this code extract
will help you out:

Java:
--

public View getView(int position, View convertView, ViewGroup parent)
{

  // Inflate row layout from 'list_row.xml'
  View row = inflater.inflate(R.layout.list_row, null);

// Set Photo
ImageView photo = (ImageView) row.findViewById(R.id.photo);
photo.setImageBitmap(photoFromResources);
// Set  Name
TextView name = (TextView) row.findViewById(R.id.name);
name.setText(Name to appear);

return (row);
}



XML 'list_row.xml'
-

?xml version=1.0 encoding=utf-8?

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent android:layout_height=64px

ImageView android:id=@+id/photo
android:layout_width=64px android:layout_height=64px
android:layout_x=0px android:layout_y=0px/

TextView android:id=@+id/name android:layout_width=wrap_content
android:layout_height=wrap_content android:paddingLeft=8px
android:paddingTop=5px /

/RelativeLayout

Hope that helps!




On Feb 6, 10:34 am, munish munish.sha...@lntinfotech.com wrote:
 hey thanx
 Marco.

 On Feb 6, 3:16 pm, Marco Schmitz netzprofi.ma...@googlemail.com
 wrote:

  you need to create an xml for each children row. please take a look at
  the 14 list source codes inside your api samples.

  greetings,
  darolla

  2009/2/6 munish munish.sha...@lntinfotech.com:

   Can any one please tell me how to add multiple items (images/text) in
   list view- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Read/write JPEG metadata (e.g. in EXIF format)

2009-02-06 Thread GiladH

Hey guys,

Is there a way to directly access a Jpeg's file metadata, without
having to go through the ImageManager services?


Tnx, GiladH


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem

2009-02-06 Thread Marco Schmitz

hi,

maybe you start with the onTouchEvent which each Activity has:

public boolean onTouchEvent(MotionEvent event) {...}

then you can get the Id of each button.

changing the way the button looks can be manipulated using
button.setBackground().

there you can add a resource (like a .png or a .9.png)

hope this helps you a little

greetings
darolla

ps: I am sorry that you got those stupid answers yet...



2009/2/4 jsymone...@prosoftco.com jsymone...@prosoftco.com:

 Your kidding me?  A developer asks a questions and you two are rude to
 him?  If you don't have something to say to answer the question, why
 bother even responding?  No one needs to hear your snide remarks
 especially when someone is trying to learn and grow in this area.

 On Feb 4, 9:13 am, Faber Fedor faberfe...@gmail.com wrote:
 Start 
 here:http://www.catb.org/~esr/faqs/smart-questions.htmlhttp://www.catb.org/%7Eesr/faqs/smart-questions.html



 On Wed, Feb 4, 2009 at 10:50 AM, Alowishus alowis...@gmail.com wrote:

  Okay Gang,

  Here is the problem, I am building an application and have multiple
  images that need to switch when the user touches the screen, doesn't
  matter where the users touches. The press the screen and the images
  switch randomly. I purchased the ebook Professional Android
  Application Development and have torn though it. I am stumped. I'm
  thoroughly confused at this point. Any ideas on where I can go or how
  I can accomplish this?

  The simpler the terms you can put it in the better.

  Thanks in advance,

  Kevin

 --

 Faber Fedor
 Cloud Computing New Jerseyhttp://cloudcomputingnj.com

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Updation of the Media Data base in emulator only on bootup/mount/recording?

2009-02-06 Thread Rishi

When i added a media file to the sdcard an update in the MediaProvider
database is not happening. When i bootup the emulator it happens .
Is this the expected behaviour ?

- Rishi Kaura
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Home Screen source code in SDK 1.0

2009-02-06 Thread Marco Schmitz

you can download the whole 2gb android sources using GIT (there is a
windows implementation for that, too)

:)

greetings,
darolla

2009/2/6 Jose Cortes jbeerb...@gmail.com:

 Hello everybody.

 I have been looking the home Screen source code (The Launcher code) in
 the Android project page: http://android.git.kernel.org/

 And, in this case, there are some classes that are not implemented in
 the actual public SDK (1.0), like android.provider.LiveFolders. I
 supose that is normal, because they are continuing developing and
 creating new packages and so...

 The thing is... Does anyone know a place to get the soure code to the
 actual launcher (home) with the public/official SDK?


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Debugging applications with Google MAP api on an actual device

2009-02-06 Thread Eric Chan
I met the same problem with you, pls let me know if you got the answer.

*
*
On Fri, Dec 5, 2008 at 3:20 AM, BobW b...@whelanhome.com wrote:


 When I run my map application in the debugger, I can see the map on
 the emulator (I have a MAP key for my debugger from Google), but I
 can't see it from my actual device.
 I can get a release key from Google, and sign a apk with my
 certificate, but I am not sure how to install it on the device or how
 to debug the application on the actual device.

 Any advice would be appreciated.

 Thanks

 



-- 
Best Regards

Eric Chan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView responding to touch events

2009-02-06 Thread Fred Grott(shareme)

I have been looking for this information can you detail if it occurs
both in emulator and/or device?




On Feb 5, 9:46 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I just tried adding an OnTouchListener to the webview and I get ALL
 the touch events.  However, the links in the webview to not appear
 selected/focused...  This seems really weird to me.  Anyone have an
 idea why I would receive an OnTouch event for the view but the view
 itself does not seem to respond to those events?

 On Feb 5, 9:36 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

  I have an Activity that has a WebView that contains some simple html
  that allows me to display a Terms  Conditions link that if touched or
  clicked calls another activity.  My problem is unless the link in the
  WebView has focus (ie, the text is wrapped with that little orange
  focus) I cannot touch the link and have it work.  If any other view on
  the activity has focus, touching the WebView with the link does
  nothing.  The other Views that had focus loose focus, but the WebView
  does not receive focus.  I have tried calling setFocusable(true) and
  setFocusableInTouchMode(true) but that does not do any good...

  I would really like to know what you have to do to get a WebView to
  respond to touch events without using the trackball to scroll to the
  view before touching it.

  thank you,
  Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to programmically add a new contact in android

2009-02-06 Thread Meryl Silverburgh

That line is after my first insert.

On Fri, Feb 6, 2009 at 4:23 AM, MichaMicha micha.okker...@gmail.com wrote:

 values.clear();
 doesn't look right, right?

 On 6 feb, 08:30, Meryl Silverburgh silverburgh.me...@gmail.com
 wrote:
 Hi,

 I am trying to programmically add a new contact in android.

 What I did is this:

   Uri uri = Contacts.People.CONTENT_URI;
 values.put(Contacts.PeopleColumns.NAME, mydummyuser1);
 Uri newuri = myActivity.getContentResolver().insert(uri, 
 values);

 Uri phoneUri = Uri.withAppendedPath(newuri,
 Contacts.People.Phones.CONTENT_DIRECTORY);

 values.clear();
 values.put(Contacts.PhonesColumns.ISPRIMARY, 1);
 values.put(Contacts.PhonesColumns.TYPE,
 Contacts.PhonesColumns.TYPE_CUSTOM);
 values.put(Contacts.PhonesColumns.LABEL, Other);

 String formattedPhone = 
 PhoneNumberUtils.formatNumber(555666);
 values.put(Contacts.PhonesColumns.NUMBER, formattedPhone);
 Uri newPhoneUri =
 myActivity.getContentResolver().insert(phoneUri, values);

 But as soon as I kill and restart my emulator, the contact that I add is 
 gone.

 Can you please tell me why?

 Thank you.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sampling

2009-02-06 Thread Sundog


Is it possible to piggyback the audio stream or the microphone and
get raw sample data from it? Can anyone point me to some
documentation?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application storage data growing

2009-02-06 Thread Rmac

I've had debugging on from the beginning.  What I need is something
that can tell me exactly what is in the application's data area that
Android reports via Settings for managing applications.  I am sure my
application is adding to it somehow, but I have no handle to tell what
content is stored there.


On Feb 5, 5:08 am, Chander Pechetty cspeche...@gmail.com wrote:
 Not sure if you can do this, but check 
 outhttp://code.google.com/android/intro/develop-and-debug.html#developin...
 to understand the tools and limitations
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Home Screen source code in SDK 1.0

2009-02-06 Thread Romain Guy

Hi,

The GIT repository has a branch called release-1.0 which contains
the source code of Home as found in SDK 1.0.

On Fri, Feb 6, 2009 at 3:48 AM, Jose Cortes jbeerb...@gmail.com wrote:

 Well, I can download the branch of the project I need (I have done
 that). The point is, that I need to work with the present SDK, the
 official, and I need to know how present Home is made. The fires that
 are on the web (Android source code) are in development, so they are
 using, probably, the SDK 1.5.

 Maybe anyone who downloaded the code some time ago, would have a copy
 of the proyect I need. Anyway, I will keep searching.





 On 6 feb, 11:14, Marco Schmitz netzprofi.ma...@googlemail.com wrote:
 you can download the whole 2gb android sources using GIT (there is a
 windows implementation for that, too)

 :)

 greetings,
 darolla

 2009/2/6 Jose Cortes jbeerb...@gmail.com:



  Hello everybody.

  I have been looking the home Screen source code (The Launcher code) in
  the Android project page:http://android.git.kernel.org/

  And, in this case, there are some classes that are not implemented in
  the actual public SDK (1.0), like android.provider.LiveFolders. I
  supose that is normal, because they are continuing developing and
  creating new packages and so...

  The thing is... Does anyone know a place to get the soure code to the
  actual launcher (home) with the public/official SDK?
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads

2009-02-06 Thread ad

Exception throwed on application start causes bitmaps memory freeing.
That's all, I had only problems with memory leaks beetween application
launches. So that's the best solution for me right now.
Regards.
avram

On Jan 27, 12:09 am, blindfold seeingwithso...@gmail.com wrote:
  Check first, and think a bit.

 I stand by what I said.

 Regards

 On Jan 25, 8:30 pm, ad avra...@gmail.com wrote:

  Check first, and think a bit.

  On Jan 25, 2:49 pm, blindfold seeingwithso...@gmail.com wrote:

   How can this possibly help you? You are trying to allocate 61 MB
   (3200*4800*4 bytes), which lies well above the 16 MB heap limit. I
   tried once to allocate, say, 12 MB at program startup to keep Android
   from all the time bumping into the heap limit and possibly crashing as
   a result in case its memory management is not 100% reliable, but
   trying to allocate 61 MB should not offer any benefit?

   Regards

   On Jan 25, 2:23 pm, ad avra...@gmail.com wrote:

YES YES YES!!!
I've found solution for that bug.
It's tricky but it works.
Place that on the begining of your code.

                try{
                               BitmaptmpBitmap =Bitmap.createBitmap
(3200, 4800,
Config.ARGB_);
                }catch(Throwable e){
                        e.printStackTrace();
                        System.out.println(CATCHED );

                }

I was fighting with that about 4 days.
Hope anyone is happy now, that was hell.

Regards,
avram.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Home Screen source code in SDK 1.0

2009-02-06 Thread Jose Cortes

Well, I can download the branch of the project I need (I have done
that). The point is, that I need to work with the present SDK, the
official, and I need to know how present Home is made. The fires that
are on the web (Android source code) are in development, so they are
using, probably, the SDK 1.5.

Maybe anyone who downloaded the code some time ago, would have a copy
of the proyect I need. Anyway, I will keep searching.





On 6 feb, 11:14, Marco Schmitz netzprofi.ma...@googlemail.com wrote:
 you can download the whole 2gb android sources using GIT (there is a
 windows implementation for that, too)

 :)

 greetings,
 darolla

 2009/2/6 Jose Cortes jbeerb...@gmail.com:



  Hello everybody.

  I have been looking the home Screen source code (The Launcher code) in
  the Android project page:http://android.git.kernel.org/

  And, in this case, there are some classes that are not implemented in
  the actual public SDK (1.0), like android.provider.LiveFolders. I
  supose that is normal, because they are continuing developing and
  creating new packages and so...

  The thing is... Does anyone know a place to get the soure code to the
  actual launcher (home) with the public/official SDK?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-06 Thread Justin (Google Employee)

Ronald,

I've asked the Market team to take a look at your app specifically.
I'll update you as I get new information.

Cheers,
Justin
Android Team @ Google

On Feb 5, 12:43 pm, Ronald van der Lingen lin...@jsource.nl wrote:
 At this moment the developer console is still showing 0 downloads
 after the app has been available for a week.

 I really suspect that something is wrong with the download count for
 applications targeted to the Netherlands (or even downloads from the
 Netherlands in general). I have checked several apps in themarket
 that are targeted to the Netherlands, and all of them show a download
 count of 50.

 I cannot imagine that apps that received a lot of publicity around the
 launch have not been downloaded more than 50 times. This leads me to
 believe that the developers of these applications also will see 0
 downloads in their developer console.

 Do any of the developers targeting apps to other new regions (Germany,
 Poland, etc) experiencing the same?

 Kind regards,
 Ronald

 On Feb 3, 7:43 pm, Justin (Google Employee) j...@google.com wrote:

  Ronald,

  I've talked with theMarketteam and there may be a delay in
 statisticsgathering. My recommendation is to wait a day or two and
  see what your results are then. Either way, please post back with your
  results in a day or two.

  Cheers,
  Justin
  Android Team @ Google

  On Feb 3, 9:51 am, Ronald van der Lingen lin...@jsource.nl wrote:

   The name of my application is PimPam.

   Thank you,
   Ronald

   On Feb 3, 5:07 pm, Justin (Google Employee) j...@google.com wrote:

What is the name of your application? If you're not comfortable
sharing this publicly, please message me privately.

Cheers,
Justin
Android Team @ Google

On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:

 Last week I published our first app to theMarket, which is a game
 targeted to users in The Netherlands. Now that the G1 has been
 available over here for a couple of days, we have received feedback
 from several of our users.

 When I look at the developers console in themarkethowever, the
 download count still shows 0. Also on the device it is listed as 50.
 When looking around in theMarket, I see that all applications
 targeted to The Netherlands are listed as having 50 downloads, even
 an application that received a lot of publicity.

 Have other developers noticed the same?

 Kind regards,
 Ronald
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to set RESULT_OK when activity exit?

2009-02-06 Thread Al

You need to call setResult before calling finish(), e.g.

setResult(RESULT_OK);
finish();

You can also pass data back to the previous activity using:

setResult(int, Intent);

On Feb 6, 6:24 am, jj jagtap...@gmail.com wrote:
 how to set RESULT_OK when activity exit?

 I am launching list activity from main activity using
 startActivityForResult, after doing work with list activity; i exit
 from it from it using finish() but it doesn't propagate RESULT_OK to
 main activity in  onActivityResult(), what should I do , so that
 listact should return RESULT_OK

 thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Querying in Sqlite

2009-02-06 Thread Al

Hi, I'm not sure exactly what you mean. If you mean something like
mysql command line interface, you can use sqlite3 from adb shell to
execute queries directly.

On Feb 6, 6:32 am, And-Rider rahulregunat...@gmail.com wrote:
 Is it possible to pass a query directly and check the values that has
 been inserted for a particular table in a database using the SQlite3
 UI (like what we do in SQLSERVER) or should i write a program to
 display the values inserted for a particular table??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application storage data growing

2009-02-06 Thread Dianne Hackborn
Unfortunately it's a little tricky, because only your app (and some very
very low-level parts of the system) can touch your data.  You can, however,
just add some code to your app that iterates through your data directories
with the standard Java File APIs and prints out what it finds.

On Fri, Feb 6, 2009 at 8:36 AM, Rmac ry...@mac.com wrote:


 I've had debugging on from the beginning.  What I need is something
 that can tell me exactly what is in the application's data area that
 Android reports via Settings for managing applications.  I am sure my
 application is adding to it somehow, but I have no handle to tell what
 content is stored there.


 On Feb 5, 5:08 am, Chander Pechetty cspeche...@gmail.com wrote:
  Not sure if you can do this, but check outhttp://
 code.google.com/android/intro/develop-and-debug.html#developin...
  to understand the tools and limitations
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: custom EditText that executes callback function

2009-02-06 Thread Al

How about something like this:

public class myClass extends Activity implements OnKeyListener {

private EditText mInput;

@Override
public void onCreate(Bundle savedState) {

//set layout and initialize mInput and set the keyListener to 'this'


}

@Override
public boolean onKey (View v, int keyCode, KeyEvent event) {

   switch (event.getKeyCode()) {

case (KeyEvent.KEYCODE_ENTER) :
  myFunc();
  return true;
}

   return false;
  }

}

On Feb 6, 1:54 am, ashu montoo...@gmail.com wrote:
 I have a user input box that I want to execute a function every time I
 press enter.  I can't call super.onKey(...) to do the standard text
 input.

 I have two ways to solve this problems, but I'm having trouble looking
 for places to find out how to do this.
 1. Convert the keycode to a character that I can append to (theText)
 2. Find a standard onKeyListener that I can call

 ---
 final EditText userInputBox = (EditText) findViewById
 (R.id.editTextItems);
         userInputBox.setOnKeyListener(new OnKeyListener()
         {
                 public boolean onKey(View v, int keyCode, KeyEvent event)
                 {
                     // code
                         Editable theText = userInputBox.getText();
                         int pressedKey = event.getUnicodeChar();
                         if (pressedKey == '\n')
                         {
                                 addUserInput();
                         }

                         return true;
                 }
         });
 ---
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: RC33 for Dev Phone

2009-02-06 Thread Timothy DeWees

So do I need a special update package other than the ones signed by
Google linked here:

http://forum.xda-developers.com/showthread.php?t=479571


On Feb 5, 9:52 pm, Jean-Baptiste Queru j...@android.com wrote:
 The bootloader does allow unsigned filesystem images. The recovery
 system still checks the update packages for signatures.

 JBQ

 On Thu, Feb 5, 2009 at 6:20 PM, Mark L. Chang mark.ch...@gmail.com wrote:



  On Feb 5, 8:57 pm, Timothy DeWees whtdrgn...@gmail.com wrote:
  This one doesn't seem to work for me.  It fails at the verifying
  package stating that it's not signed.

  which is weird, since I thought the dev phone would allow unsigned
  firmware?

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OpenGL Ambient Lighting

2009-02-06 Thread Patrick

I'm getting some strange results when enabling ambient lights in
openGL. After some experiments, I determined that for some reason, the
ambient light color is multiplied by 0.2f. That is, setting an ambient
light of color ( 5.0f, 0.0f, 0.0f, 1.0f ) is needed to get a pure red
ambient, not the expected ( 1.0f, 0.0f, 0.0f, 1.0f ), which yields a
dark red ambient.

I even tried setting the ambient light model :

float full[] = { 1.0f, 1.0f, 1.0f, 1.0f };
gl.glLightModelfv(GL10.GL_LIGHT_MODEL_AMBIENT, full, 0);

But that makes no difference.

Note that the diffuse component does not suffer from this 0.2f factor,
only the ambient.

Notice that all the default values in openGL for ambient-related stuff
is 0.2f, so I don't think this is a coincidence. Is there another
openGL function I should be calling to set a global factor ?

Thanks,

Patrick.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sampling

2009-02-06 Thread Dave Sparks

No, this is not supported in SDK 1.0.

On Feb 6, 8:34 am, Sundog sunns...@gmail.com wrote:
 Is it possible to piggyback the audio stream or the microphone and
 get raw sample data from it? Can anyone point me to some
 documentation?

 Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SOS: Please Help: IMport SMS from XML file to G1

2009-02-06 Thread babeinwoods

Alright, folks, I was a WM5 user - TMobile MDA (in UK TMobile MDA
Vario), and I switched to Android (TMobile G1)

There are some important messages that I want to keep (i.e. transfer
from MDA to G1). But as HTC (makers of MDA)'s website says, there's no
way of synching SMSs with PC...that there is no way to import/export
SMSs from HTC phones.

Well, thanks to http://wince.nasenbaeren.net/smsimport I have been
able to extract the SMSs from the MDA to my PC in XML format.

The syntax of the XML is:
- SMSExport
  - store name=SMS
- folder name=Deleted Items
  message date=mm/dd/ hh:mm:ss sender=Name
# recipient=#Message body/message
  message date=mm/dd/ hh:mm:ss sender=Name
# recipient=#Message body/message
/folder
  /store
/SMSExport

Now, for the next part of the project: how do I import SMSs from this
file onto my G1? Please help!

Many thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-06 Thread dengjiuhong

I found SoundPool is very useful!

On Feb 6, 1:22 pm, suhas gavas suhas.ga...@gmail.com wrote:
 Hi,
 No ... i m not playing 6 to 7 mp3 files at same time ..
 later that day i have tried with just playing one single file and same issue
 . But then i tried SoundPool api and it worked fine
 . Then also i wonder what was the prb with mediaplayer

 On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks davidspa...@android.com wrote:

  If you are playing 6 or 7 MP3 files at the same time, you are probably
  saturating the CPU just decoding the audio.

  On Feb 5, 1:10 am, suhas gavas suhas.ga...@gmail.com wrote:
   hi,

   My program is a 3d game . And i m creating 6 to 7 media
   player in my game .. so is this y the warning is flashed ?

   On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks davidspa...@android.com
  wrote:

The message could be a clue, it's trying to tell you that the CPU is
overloaded, i.e. you're trying to do too much. Have you tried running
top to check the CPU load?

On Feb 4, 10:32 pm, suhas suhas.ga...@gmail.com wrote:
 Hi all,
 I m using mp3 sound in my game (used wav format also)   while
 playing sound i get problem as  obtainBuffer timeout (is the CPU
 pegged) and then sound gets played after some time i.e it is not
 syncronized with the game play ... plz help me with this issue

 Thnxs
 Suhas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] my Activity extending ListActivity,null pointer exception when i select a list item which overstep the screen. why

2009-02-06 Thread george

code:
@Override
protected void onListItemClick(ListView l, View v, int position,
long id)
{
LinearLayout line = (LinearLayout)getListView().getChildAt
(position);
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with audio recording

2009-02-06 Thread bubble.vnhan

You shout creat new MediaRecorder one time, so that you shout creat
new MediaRecorder() inside
 part of buttonRecorder.
And also, you shout use method audioRecorder.stop().
if you correct 2 issue above, you will fix this bug.

if(v==buttonRecording){

audioRecorder = new MediaRecorder();

textRecording.setText(Recording);
textStopRecording.setText();

audioRecorder.setAudioSource
(MediaRecorder.AudioSource.MIC);
audioRecorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
audioRecorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);
audioRecorder.setOutputFile(Path_Name);
audioRecorder.prepare();
audioRecorder.start();   // Recording is now
started
}

if(v==buttonStopRecording){
textStopRecording.setText(Stop Recording);
textRecording.setText();

audioRecorder.stop();

//audioRecorder.reset();   // You can reuse the
object by going
//back to setAudioSource() step
audioRecorder.release(); // Now the object cannot
be reused
this is OK!!!

On Jan 24, 2:49 pm, haze...@gmail.com haze...@gmail.com wrote:
 I'm a student and currently doing my senior capstone project. I have
 problem with my codes on audio recording. whenever i clicked the
 record button in the emulator, it shows me an error alert, The
 application Audiorecording (process) has stopped unexpectedly.
 Please try again. can anyone help me? thanks

 public class AudioRecording extends Activity {
     /** Called when the activity is first created. */

         private Button buttonRecording, buttonStopRecording;
         private EditText textRecording, textStopRecording;
         public String Path_Name = /sdcard/test.3gpp;

  public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         textRecording = (EditText) findViewById(R.id.text1);
         textStopRecording = (EditText) findViewById(R.id.text2);
         buttonRecording = (Button) findViewById(R.id.buttonRecording);
         buttonStopRecording = (Button) findViewById
 (R.id.buttonStopRecording);
         buttonRecording.setOnClickListener(new clicker());
         buttonStopRecording.setOnClickListener(new clicker());
     }

     class  clicker implements Button.OnClickListener {
         public void onClick(View v)

         {
                 MediaRecorder audioRecorder = new MediaRecorder();

                 if(v==buttonRecording){

                         textRecording.setText(Recording);
                         textStopRecording.setText();

                         
 audioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
                         audioRecorder.setOutputFormat
 (MediaRecorder.OutputFormat.THREE_GPP);
                         audioRecorder.setAudioEncoder
 (MediaRecorder.AudioEncoder.AMR_NB);
                         audioRecorder.setOutputFile(Path_Name);
                         audioRecorder.prepare();
                         audioRecorder.start();   // Recording is now started
                 }

                 if(v==buttonStopRecording){
                         textStopRecording.setText(Stop Recording);
                         textRecording.setText();
                         audioRecorder.stop();
                         //audioRecorder.reset();   // You can reuse the 
 object by going
 back to setAudioSource() step
                         //audioRecorder.release(); // Now the object cannot 
 be reused

                         //String tag, label;
                         //TimingLogger timeRecord = new TimingLogger(tag, 
 label);

                 }

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android and Java Security Running Together

2009-02-06 Thread NguyenVinh

Hi Daniel,

Your post is a good news for me.

Actually, the dex jar files that were signed is so strange for me.

Currently, when DexFile wants to load a class of them (i.e. the dex
jar file), they define this class with a null ProtectionDomain
parameter. A way to fulfill the security for the dex jar file is
change this parameter to a valid ProtectionDomain object. However, I
can not really create a that object because the CodeSource object was
impossible to created by the JarVerifier is not successful. More
clearly in source code as here:
...
JarFile jf = new JarFile(path, true);
JarEntry je = jf.getJarEntry(classes.dex);
CodeSource cs = new CodeSource(url, je.getCertificates()); //--- at
this line, je.getCertificates() return null, so the creation failed.
...

For normal jar file (i.e they have class files, not dex file), the
creation is OK.

Could you explain why it fails to get certificates?

Thank you so much.

On Feb 5, 2:44 am, Daniel Janev d.ja...@prosyst.com wrote:
         Hi Guys,

 I've just succeeded in changing thesecuritymodel of the dalvik VM! So
 I've run an OSGi implementation on the android platform withsecurity.
 Of course it does not work without some hacks for file access and so
 on. But mainly thejavasecuritymodel works good enough. If anyone is
 interested in this I can share with you what have to be done.

 P.S. So, it seems that I was the first in the world to run it :)

 --

 Best Regards,
     Daniel
 ---
 Daniel Janev · Department Manager/Core Platform and Smart Home
 ProSyst Software GmbH
 1606 Sofia, Bulgaria · Vladajska Str. 48
 Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17
 Mobile Phone +359 (0)888 678 670http://www.prosyst.com· d.ja...@prosyst.com
 ---
 stay in touch with your product.
 ---

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to create two emulator instances in SDK 1.0 r2

2009-02-06 Thread mayank.android

Hi

  I am new to android, I am creating a app in which i want to send
and receive SMS. using Android 1.0 r2 release, found that there is
less classes is there which is provide support then compare to
prevoius release, so by reading some fourum comment  I get success in
receiving the sms which send by emulator control. using same
application i include the sending SMS functionality using one Send
button, also I want to know how to send SMS from emulator to
emulator?

Thanks,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to add shortcut in home screen by modifying config file ?

2009-02-06 Thread HelloWorld

Dear all,

  Would you please point me how to add more shortcuts in home screen?
-- I want to do this by modifying config file rather than draging an
app and dropping it on home screen. Namely, I want to know which
config file contains these shortcuts. Thanks for your help in
Advance.

Thanks,
HelloWorld

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to mount the sd card to pc via android application?

2009-02-06 Thread Azreal Yang

i want to access gphone's sd card when the gphone connect to the pc
via usb, but i need click mount on notifications...is there any way
when the gphone connect to pc, then pc can access the sd card?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] seek bar implementing problem

2009-02-06 Thread Er. syed imran ali

hello Dear friends!
i am trying to implement seekbar or progress bar, but i am getting
problem to synchronize with file.
so, if any body has code  for seekbar/progress bar in media player
kindly send me.. or give me process to implement.

Thanks and regards
Er. Syed Imran Ali

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to create two emulator instances in SDK 1.0 r2

2009-02-06 Thread mayank.android

Hi,
 I am new to android, I am creating a app in which i want to send and
receive SMS. using Android 1.0 r2 release, found that there is less
classes is there which is provide support then compare to prevoius
release, so by reading some fourum comment  I get success in receiving
the sms which send by emulator control. using same application i
include the sending SMS functionality using one Send button, also I
want to know how to send SMS from emulator to emulator?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-06 Thread Syed Malgimani
Can any one help me in getting the tool for code coverage for Android
Application,

How to intergarte with Eclipse.

I had tried with EclEmma Code Coverage tool, it gives code coverage for the
normal Java Applications,

Can u please suggest any Code Coverage tool for Android Application

 

With regards

Syed

 

 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of suhas gavas
Sent: Friday, February 06, 2009 3:44 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: problem with playing sounds using media
player

 


Hi,
I have used media player in my formal game which was 2d game ...
At that time I used view  . But now its 3d game and so i have
extended surfcae view . So much rendering is done at run time
. So i thing this must be issue as cpu is overloaded and i have
checked this in ddms (CPU Usage). I m yet not satisfied
with media player api of android .. Also prb with sound pool is that
some times sample sound is not ready to play as might be some problem in
that ... Truley i think sound api should be well furnished as i have
checked on iphone and the game works fine as sounds are also played 
I mean that same game is working fine on iphone with huge sound files in
term of size also



On Fri, Feb 6, 2009 at 12:04 PM, Dave Sparks davidspa...@android.com
wrote:


Suggest you try running top to find out what's hogging the CPU.


On Feb 5, 9:22 pm, suhas gavas suhas.ga...@gmail.com wrote:
 Hi,
 No ... i m not playing 6 to 7 mp3 files at same time ..
 later that day i have tried with just playing one single file and same
issue
 . But then i tried SoundPool api and it worked fine
 . Then also i wonder what was the prb with mediaplayer


 On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks davidspa...@android.com
wrote:

  If you are playing 6 or 7 MP3 files at the same time, you are probably
  saturating the CPU just decoding the audio.

  On Feb 5, 1:10 am, suhas gavas suhas.ga...@gmail.com wrote:
   hi,

   My program is a 3d game . And i m creating 6 to 7
media
   player in my game .. so is this y the warning is flashed ?

   On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks davidspa...@android.com
  wrote:

The message could be a clue, it's trying to tell you that the CPU is
overloaded, i.e. you're trying to do too much. Have you tried
running
top to check the CPU load?

On Feb 4, 10:32 pm, suhas suhas.ga...@gmail.com wrote:
 Hi all,
 I m using mp3 sound in my game (used wav format also) 
while
 playing sound i get problem as  obtainBuffer timeout (is the CPU
 pegged) and then sound gets played after some time i.e it is not
 syncronized with the game play ... plz help me with this issue

 Thnxs
 Suhas





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Updation of the Media Data base in emulator only on bootup/mount/recording?

2009-02-06 Thread Dave Sparks

You need to tell the media scanner that you have added a new file. See
http://code.google.com/android/reference/android/media/MediaScannerConnection.html

On Feb 6, 4:38 am, Rishi kaurari...@gmail.com wrote:
 When i added a media file to the sdcard an update in the MediaProvider
 database is not happening. When i bootup the emulator it happens .
 Is this the expected behaviour ?

 - Rishi Kaura
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-06 Thread Dave Sparks

There is a lot of new audio support in the Cupcake SDK release. This
includes working SoundPool for low-latency sounds and streaming audio
API's.

On Feb 6, 2:13 am, suhas gavas suhas.ga...@gmail.com wrote:
 Hi,
 I have used media player in my formal game which was 2d game ...
 At that time I used view  . But now its 3d game and so i have
 extended surfcae view . So much rendering is done at run time
 . So i thing this must be issue as cpu is overloaded and i have
 checked this in ddms (CPU Usage). I m yet not satisfied
 with media player api of android .. Also prb with sound pool is that
 some times sample sound is not ready to play as might be some problem in
 that ... Truley i think sound api should be well furnished as i have
 checked on iphone and the game works fine as sounds are also played 
 I mean that same game is working fine on iphone with huge sound files in
 term of size also

 On Fri, Feb 6, 2009 at 12:04 PM, Dave Sparks davidspa...@android.comwrote:



  Suggest you try running top to find out what's hogging the CPU.

  On Feb 5, 9:22 pm, suhas gavas suhas.ga...@gmail.com wrote:
   Hi,
   No ... i m not playing 6 to 7 mp3 files at same time ..
   later that day i have tried with just playing one single file and same
  issue
   . But then i tried SoundPool api and it worked fine
   . Then also i wonder what was the prb with mediaplayer

   On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks davidspa...@android.com
  wrote:

If you are playing 6 or 7 MP3 files at the same time, you are probably
saturating the CPU just decoding the audio.

On Feb 5, 1:10 am, suhas gavas suhas.ga...@gmail.com wrote:
 hi,

 My program is a 3d game . And i m creating 6 to 7
  media
 player in my game .. so is this y the warning is flashed ?

 On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks davidspa...@android.com

wrote:

  The message could be a clue, it's trying to tell you that the CPU
  is
  overloaded, i.e. you're trying to do too much. Have you tried
  running
  top to check the CPU load?

  On Feb 4, 10:32 pm, suhas suhas.ga...@gmail.com wrote:
   Hi all,
   I m using mp3 sound in my game (used wav format also) 
   while
   playing sound i get problem as  obtainBuffer timeout (is the CPU
   pegged) and then sound gets played after some time i.e it is not
   syncronized with the game play ... plz help me with this
  issue

   Thnxs
   Suhas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to add shortcut in home screen by modifying config file ?

2009-02-06 Thread Romain Guy

The shortcuts are contained in a private database. There is no config
file you can modify directly.

On Fri, Feb 6, 2009 at 1:46 AM, HelloWorld xiaolong_...@yahoo.com.cn wrote:

 Dear all,

  Would you please point me how to add more shortcuts in home screen?
 -- I want to do this by modifying config file rather than draging an
 app and dropping it on home screen. Namely, I want to know which
 config file contains these shortcuts. Thanks for your help in
 Advance.

 Thanks,
 HelloWorld

 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to add shortcut in home screen by modifying config file ?

2009-02-06 Thread Peli

Hello HelloWorld,

AnyCut can create custom shortcuts on the home screen - and it is open
source:
http://code.google.com/p/apps-for-android/source/browse#svn/trunk/AnyCut

But the broadcast intent used there is in the com.android.launcher
namespace, so it is not part of the public SDK API, and may break in a
future version of Launcher. Right?

Peli
www.openintents.org

On Feb 6, 7:32 pm, Romain Guy romain...@google.com wrote:
 The shortcuts are contained in a private database. There is no config
 file you can modify directly.

 On Fri, Feb 6, 2009 at 1:46 AM, HelloWorld xiaolong_...@yahoo.com.cn wrote:

  Dear all,

   Would you please point me how to add more shortcuts in home screen?
  -- I want to do this by modifying config file rather than draging an
  app and dropping it on home screen. Namely, I want to know which
  config file contains these shortcuts. Thanks for your help in
  Advance.

  Thanks,
  HelloWorld

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to add shortcut in home screen by modifying config file ?

2009-02-06 Thread Romain Guy

 But the broadcast intent used there is in the com.android.launcher
 namespace, so it is not part of the public SDK API, and may break in a
 future version of Launcher. Right?

It will not break. It is not considered a private API, it's just not a
platform API.


 Peli
 www.openintents.org

 On Feb 6, 7:32 pm, Romain Guy romain...@google.com wrote:
 The shortcuts are contained in a private database. There is no config
 file you can modify directly.

 On Fri, Feb 6, 2009 at 1:46 AM, HelloWorld xiaolong_...@yahoo.com.cn wrote:

  Dear all,

   Would you please point me how to add more shortcuts in home screen?
  -- I want to do this by modifying config file rather than draging an
  app and dropping it on home screen. Namely, I want to know which
  config file contains these shortcuts. Thanks for your help in
  Advance.

  Thanks,
  HelloWorld

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inserting button in a difficult position

2009-02-06 Thread goldfish

Why not add SampleView to your main.xml? You could then add a button
to main.xml as well. Another approach may be to do hit testing within
SampleView. You could draw a bitmap of your button then detect if
the user click in/on that area.

On Feb 5, 11:19 pm, ipeg.stud...@gmail.com wrote:
 Hi all

                 Thanks for the greate replies. I have a porgram by
 which i draw a rectengle. The code is written below.

 //

  public class Hellobye2 extends Activity {

            SampleView mView;
                protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
                mView = new SampleView(this);
             setContentView(mView);

        }

 }

 //

 Now my problem is I want to insert a button in this page. But i cant
 use setContentView(R.layout.main);

 How can i crerate a button which is defiend on main.xml. Please give
 me the appropiate code.
 Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView.loadData does not always work quite right

2009-02-06 Thread Frank Galligan

Hi Mark,

I was having the same issue. What worked for me was changing the
layout_height of the WebView from wrap_content to fill_parent.
Depending on your UI you may also want to add a layout_weight of 1.

I'm not sure why if layout_height is set to wrap_content that the
WebView doesn't seem to get click messages. This might be a bug. I'm
using 1.0_r2.

Hopefully that will fix your issue too.

Frank


On Jan 29, 1:32 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I have a simplewebviewclient that gets the content from a url and
 loads it into theWebView.  When the activity starts and the first
 data is loaded into theWebViewit works beautifully.  I can click the
 href of the image returned in the url data and theWebViewlaunches
 the browser just fine.  However, if I then update the contents of 
 theWebViewwith another call to loadData, theWebViewdisplays the new
 data but you cannot click on anything in theWebView...

 I do not see any logs like

 Starting activity: Intent { action=android.intent.action.VIEW
 categories={android.intent.category.BROWSABLE}
 in the log viewer...

 If I relaunch my activity, it again works the first time but not for
 additional content.  Is there something else I am supposed to do to
 get theWebViewto support the clicking of hrefs in the data that was
 loaded?

 thanks, Mark

 public class SampleWebviewClient extends Activity {
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         Button btn = (Button) findViewById(R.id.nexturl_btn);
         btn.setOnClickListener(mOnClickNextUrl);

         new Thread(mGetUrlData).start();
     }

     OnClickListener mOnClickNextUrl = new OnClickListener() {
             @Override
             public void onClick(View arg0) {
                 new Thread(mGetUrlData).start();
             }
     };

     private ListString mQueuedUrls = new ArrayListString();
     private Runnable mGetUrlData = new Runnable() {
                 @Override
                 public void run() {
                         String data = getUrlData();
                         if (data != ) {
                                 mQueuedUrls.add(data);
                                 runOnUiThread(mUpdateImage);
                         }
                 }
     };

     private Runnable mUpdateImage = new Runnable() {
                 @Override
                 public void run() {
                        WebViewwebView= (WebView) findViewById(R.id.webkit);
                         if (webView!= null) {
                                webView.loadData(mQueuedUrls.get(0), 
 text/html, utf-8);
                                 mQueuedUrls.remove(0);
                         }
                 }
     };

         public String getUrlData() {
            String data = ... get the data...
             return data;
     }

 }

 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
     
 TextView
     android:layout_width=fill_parent
     android:layout_height=wrap_content
     android:text=something above
     /
 WebView
         android:id=@+id/webkit
     android:layout_width=fill_parent
     android:layout_height=wrap_content
         /
 TextView
     android:layout_width=fill_parent
     android:layout_height=wrap_content
     android:text=something below
     android:layout_weight=1
     /
  Button
         android:id=@+id/nexturl_btn
     android:layout_width=fill_parent
     android:layout_height=wrap_content
     android:text=   Get Next Url   
     /
 /LinearLayout

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Touch screen response delay

2009-02-06 Thread Zombies and Robots

Hello.

I am working on a game that displays its graphics through a modified
SurfaceView.  The game scrolls around a map based on the location of
the main character.  That all works fine.

I am trying to add a feature to the game that allows you to touch the
screen and drag the camera around to see other parts of the map.  This
is where I am running into trouble.  The game's SurfaceView overrides
'public boolean onTouchEvent(MotionEvent event)' to call another
method in the game's thread which handles the events.  Sometimes, this
works fine (although the frame rate drops significantly while the
screen is touched).  Other times, there will be a delay of several
seconds before the game responds to a touch event, during which time
the game continues, but the user loses all control.  During these
delays, a message sometimes appears stating that my activity is not
responding, and giving the options to 'Force close' or 'Wait'.  If the
user selects 'Wait', the game almost always resumes right away, but
these delays are obviously not acceptable.

The delays occur only the first time the screen is touched after the
game is started.  Once the game has resumed after a delay, the touch
events work just fine again.

I have experimented with having the game thread sleep for short
periods at various points throughout the game.  Although this does
seem to have a small effect on the problem, the delays still happen.
Has anyone else run into this?  What am I doing wrong?

Thank you very much for any suggestions you can provide.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-06 Thread Justin (Google Employee)

There does appear to be some problem here. We're looking into it
further.

Cheers,
Justin
Android Team @ Google

On Feb 6, 9:29 am, Justin (Google Employee) j...@google.com wrote:
 Ronald,

 I've asked the Market team to take a look at your app specifically.
 I'll update you as I get new information.

 Cheers,
 Justin
 Android Team @ Google

 On Feb 5, 12:43 pm, Ronald van der Lingen lin...@jsource.nl wrote:

  At this moment the developer console is still showing 0 downloads
  after the app has been available for a week.

  I really suspect that something is wrong with the download count for
  applications targeted to the Netherlands (or even downloads from the
  Netherlands in general). I have checked several apps in themarket
  that are targeted to the Netherlands, and all of them show a download
  count of 50.

  I cannot imagine that apps that received a lot of publicity around the
  launch have not been downloaded more than 50 times. This leads me to
  believe that the developers of these applications also will see 0
  downloads in their developer console.

  Do any of the developers targeting apps to other new regions (Germany,
  Poland, etc) experiencing the same?

  Kind regards,
  Ronald

  On Feb 3, 7:43 pm, Justin (Google Employee) j...@google.com wrote:

   Ronald,

   I've talked with theMarketteam and there may be a delay in
  statisticsgathering. My recommendation is to wait a day or two and
   see what your results are then. Either way, please post back with your
   results in a day or two.

   Cheers,
   Justin
   Android Team @ Google

   On Feb 3, 9:51 am, Ronald van der Lingen lin...@jsource.nl wrote:

The name of my application is PimPam.

Thank you,
Ronald

On Feb 3, 5:07 pm, Justin (Google Employee) j...@google.com wrote:

 What is the name of your application? If you're not comfortable
 sharing this publicly, please message me privately.

 Cheers,
 Justin
 Android Team @ Google

 On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:

  Last week I published our first app to theMarket, which is a game
  targeted to users in The Netherlands. Now that the G1 has been
  available over here for a couple of days, we have received feedback
  from several of our users.

  When I look at the developers console in themarkethowever, the
  download count still shows 0. Also on the device it is listed as 
  50.
  When looking around in theMarket, I see that all applications
  targeted to The Netherlands are listed as having 50 downloads, even
  an application that received a lot of publicity.

  Have other developers noticed the same?

  Kind regards,
  Ronald
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MMS message length

2009-02-06 Thread Ajith

Is there an API to support setting MMS upload and download message
size ? Are there predefined sizes that limit how big the outgoing and
incoming messages can be ?
Ajith

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] modifying voice service behaviour?

2009-02-06 Thread Tim Reid

greetings.

i can not determine a straight forward way to power down the voice
service (ie enter airplane mode) from code.

i have found the TelephonyManager, and i see how i can register my
PhoneStateListener and subsequently obtain a ServiceState object upon
a change of voice service state. i see that this ServiceState has a
setStateOff method which would seem to power down the radio.

however, what if i want to change the state directly, not in response
to a state change event?

thanks in advance

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Need help in writing unit test for parcelable object

2009-02-06 Thread Lucius Fox

Hi,

I follow the following example in creating a Parcelable object:
http://code.google.com/android/reference/android/os/Parcelable.html

And I did the following to unit test the CREATOR and writeToParcel method:

 Parcel dummyParcel = Parcel.obtain();
 MyParcelable p = new MyParceable(12345);
p.writeToParcel(dummyParcel,
Parcelable.PARCELABLE_WRITE_RETURN_VALUE);

 MyParcelable p2 =  MyParcelable.CREATOR.createFromParcel(dummyParcel);

System.out.println (  + p.toString());
System.out.println (  + p2.toString());

when I execute the method, p2 is empty.

I step thru the code, the

 private MyParcelable(Parcel in) {
 mData = in.readInt();
}

did get called. But the readInt() return 0.

Can you please tell me what am I missing?

Thank you.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Touch screen response delay

2009-02-06 Thread Tom Gibara
I've been struggling with similar issues on-and-off with a game I've been
slowly incubating.
The drop in frame-rate experienced with touch events may be caused by their
continual generation (fingers aren't like mice, even an apparently static
finger will exhibit variation). If this is the case it can be addressed by
sleeping the event thread for a short period of time after handling each
touch event.

Your more significant problem, with the application failing to respond
(apparently at random) for extended periods of time I don't have a direct
solution for. I tried similar approaches to you. In my case I have
identified *one* cause: background game music playing via a MediaPlayer;
disabling the music seemed to fix the problem (perhaps temporarily).
Excessive amounts of graphics rendering might be another cause.

I'm increasingly confident that the problem is not related to my code, but I
haven't found a useful test case (I have spent many fruitless hours hunting
for one). My intuition (and its nothing more than a gut feeling) is that it
has all the hallmarks of unfair monitor contention. I have no evidence for
any of this though and am still looking forward to that eureka moment when I
find out how I've managed to make a mistake in my code that is both stupidly
basic and deviously subtle.

Tom

2009/2/6 Zombies and Robots caecus...@gmail.com


 Hello.

 I am working on a game that displays its graphics through a modified
 SurfaceView.  The game scrolls around a map based on the location of
 the main character.  That all works fine.

 I am trying to add a feature to the game that allows you to touch the
 screen and drag the camera around to see other parts of the map.  This
 is where I am running into trouble.  The game's SurfaceView overrides
 'public boolean onTouchEvent(MotionEvent event)' to call another
 method in the game's thread which handles the events.  Sometimes, this
 works fine (although the frame rate drops significantly while the
 screen is touched).  Other times, there will be a delay of several
 seconds before the game responds to a touch event, during which time
 the game continues, but the user loses all control.  During these
 delays, a message sometimes appears stating that my activity is not
 responding, and giving the options to 'Force close' or 'Wait'.  If the
 user selects 'Wait', the game almost always resumes right away, but
 these delays are obviously not acceptable.

 The delays occur only the first time the screen is touched after the
 game is started.  Once the game has resumed after a delay, the touch
 events work just fine again.

 I have experimented with having the game thread sleep for short
 periods at various points throughout the game.  Although this does
 seem to have a small effect on the problem, the delays still happen.
 Has anyone else run into this?  What am I doing wrong?

 Thank you very much for any suggestions you can provide.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: access to class not allowed

2009-02-06 Thread fadden

On Feb 6, 7:38 am, johnny johnny...@gmail.com wrote:
 I get an apk file from somewhere. I tried to install it the emulator
 successfully. (The emulator is built from the latest code in AOSP
 which should be cupcake or later). But I can't launch the application
 from the GUI. It complains The application xxx has stopped
 unexpectedly. After checking the logcat, I find the message access
 to class not allowed. It seems that that process is not allowed to
 instantiate the Activity class.

This usually happens when the class that the app framework is trying
to instantiate isn't declared public.  In some older versions of
Dalvik this was mistakenly allowed, so if the APK is old enough it
might need to be rebuilt with a corrected class declaration.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-06 Thread Ronald van der Lingen

Thanks for the update. I hope you can find the cause of the problem
and that the download count for the last week can still be recovered.

Kind Regards,
Ronald


On Feb 6, 9:00 pm, Justin (Google Employee) j...@google.com wrote:
 There does appear to be some problem here. We're looking into it
 further.

 Cheers,
 Justin
 Android Team @ Google

 On Feb 6, 9:29 am, Justin (Google Employee) j...@google.com wrote:

  Ronald,

  I've asked the Market team to take a look at your app specifically.
  I'll update you as I get new information.

  Cheers,
  Justin
  Android Team @ Google

  On Feb 5, 12:43 pm, Ronald van der Lingen lin...@jsource.nl wrote:

   At this moment the developer console is still showing 0 downloads
   after the app has been available for a week.

   I really suspect that something is wrong with the download count for
   applications targeted to the Netherlands (or even downloads from the
   Netherlands in general). I have checked several apps in themarket
   that are targeted to the Netherlands, and all of them show a download
   count of 50.

   I cannot imagine that apps that received a lot of publicity around the
   launch have not been downloaded more than 50 times. This leads me to
   believe that the developers of these applications also will see 0
   downloads in their developer console.

   Do any of the developers targeting apps to other new regions (Germany,
   Poland, etc) experiencing the same?

   Kind regards,
   Ronald

   On Feb 3, 7:43 pm, Justin (Google Employee) j...@google.com wrote:

Ronald,

I've talked with theMarketteam and there may be a delay in
   statisticsgathering. My recommendation is to wait a day or two and
see what your results are then. Either way, please post back with your
results in a day or two.

Cheers,
Justin
Android Team @ Google

On Feb 3, 9:51 am, Ronald van der Lingen lin...@jsource.nl wrote:

 The name of my application is PimPam.

 Thank you,
 Ronald

 On Feb 3, 5:07 pm, Justin (Google Employee) j...@google.com wrote:

  What is the name of your application? If you're not comfortable
  sharing this publicly, please message me privately.

  Cheers,
  Justin
  Android Team @ Google

  On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:

   Last week I published our first app to theMarket, which is a game
   targeted to users in The Netherlands. Now that the G1 has been
   available over here for a couple of days, we have received 
   feedback
   from several of our users.

   When I look at the developers console in themarkethowever, the
   download count still shows 0. Also on the device it is listed as 
   50.
   When looking around in theMarket, I see that all applications
   targeted to The Netherlands are listed as having 50 downloads, 
   even
   an application that received a lot of publicity.

   Have other developers noticed the same?

   Kind regards,
   Ronald


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Processing audio

2009-02-06 Thread Natalie

Thanks.
Anyone know of any other info on how to decode .mp4s by hand then?

On Feb 5, 7:35 pm, Dave Sparks davidspa...@android.com wrote:
 This is not possible in SDK 1.0.

 On Feb 4, 1:01 pm, Natalie natlinn...@gmail.com wrote:

  I would like to be able to extract frequency/amplitude info from
  incoming mic audio.  From looking at previous posts, it looks like the
  way to do this with the current sdk is to write to a file, then tail
  that file.  This means I need to be able to extract frequency/
  amplitude information from .mp4 or 3gpp files, since these are the
  audio formats supported by MediaRecorder.  Now, I'd really prefer not
  to have to decode this data by hand.  :)  MediaPlayer is obviously
  decoding the .mp4 files, so I was wondering if there is any way to tap
  into this functionality, or some other way to get my .mp4 files
  decoded?
  Thanks!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Run two android instances on the same host and comunicate betwen them using socket

2009-02-06 Thread Lillian Brandão
Hi,

I read this old email and I have the same problem. Now, anyone knows how to
do it? I need more instances of the emulator in the same machine or some
method to start many emulators and configure them to comunicate with each
other.

Thanks in advance,
Lillian Brandão.


On Thu, May 8, 2008 at 2:50 PM, Oskeol oskeolgj...@gmail.com wrote:


 Hi everybody,

 I'm new at Android, so please be patient if my questions are too
 simple.
 I would like to run two (or more) android instances of the emulator on
 the same host (windows vista),
 and comunicate between them using Sockets.

 Can anybody describe in detail, the passes i should take?
 Please be patient, and give the more information you can.
 Any piece of code would be appreciated.

 Thanks everybody,

 Oskeol

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView is not clearing history.

2009-02-06 Thread Obormot

Hi, guys.

I'm using the following code:

_articleView.loadArticle(section.getResource());
_articleView.clearHistory();

to ensure that nothing is left in the history and back button behaves
as usual.

Unfortunately, this code doesn't work for me and the
_articleView.canGoBack() still returns true.
Implementation of clearHistory method is quite complex and uses
asynchronous mechanism, which may not work immediately, but no matter
how much time I wait the history is still there.

Am I doing something wrong?

Thank you in advance!
A.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-06 Thread blindfold

Maybe Google fixed things a moment ago? I had a related issue that
although I live in The Netherlands, I could not even find the Dutch
ING Wegwijzer (for finding local ATMs) today when searching Android
Market with my dev phone 1. However, now I suddenly can, and I also
find PimPam (did not try it though).

Regards

On Feb 6, 9:24 pm, Ronald van der Lingen lin...@jsource.nl wrote:
 Thanks for the update. I hope you can find the cause of the problem
 and that the download count for the last week can still be recovered.

 Kind Regards,
 Ronald

 On Feb 6, 9:00 pm, Justin (Google Employee) j...@google.com wrote:

  There does appear to be some problem here. We're looking into it
  further.

  Cheers,
  Justin
  Android Team @ Google

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: jYMSG on Android - Help please

2009-02-06 Thread Al

Did you declare a permission to access the Internet in the manifest?
The android system doesn't throw any 'bad permissions' exception with
sockets as it would with something like wifi locking.

On Feb 6, 10:55 am, Maddy malli.ar...@gmail.com wrote:
 Hi All,

 I am trying to implement Yahoo Instant Messenger in Android platform.
 I have downloaded jYMSG JAR file and
 used that jar file with my sample application in Android.

 I have followed the following procedure for login

 -
 private
 void login() {
   yahooMessengerSession = new Session();
   mySessionListener = new MySessionListener(this);
   yahooMessengerSession.addSessionListener(mySessionListener);
   String usrName = userName.getText().toString();
   String pword = password.getText().toString();
   try
   {
       if(usrName.equals(null) || pword.equals(null)){
            Log.e(YahooClient, User name or password empty);
      } else {
            Log.i(YahooClient, Trying to login);
            yahooMessengerSession.login(usrName, pword);
       }
    } catch(IOException e1) {
            Log.e(YahooClient, login: IOException);
            e1.printStackTrace();
    }}

 -

 But I am getting following exception,

 ---
 java.net.UnknownHostException: scs.msg.yahoo.com - scs.msg.yahoo.com
 ---

 with following stack trace:

 --
 java.net.InetAddress.lookupHostByName(InetAddress.java:457)
 java.net.InetAddress.getByName(InetAddress.java:287)
 java.net.Socket.init (Socket.java:140)
 org.openymsg.network.DirectConnectionHandler.open
 (DirectConnectionHandler.java:95)
 org.openymsg.network.Session.openSession(Session.java:2865)
 org.openymsg.network.Session.login(Session.java:292)
 --

 If use this library in simple Java application in PC, I could
 successfully login and send messages to other yahoo accounts.
 I could successfully ping scs.msg.yahoo.com

 The above two shows that there there is no problem with either yahoo
 server or jYMSG library.
 It is having problems in using in Android, I guess.

 I am absolutely struck with this and I could not make any progress
 from here. Could you please help out in solving this problem?

 I greatly appreciate your help.

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application storage data growing

2009-02-06 Thread Rmac

Thanks Dianne.  The odd thing is that I am NOT creating any files.
And let me make sure we are talking the same thing... when I say
data, I don't mean the data directory... I am talking about going to
Settings/Applications/Manage applications/myapp/Storage/Data... if
that is the data directory then we are talking about the same thing.
What else could go there besides files that are explicitly created by
the app?  Preferences?  SQLite databases?  Anything else?  The data
storage value seems to gradually grow over time while using the app...
from initial size of 76K to nearly a meg.


On Feb 6, 11:51 am, Dianne Hackborn hack...@android.com wrote:
 Unfortunately it's a little tricky, because only your app (and some very
 very low-level parts of the system) can touch your data.  You can, however,
 just add some code to your app that iterates through your data directories
 with the standard Java File APIs and prints out what it finds.

 On Fri, Feb 6, 2009 at 8:36 AM, Rmac ry...@mac.com wrote:

  I've had debugging on from the beginning.  What I need is something
  that can tell me exactly what is in the application's data area that
  Android reports via Settings for managing applications.  I am sure my
  application is adding to it somehow, but I have no handle to tell what
  content is stored there.

  On Feb 5, 5:08 am, Chander Pechetty cspeche...@gmail.com wrote:
   Not sure if you can do this, but check outhttp://
  code.google.com/android/intro/develop-and-debug.html#developin...
   to understand the tools and limitations

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to remove a contact with a specified phone number?

2009-02-06 Thread Meryl Silverburgh

How to remove a contact with a specified phone number?

I try this:

String phone =1234567;
   context.getContentResolver().delete(Contacts.Phones.CONTENT_URI,
phone, null);

But I get an error with this:
java.lang.UnsupportedOperationException: Cannot delete that URL:
content://contacts/phones
at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:130)
at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:110)
at 
android.content.ContentProviderProxy.delete(ContentProviderNative.java:362)
at android.content.ContentResolver.delete(ContentResolver.java:386)
at com.mytest.TestUtil.removeContact(TestUtil.java:87)


Thank you for any pointers.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Run two android instances on the same host and comunicate betwen them using socket

2009-02-06 Thread Faber Fedor
Well, on Linux, I just dropped to the command line and ran
android/tools/emulator twice and it brought up two instances of the
emulator.  Of course, the second one complains about the disks being read
by another emulator, so you'll have to set up a set of disks (really, just
binary files) for each emulator to use.

Do a android/tools/emulator -h and look at all your options.

How to get them talking via sockets?  I have no idea.  Is that even a
reasonable thing to do?

On Fri, Feb 6, 2009 at 4:38 PM, Lillian Brandão lbrolive...@gmail.comwrote:

 Hi,

 I read this old email and I have the same problem. Now, anyone knows how to
 do it? I need more instances of the emulator in the same machine or some
 method to start many emulators and configure them to comunicate with each
 other.

 Thanks in advance,
 Lillian Brandão.


 On Thu, May 8, 2008 at 2:50 PM, Oskeol oskeolgj...@gmail.com wrote:


 Hi everybody,

 I'm new at Android, so please be patient if my questions are too
 simple.
 I would like to run two (or more) android instances of the emulator on
 the same host (windows vista),
 and comunicate between them using Sockets.

 Can anybody describe in detail, the passes i should take?
 Please be patient, and give the more information you can.
 Any piece of code would be appreciated.

 Thanks everybody,

 Oskeol




 



-- 
Faber Fedor
Linux New Jersey
http://linuxnj.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: RC33 for Dev Phone

2009-02-06 Thread camurphy

I have tried this, it is a dead end. The reason you can't apply the
standard RC33 update is because it is not signed for the dev phone. I
downloaded a modified recovery image that works with test keys. Then I
used a small java script to sign the image with test keys. Even after
this some assertions in the upgrade script failed, it expects you to
be running a particular image and a particular version of the
bootloader. Even after (stupidly) removing these assertions from the
script and trying to update again the very first step failed, which
was a patch to the Alarm Clock application. I gave up at this point, I
had almost bricked my ADP1 a couple of times, it wasn't booting.

I know we bought these phones as 'developers' but we still have to use
them day-to-day and we want to use applications like Market, Gmail
etc. We also want the updates in RC33, including Maps 3.0 and
Latitude.

On Feb 7, 4:51 am, Timothy DeWees whtdrgn...@gmail.com wrote:
 So do I need a special update package other than the ones signed by
 Google linked here:

 http://forum.xda-developers.com/showthread.php?t=479571

 On Feb 5, 9:52 pm, Jean-Baptiste Queru j...@android.com wrote:

  The bootloader does allow unsigned filesystem images. The recovery
  system still checks the update packages for signatures.

  JBQ

  On Thu, Feb 5, 2009 at 6:20 PM, Mark L. Chang mark.ch...@gmail.com wrote:

   On Feb 5, 8:57 pm, Timothy DeWees whtdrgn...@gmail.com wrote:
   This one doesn't seem to work for me.  It fails at the verifying
   package stating that it's not signed.

   which is weird, since I thought the dev phone would allow unsigned
   firmware?

  --
  Jean-Baptiste M. JBQ Queru
  Android Engineer, Google.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Broken Gallery View? using Gallery.setSelection(int position, boolean animate)

2009-02-06 Thread drasticp

I'm trying to set the selection of a Gallery in code. I would like to
have the Gallery smoothly roll down a few items over the duration of a
second or two. At frist glance, it appears that two members would to
the trick:

Gallery.setAnimationDuration(int animationDurationMillis);
Gallery.setSelection(int position, boolean animate);

It turns out that the setAnimationDuration only seems to affect the
rubber-bandy return-to-center effect of the Gallery. In other words,
when a gallery comes to rest after a fling, and a gallery item is off
center, the animationDurationMillis is used to control the duration of
the Gallery centering up the item. However, the value seems to have no
effect on the setSelection. No matter what value is set with
setAnimationDuration, the Gallery seems to render about 2 or 3 frames
when flying between items 1 and 10 for example.

Is this working as designed? Does anyone know a trick or workaround
that would let me properly animate setSelection? I'd be especially
grateful if we could do it with an Ease Out effect.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Broken Gallery View? using Gallery.setSelection(int position, boolean animate)

2009-02-06 Thread Romain Guy

setSelection() is not meant to be animated.

On Fri, Feb 6, 2009 at 4:15 PM, drasticp drast...@gmail.com wrote:

 I'm trying to set the selection of a Gallery in code. I would like to
 have the Gallery smoothly roll down a few items over the duration of a
 second or two. At frist glance, it appears that two members would to
 the trick:

 Gallery.setAnimationDuration(int animationDurationMillis);
 Gallery.setSelection(int position, boolean animate);

 It turns out that the setAnimationDuration only seems to affect the
 rubber-bandy return-to-center effect of the Gallery. In other words,
 when a gallery comes to rest after a fling, and a gallery item is off
 center, the animationDurationMillis is used to control the duration of
 the Gallery centering up the item. However, the value seems to have no
 effect on the setSelection. No matter what value is set with
 setAnimationDuration, the Gallery seems to render about 2 or 3 frames
 when flying between items 1 and 10 for example.

 Is this working as designed? Does anyone know a trick or workaround
 that would let me properly animate setSelection? I'd be especially
 grateful if we could do it with an Ease Out effect.
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: .apk file resource optimisation

2009-02-06 Thread Inderjeet Singh

I dont think assets/ files are compressed all that great. For my app,
I was able to cut down the size of overall apk by almost 50% by using
GZipInputStream. I posted the numbers a while back.

But now I am paying the cost of decompression while loading those assets.

I hope the Android platform can improve the compression of the apk
file itself in a subsequent release.

Thanks
Inder


On Wed, Feb 4, 2009 at 2:25 PM, Dianne Hackborn hack...@android.com wrote:
 Oh btw there is one improvement we have in aapt for Cupcake to better
 compress .png image files.

 On Wed, Feb 4, 2009 at 2:24 PM, Dianne Hackborn hack...@android.com wrote:

 Yep I think they are pretty compact in their current form.  Note that the
 resource table itself is not stored compressed in the .apk, so that it can
 be mmapped into the process, which is a pretty important optimization for
 many cases.

 You can imagine doing some additional processing of the images to combine
 them into a few larger uber-images (we've done this kind of thing on
 previous platforms), but doing that well to the point where it is actually a
 win is not trivial, and it can easily lead to situations where you use way
 more memory than needed because you need to load the entire bitmap even
 though you only use a few things in it.  Imagine something displaying the
 icons of all of the applications for example, loading a huge bitmap from
 each of the apps to pull out one little icon.

 If you want to work on further optimizing the data structures and code,
 we'd be happy to talk about it on android-framework and consider such
 patches.

 On Wed, Feb 4, 2009 at 10:06 AM, FranckLefevre flas...@gmail.com wrote:


 Dear Raja,

 I think that compressing resources in APK would not be that convenient
 for two reasons:

  1- when resources are actual pictures, they are usually already
 compressed (using GIF, JPG, PNG,...) and trying to ZIP them does not
 significantly reduce their size
  2- APK resource files are offered through the framework (grep
 assets in the source code...) that maps these APK files, allowing
 to get a pointer to them. Compressing would lead to a buffer
 duplication that may impact memory and speed.

 IMHO, this APK format is quite smart and convenient as it is...

 Rgds.

 Franck





 On Feb 3, 11:44 am, Raja Nagendra Kumar nagendra.r...@gmail.com
 wrote:
  When we open up the .apk file in winzip (as it is a jar file), we see
  the classes are compressed and stored as one file. However the
  resources are taken as is. Would it not be a nice approach to compress
  all the resources (specially if all the application has many images)
  and store it as one file, as this could further bring down the .apk
  size. I understand it needs more runtime memory though.. Are there any
  options to pack the resources this way already..
 
  As Android seems to run j2se.. I am assuming that such kind of runtime
  memory is not an issue.
 
  Regards,
  Raja Nagendra Kumar,
  C.T.Owww.tejasoft.com




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView starts with a delay

2009-02-06 Thread Inderjeet Singh

I am using WebView in a number of screens in my application, and
notice that it takes couple of seconds when starting up for the first
time.

What can I do to speed it up besides trying to create one in a
separate thread beforehand?
Thanks
Inder

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how can i change the background color of ExpandlistActivity?

2009-02-06 Thread 百合的味道
hi all,
now i have a ExpandListActivity,now i want to change it's background color 
,when i change the color to White,i can not see the font.just focus the item 
that can see it!why?

/:includetail
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Touch screen response delay

2009-02-06 Thread Al

Hi, have you checked the trace file that is written when an anr
occurs? It shoud be in /data/anr with the filename traces.txt. This
will show exactly what was running and at what line of code when the
anr popped up and should help locate the problem code.

On Feb 6, 7:03 pm, Zombies and Robots caecus...@gmail.com wrote:
 Hello.

 I am working on a game that displays its graphics through a modified
 SurfaceView.  The game scrolls around a map based on the location of
 the main character.  That all works fine.

 I am trying to add a feature to the game that allows you to touch the
 screen and drag the camera around to see other parts of the map.  This
 is where I am running into trouble.  The game's SurfaceView overrides
 'public boolean onTouchEvent(MotionEvent event)' to call another
 method in the game's thread which handles the events.  Sometimes, this
 works fine (although the frame rate drops significantly while the
 screen is touched).  Other times, there will be a delay of several
 seconds before the game responds to a touch event, during which time
 the game continues, but the user loses all control.  During these
 delays, a message sometimes appears stating that my activity is not
 responding, and giving the options to 'Force close' or 'Wait'.  If the
 user selects 'Wait', the game almost always resumes right away, but
 these delays are obviously not acceptable.

 The delays occur only the first time the screen is touched after the
 game is started.  Once the game has resumed after a delay, the touch
 events work just fine again.

 I have experimented with having the game thread sleep for short
 periods at various points throughout the game.  Although this does
 seem to have a small effect on the problem, the delays still happen.
 Has anyone else run into this?  What am I doing wrong?

 Thank you very much for any suggestions you can provide.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView starts with a delay

2009-02-06 Thread Fred Grott(shareme)

The delay is it is processing these items in your head..loading
javascript, css and etc.

The way I handled it was setting background color to zero for
transparency and using style to load a application logo image that
user sees while stuff loads.

You will not be able to speed it up however.

You can see video examples here:

http://www.youtube.com/user/memine44




On Feb 6, 6:48 pm, Inderjeet Singh inder...@gmail.com wrote:
 I am using WebView in a number of screens in my application, and
 notice that it takes couple of seconds when starting up for the first
 time.

 What can I do to speed it up besides trying to create one in a
 separate thread beforehand?
 Thanks
 Inder
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to update list

2009-02-06 Thread Emmanuel

runOnUiThread is your friend for this situation :
http://code.google.com/android/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)


Emmanuel
http://androidblogger.blogspot.com/

On Feb 4, 7:04 pm, cindy ypu01...@yahoo.com wrote:
 I figure out the problem.

 You can't change any UI in the thread your create. Android require you
 to update UI in UI thread.

 On Feb 3, 11:27 pm, cindy ypu01...@yahoo.com wrote:

  I implemented the async incoming data on a separate thread which adds
  the items to a ArrayList that is connected to the view through my
  custom
  adapter (inherits BaseAdapter). But when I modified the ArrayList, the
  application crashes.

  Have you have the same problem?
  On Feb 3, 5:03 pm,Emmanuelemmanuel.ast...@gmail.com wrote:

   Do you mean the data from your adapter has changed, and you want to
   update your list from this ?

   To achieve this result, I create the adapter from the new data, and
   reset it to the list.
   There should be another cleaner method, but this is works for me !

  Emmanuelhttp://androidblogger.blogspot.com/

   On Feb 3, 7:36 pm,cindyypu01...@yahoo.com wrote:

I have a list. Which will first show 10 items, user would be able to
do pagination with click pagination button.

The list is extended from listActivity, and the list adapter is
extends from BaseAdapter .

But how to update UI when I get next 10 items back?

Thanks!

April
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: RC33 for Dev Phone

2009-02-06 Thread Disconnect
Install jf's 1.41-rc33. http://andblogs.net/tag/jf

It is signed with test keys -and- its a full install instead of a patch, so
no perquisites.

On Fri, Feb 6, 2009 at 6:59 PM, camurphy camur...@gmail.com wrote:


 I have tried this, it is a dead end. The reason you can't apply the
 standard RC33 update is because it is not signed for the dev phone. I
 downloaded a modified recovery image that works with test keys. Then I
 used a small java script to sign the image with test keys. Even after
 this some assertions in the upgrade script failed, it expects you to
 be running a particular image and a particular version of the
 bootloader. Even after (stupidly) removing these assertions from the
 script and trying to update again the very first step failed, which
 was a patch to the Alarm Clock application. I gave up at this point, I
 had almost bricked my ADP1 a couple of times, it wasn't booting.

 I know we bought these phones as 'developers' but we still have to use
 them day-to-day and we want to use applications like Market, Gmail
 etc. We also want the updates in RC33, including Maps 3.0 and
 Latitude.

 On Feb 7, 4:51 am, Timothy DeWees whtdrgn...@gmail.com wrote:
  So do I need a special update package other than the ones signed by
  Google linked here:
 
  http://forum.xda-developers.com/showthread.php?t=479571
 
  On Feb 5, 9:52 pm, Jean-Baptiste Queru j...@android.com wrote:
 
   The bootloader does allow unsigned filesystem images. The recovery
   system still checks the update packages for signatures.
 
   JBQ
 
   On Thu, Feb 5, 2009 at 6:20 PM, Mark L. Chang mark.ch...@gmail.com
 wrote:
 
On Feb 5, 8:57 pm, Timothy DeWees whtdrgn...@gmail.com wrote:
This one doesn't seem to work for me.  It fails at the verifying
package stating that it's not signed.
 
which is weird, since I thought the dev phone would allow unsigned
firmware?
 
   --
   Jean-Baptiste M. JBQ Queru
   Android Engineer, Google.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView responding to touch events

2009-02-06 Thread Sergey Ten

Mark,

I think I had this problem myself and could solve it by using the 
following code:

webView.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_UP:
if (!v.hasFocus()) {
v.requestFocus();
}
break;
}
return false;
}
});

Hope this would help,
Sergey

Fred Grott(shareme) wrote:
 Webview would have two touch events already as you would have the
 onClickListener which would have touch up touch down

 Were you getting those two events before adding OnTouchListener?



 On Feb 5, 9:46 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
   
 I just tried adding an OnTouchListener to the webview and I get ALL
 the touch events.  However, the links in the webview to not appear
 selected/focused...  This seems really weird to me.  Anyone have an
 idea why I would receive an OnTouch event for the view but the view
 itself does not seem to respond to those events?

 On Feb 5, 9:36 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

 
 I have an Activity that has a WebView that contains some simple html
 that allows me to display a Terms  Conditions link that if touched or
 clicked calls another activity.  My problem is unless the link in the
 WebView has focus (ie, the text is wrapped with that little orange
 focus) I cannot touch the link and have it work.  If any other view on
 the activity has focus, touching the WebView with the link does
 nothing.  The other Views that had focus loose focus, but the WebView
 does not receive focus.  I have tried calling setFocusable(true) and
 setFocusableInTouchMode(true) but that does not do any good...
   
 I would really like to know what you have to do to get a WebView to
 respond to touch events without using the trackball to scroll to the
 view before touching it.
   
 thank you,
 Mark
   
 
 

   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] I tried to deploy a timer and switch the user to another dialog for setting if times out. But the dialog just cannot display. No error/exception reported. Vibration works fine t

2009-02-06 Thread Xin Zhao
I tried to deploy a timer and switch the user to another dialog for setting
if times out. But the dialog just cannot display. No error/exception
reported. Vibration works fine though.

What's wrong?

Code:

  private void setAutoPhonecardSelector(int interval) {
Date timeToRun = new Date(System.currentTimeMillis() + interval);
Timer timer = new Timer();

mAutoPhonecardSelector = new TimerTask() {
  @Override
  public void run() {
mVibrator.vibrate(100);
Toast.makeText(PhoneCardSelector.this, test,
Toast.LENGTH_LONG).show();
  }
};

timer.schedule(mAutoPhonecardSelector, timeToRun);
  }



Please help!

Thanks in advance!
xin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: I tried to deploy a timer and switch the user to another dialog for setting if times out. But the dialog just cannot display. No error/exception reported. Vibration works fi

2009-02-06 Thread Xin Zhao
Sorry, the code format was somehow messed up in previous email. Here is the
one that is easier to read.

/*-*/
Code:

  private void setAutoPhonecardSelector(int interval) {
Date timeToRun = new Date(System.currentTimeMillis() + interval);
Timer timer = new Timer();

mAutoPhonecardSelector = new TimerTask() {
  @Override
  public void run() {
mVibrator.vibrate(100);
Toast.makeText(PhoneCardSelector.this, test,
Toast.LENGTH_LONG).show();
  }
};

timer.schedule(mAutoPhonecardSelector, timeToRun);
  }
/*-*/


On Fri, Feb 6, 2009 at 5:40 PM, Xin Zhao uszhao...@gmail.com wrote:

 I tried to deploy a timer and switch the user to another dialog for setting
 if times out. But the dialog just cannot display. No error/exception
 reported. Vibration works fine though.

 What's wrong?

 Code:

   private void setAutoPhonecardSelector(int interval) {
 Date timeToRun = new Date(System.currentTimeMillis() + interval);
 Timer timer = new Timer();

 mAutoPhonecardSelector = new TimerTask() {
   @Override
   public void run() {
 mVibrator.vibrate(100);
 Toast.makeText(PhoneCardSelector.this, test,
 Toast.LENGTH_LONG).show();
   }
 };

 timer.schedule(mAutoPhonecardSelector, timeToRun);
   }



 Please help!

 Thanks in advance!
 xin


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SMS_Sent and Hangup Intent Notification?

2009-02-06 Thread Tom3030

Hi,

I'm writing a little utility to go and check a couple of things after
an SMS has been sent or a call has been made. The checking bit is fine
but I can't find a suitable intent. Do you know what I can hook into
to determine if either of these has occured?

Many thanks,
Tom.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] multiple tables in sqlite

2009-02-06 Thread intbt

Hopefully some one will nmotice my 'obvious' mistake.

I have created 2 tables in the database (below). When I access table
c, no problem. But when I attempt to access table s I get an error
message that column name x (all names give the same error) does not
exist. How can 1 table get created but not the other?

public class updateDB extends SQLiteOpenHelper {

private static final String CREATE_TABLE_S = create table
+DICT_TAB_1+ (_ID integer primary key autoincrement, COURSE_NAME
text not null, SCORE number not null,  PUTTS number not null, GIR
number not null, FWY number not null);;

private static final String CREATE_TABLE_C = create table
+DICT_TAB_2+ (_ID integer primary key autoincrement, COURSE_NAME
text not null, TEES text not null,  SLOPE number not null, PAR number
not null);;

public updateDB(Context ctx){

super(ctx, DATABASE_NAME, null, DATABASE_VERSION);
}



@Override
public void onCreate(SQLiteDatabase db){

db.execSQL(CREATE_TABLE_COURSE);
db.execSQL(CREATE_TABLE_SCORE);


}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion){
db.execSQL(DROP TABLE IF EXISTS + DICT_TAB_1);
db.execSQL(DROP TABLE IF EXISTS + DICT_TAB_2);
onCreate(db);
}


}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can we start a new activity or at least display a Toast in TimerTask.run()?

2009-02-06 Thread Xin Zhao
I tried to deploy a timer and switch the user to another dialog for setting
if times out. But the dialog just cannot display. No error/exception
reported. Vibration works fine though.

What's wrong?

Code:

  private void setAutoPhonecardSelector(int interval) {
Date timeToRun = new Date(System.currentTimeMillis() + interval);
Timer timer = new Timer();

mAutoPhonecardSelector = new TimerTask() {
  @Override
  public void run() {
mVibrator.vibrate(100);
Toast.makeText(PhoneCardSelector.this, test,
Toast.LENGTH_LONG).show();
  }
};

timer.schedule(mAutoPhonecardSelector, timeToRun);
  }



Please help!

Thanks in advance!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MyLocationOverlay marker disappears

2009-02-06 Thread dlawl...@gmail.com

Anyone run into the flashing marker used by MyLocationOverlay on the
MapView to show the user's current location disappearing after a
certain amount of time (looks like about 1 minute)?  Seems like it
should either be a setting or should stay on by default as long as the
MapView is displaying.  Anyone know of a setting or is this a bug?
Emulator bug?

This was asked about in a previous thread but never answered:
http://groups.google.com/group/android-developers/browse_thread/thread/c11d8a9285725ca1/1020c88a7f17ae90

Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] java.nio.channels.IllegalSelectorException

2009-02-06 Thread sdehne

Hi,

I'm running into an IllegalSelectorException in my application which
can be reproduced with the following code (I put this test code right
after the super() in onCreate() of an Activity):

try {
  SocketChannel channel = SocketChannel.open();
  channel.configureBlocking(false);
  Selector selector = Selector.open();
  channel.register(selector, 0);
catch (IOException e) {
  Log.e(TAG, error, e);
}

Does anyone have a suggestion how to avoice this exception?

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: a receiver for outgoing sms and email?

2009-02-06 Thread Oscar A

Hi
I would also like to know if that is possible have tried a number of
solutions without success. Have managed to Receive incoming sms but
outgoing is still a difficulty for me.

Would be grate if there where some sort of ACTION_NEW_OUTGOING_SMS
(Broadcast Action: An outgoing sms is about to be sent) like the
ACTION_NEW_OUTGOING_CALL that I use to monitor, modify, and abort
outgoing calls.

The Intent will have the receivers phone numbers attached and once the
broadcast is finished, the resultData is used as the actual number
to send the SMS to.

Then we can implement an BroadcastReceiver abort an SMS like

//Abort SMS
setResultData(null);

Suggested Permissions
You must hold the PROCESS_OUTGOING_SMS  permission to receive this
Intent.

...Until something like this is included in the API does anyone know a
work around?

Best Regards
/Oscar A
http://drunkblocker.appspot.com



On Feb 5, 6:00 am, Dietrich Ayala auton...@gmail.com wrote:
 i figured out how to listen for outgoing calls. however, i can't find
 any docs or code samples for making a Receiver that catches outgoing
 sms or email.

 is that possible?

 thanks!

 -dietrich

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: .apk file resource optimisation

2009-02-06 Thread Dianne Hackborn
We welcome patches.

On Fri, Feb 6, 2009 at 4:45 PM, Inderjeet Singh inder...@gmail.com wrote:


 I dont think assets/ files are compressed all that great. For my app,
 I was able to cut down the size of overall apk by almost 50% by using
 GZipInputStream. I posted the numbers a while back.

 But now I am paying the cost of decompression while loading those assets.

 I hope the Android platform can improve the compression of the apk
 file itself in a subsequent release.

 Thanks
 Inder


 On Wed, Feb 4, 2009 at 2:25 PM, Dianne Hackborn hack...@android.com
 wrote:
  Oh btw there is one improvement we have in aapt for Cupcake to better
  compress .png image files.
 
  On Wed, Feb 4, 2009 at 2:24 PM, Dianne Hackborn hack...@android.com
 wrote:
 
  Yep I think they are pretty compact in their current form.  Note that
 the
  resource table itself is not stored compressed in the .apk, so that it
 can
  be mmapped into the process, which is a pretty important optimization
 for
  many cases.
 
  You can imagine doing some additional processing of the images to
 combine
  them into a few larger uber-images (we've done this kind of thing on
  previous platforms), but doing that well to the point where it is
 actually a
  win is not trivial, and it can easily lead to situations where you use
 way
  more memory than needed because you need to load the entire bitmap even
  though you only use a few things in it.  Imagine something displaying
 the
  icons of all of the applications for example, loading a huge bitmap from
  each of the apps to pull out one little icon.
 
  If you want to work on further optimizing the data structures and code,
  we'd be happy to talk about it on android-framework and consider such
  patches.
 
  On Wed, Feb 4, 2009 at 10:06 AM, FranckLefevre flas...@gmail.com
 wrote:
 
 
  Dear Raja,
 
  I think that compressing resources in APK would not be that convenient
  for two reasons:
 
   1- when resources are actual pictures, they are usually already
  compressed (using GIF, JPG, PNG,...) and trying to ZIP them does not
  significantly reduce their size
   2- APK resource files are offered through the framework (grep
  assets in the source code...) that maps these APK files, allowing
  to get a pointer to them. Compressing would lead to a buffer
  duplication that may impact memory and speed.
 
  IMHO, this APK format is quite smart and convenient as it is...
 
  Rgds.
 
  Franck
 
 
 
 
 
  On Feb 3, 11:44 am, Raja Nagendra Kumar nagendra.r...@gmail.com
  wrote:
   When we open up the .apk file in winzip (as it is a jar file), we see
   the classes are compressed and stored as one file. However the
   resources are taken as is. Would it not be a nice approach to
 compress
   all the resources (specially if all the application has many images)
   and store it as one file, as this could further bring down the .apk
   size. I understand it needs more runtime memory though.. Are there
 any
   options to pack the resources this way already..
  
   As Android seems to run j2se.. I am assuming that such kind of
 runtime
   memory is not an issue.
  
   Regards,
   Raja Nagendra Kumar,
   C.T.Owww.tejasoft.com
 
 
 
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 
 
 
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 
 
  
 

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application storage data growing

2009-02-06 Thread Dianne Hackborn
That is everything in the root data directory, which includes your raw data
files, plus SQLite databases, preferences, etc.

On Fri, Feb 6, 2009 at 2:45 PM, Rmac ry...@mac.com wrote:


 Thanks Dianne.  The odd thing is that I am NOT creating any files.
 And let me make sure we are talking the same thing... when I say
 data, I don't mean the data directory... I am talking about going to
 Settings/Applications/Manage applications/myapp/Storage/Data... if
 that is the data directory then we are talking about the same thing.
 What else could go there besides files that are explicitly created by
 the app?  Preferences?  SQLite databases?  Anything else?  The data
 storage value seems to gradually grow over time while using the app...
 from initial size of 76K to nearly a meg.


 On Feb 6, 11:51 am, Dianne Hackborn hack...@android.com wrote:
  Unfortunately it's a little tricky, because only your app (and some very
  very low-level parts of the system) can touch your data.  You can,
 however,
  just add some code to your app that iterates through your data
 directories
  with the standard Java File APIs and prints out what it finds.
 
  On Fri, Feb 6, 2009 at 8:36 AM, Rmac ry...@mac.com wrote:
 
   I've had debugging on from the beginning.  What I need is something
   that can tell me exactly what is in the application's data area that
   Android reports via Settings for managing applications.  I am sure my
   application is adding to it somehow, but I have no handle to tell what
   content is stored there.
 
   On Feb 5, 5:08 am, Chander Pechetty cspeche...@gmail.com wrote:
Not sure if you can do this, but check outhttp://
   code.google.com/android/intro/develop-and-debug.html#developin...
to understand the tools and limitations
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: java.nio.channels.IllegalSelectorException

2009-02-06 Thread sdehne

I subitted a new issue http://code.google.com/p/android/issues/detail?id=1932

On Feb 7, 2:13 am, sdehne de...@colibria.com wrote:
 Hi,

 I'm running into an IllegalSelectorException in my application which
 can be reproduced with the following code (I put this test code right
 after the super() in onCreate() of an Activity):

 try {
   SocketChannel channel = SocketChannel.open();
   channel.configureBlocking(false);
   Selector selector = Selector.open();
   channel.register(selector, 0);
 catch (IOException e) {
   Log.e(TAG, error, e);

 }

 Does anyone have a suggestion how to avoice this exception?

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Color filter modes and transparent colors

2009-02-06 Thread Obormot

Hi, guys.

I'm trying to make an image darker, but the image has some pixels
transparent. I want to keep those pixels intact. I tried DARKEN and
couple other filters, but they seem to alter transparent pixels as
well.

Do you know if there is a way to keep transparent pixels intact while
applying a color filter?

Sincerely,
  A.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---