[android-developers] Re: to play audio when a button is clicked

2008-10-10 Thread [EMAIL PROTECTED]

> What would be wrong with this:
> @Override
> public void onClick(View view) {
> MediaPlayer mp = MediaPlayer.create(this, R.raw.a2);
> mp.start();
>}

In this case I can to click only 27 times.
Then I hve exception - NullPointerException

In m5 worked variant:

if( mSoundFx != null )
  mSoundFx.pause();
mSoundFx = mSoundFxs[aBonusType];
mSoundFx.seekTo(0);
mSoundFx.start();

where mSoundFx - MediaPlayer mSoundFx;
and mSoundFxs  - MediaPlayer  mSoundFxs = new MediaPlayer[]{
MediaPlayer.create( mContext,R.raw.no2),
MediaPlayer.create( mContext,R.raw.trc_ok2),
MediaPlayer.create( mContext,R.raw.type2) ,
MediaPlayer.create( mContext,R.raw.side2),
MediaPlayer.create( mContext,R.raw.appl2),
};

But in 9beta and 1.0_r1 it does not work.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OutOfMemoryError on orientation change

2008-10-10 Thread songs

Hi,

My other post on this subject might show up some time, but it's been
over an hour since then so I'm assuming it's lost somewhere.

I get an OutOfMemoryException when I change the orientation on my app
3-4 times.  It's a pretty simple application that behaves well as long
as I don't change the orientation too often without shutting it down.

My activity creates an instance of its Java-based view in onCreate.
The view loads 30 or so small images (~2k each, png) when it's
created.  I've tried setting the activity's reference to the view to
null as well as calling System.gc() during onPause to try to clean
things up since onCreate gets called on every orientation change, but
that doesn't seem to help.  GC messages show up in the logs on every
orientation change regardless so garbage collection seems to happen in
general.

Here's a snippet of the stacktrace:
=
E/dalvikvm-heap(  302): 15872-byte external allocation too large for
this process.
E/(  302): VM won't let us allocate 15872 bytes
D/AndroidRuntime(  302): Shutting down VM
W/dalvikvm(  302): threadid=3: thread exiting with uncaught exception
(group=0x40010e28)
E/AndroidRuntime(  302): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  302): java.lang.OutOfMemoryError: bitmap size
exceeds VM budget
E/AndroidRuntime(  302):at
android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
E/AndroidRuntime(  302):at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
E/AndroidRuntime(  302):at
android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
E/AndroidRuntime(  302):at
android.content.res.Resources.loadDrawable(Resources.java:1440)
E/AndroidRuntime(  302):at
android.content.res.Resources.getDrawable(Resources.java:498)
=

Any ideas?

Thanks,
Steve

ps - I was checking for my post to show and Groups eventually told me
that I was spyware and to enter in info from the captcha, except that
the captcha wouldn't show in either Chrome or Firefox.  In Firefox,
Groups tried to tell me that I didn't have images enabled...  So that
was a really frustrating wait.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Message: does not extend Activity and Scala-programming

2008-10-10 Thread meiko

Hi

I am writing a Scala-program for Android.
http://www.scala-lang.org
Scala is compatible to Java, and compiles to Java-Bytecode

I had written Activities in Scala, and used them in the
AndroidManifest-File.
If the Scala classes directly extending android.app.Activity all is
running fine.
The problems begin, if the inheritance structure is a little bit
deeper.
MyActivity extends MyListActivity
MyListActivity extends android.app.ListActivity

"test.view.MyActivity does not extend android.app.Activity
AndroidManifest.xml ..."
Where does this message come from ?

My workaround is,
to write a JAVA-class which extends MyActivity, and used this Java-
Class in the AndroidManifest...
Why is this working ?

How can i suppress this error-message, and convince the plugin to
ignore it ?

Thx
Meiko

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OutOfMemoryError when switching orientation

2008-10-10 Thread songs

Hi,

I think that either I've stumbled onto a bug or I'm missing something
on how to manage my resources.  I have an activity with a Java based
view that contains 30 or so small images (~2k each .png) that are
loaded into an array when the view is created.  In "normal" operation,
everything runs fine.  When I flip the orientation between landscape
and portrait 3-4 times, I get the following:

E/AndroidRuntime(  472): java.lang.OutOfMemoryError: bitmap size
exceeds VM budget
E/AndroidRuntime(  472):at
android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
E/AndroidRuntime(  472):at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
E/AndroidRuntime(  472):at
android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
E/AndroidRuntime(  472):at
android.content.res.Resources.loadDrawable(Resources.java:1440)
E/AndroidRuntime(  472):at
android.content.res.Resources.getDrawable(Resources.java:498)

When the orientation gets changed, the activity seems to go through
the entire lifecycle (pause, stop, then create again).  A new instance
of the activity's view is created in the onCreate method and it seems
that the pause/stop steps in the lifecycle don't clean up the old
view.  I've tried explicitly setting the reference to the view to null
in onPause and doing a System.gc(), but that doesn't seem to help.
I've also tried setting the requested orientation to portrait in hopes
that the activity would then ignore orientation changes, but that
didn't work either.  GC messages come up after every orientation
change so one would think that the garbage collector was doing its
job.

I could just leave this be and assume people aren't going to be
randomly flipping their phone open and closed while they're using my
app, but that seems pretty sloppy.  I'd like to know what's going on
here and fix it.

Any ideas?

Thanks,
Steve

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REQUEST: Android Eclipse plugin option to define compiling and packaging arguments

2008-10-10 Thread Stoyan Damov

On Fri, Oct 10, 2008 at 9:46 AM, Adriano Crestani
<[EMAIL PROTECTED]> wrote:
>
> Hi Google Android Developers,
>
> I'd like to request a new version of Android Eclipse plugin which
> contains an option to define the compiling and packaging arguments.
>
> I really need to define an argument for the dex converter, but I can
> only do it on command line or via ant script. So, I'm not being able
> to compile it on my Eclipse environment.
>
> In my case I need to define the "--core-library" argument.

et tu? :) I'll be fine if there's just that option, I can live w/o the
ability to pass params to dex.

>
> Thanks in advance,
> Adriano Crestani
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-10-10 Thread Romain Guy

Looks like you're leaking memory somewhere. Do you keep a static cache
somewhere in your app?

On Thu, Oct 9, 2008 at 10:02 PM, songs <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think that either I've stumbled onto a bug or I'm missing something
> on how to manage my resources.  I have an activity with a Java based
> view that contains 30 or so small images (~2k each .png) that are
> loaded into an array when the view is created.  In "normal" operation,
> everything runs fine.  When I flip the orientation between landscape
> and portrait 3-4 times, I get the following:
>
> E/AndroidRuntime(  472): java.lang.OutOfMemoryError: bitmap size
> exceeds VM budget
> E/AndroidRuntime(  472):at
> android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
> E/AndroidRuntime(  472):at
> android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
> E/AndroidRuntime(  472):at
> android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
> E/AndroidRuntime(  472):at
> android.content.res.Resources.loadDrawable(Resources.java:1440)
> E/AndroidRuntime(  472):at
> android.content.res.Resources.getDrawable(Resources.java:498)
>
> When the orientation gets changed, the activity seems to go through
> the entire lifecycle (pause, stop, then create again).  A new instance
> of the activity's view is created in the onCreate method and it seems
> that the pause/stop steps in the lifecycle don't clean up the old
> view.  I've tried explicitly setting the reference to the view to null
> in onPause and doing a System.gc(), but that doesn't seem to help.
> I've also tried setting the requested orientation to portrait in hopes
> that the activity would then ignore orientation changes, but that
> didn't work either.  GC messages come up after every orientation
> change so one would think that the garbage collector was doing its
> job.
>
> I could just leave this be and assume people aren't going to be
> randomly flipping their phone open and closed while they're using my
> app, but that seems pretty sloppy.  I'd like to know what's going on
> here and fix it.
>
> Any ideas?
>
> Thanks,
> Steve
>
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Custom drawing with fingers

2008-10-10 Thread Stoyan Damov

android-sdk-windows-1.0_r1\samples\ApiDemos\src\com\example\android\apis\graphics\FingerPaint.java

On Fri, Oct 10, 2008 at 7:45 AM, Arron <[EMAIL PROTECTED]> wrote:
>
> I want to allow the user to paint/draw with their fingers.  Can
> someone point me to the right direction to go? or a sample app that
> has this capability?
>
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I record an audio file via MediaRecorder on the simulator which based on android-sdk-windows-1.0_r1?

2008-10-10 Thread [EMAIL PROTECTED]

You may do the following two points before the record.

1. set the permission for RECORD_AUDIO in Androidmanifest.xml.
2. simulate the sdcard.

The audio file should be stored in the sdcard.

On Oct 9, 4:45 pm, Lurky <[EMAIL PROTECTED]> wrote:
> Hi, All
>     I need record voice on the simulator and playback it. I wrot my
> code according the example in the documents:
>
> A common case of using MediaRecorder to record audio works as
> follows:
>
> MediaRecorder recorder = new MediaRecorder();
>  recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
>  recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
>  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
>  recorder.setOutputFile(PATH_NAME);
>  recorder.prepare();
>  recorder.start();   // Recording is now started
>  ...
>  recorder.stop();
>  recorder.reset();   // You can reuse the object by going back to
> setAudioSource() step
>  recorder.release(); // Now the object cannot be reused
>
>      My code created the audio file, but there isn't any audio data in
> it.
>      Would you give me a completed demo code for how to use
> MediaRecorder ?
>
>     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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] wrong file.length

2008-10-10 Thread otiasj

Hello,
I have a problem with one file, I copied it on an sdcard using the
DDMS,
and it show a size of 25568 (same size under windows)

however if I do :
File f = new File("myfile");
f.length -> 26236

Also when i try to copy this file with an inputstream/
FileOutputstream,
the resulting file is also 26236bytes instead of 25568bytes.

This file is a jar file. I have tried with other jar file and it works
correctly.
only this file doesn't...

I am wondering why this is happening...

Any tips?


Thank you for the help

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] M3 SDK: Click events on Map Overlays?

2008-10-10 Thread Matthias

Hi,

>From M5 onwards, there is a function to receive click events on map
overlays, which is not there in M3.

Is there any way to receive click events on map overlays in Android
M3?

Thanks,
Matthias

PS: I need to backport my app to M3, because we want to prepare a demo
on a Nokia cellphone preloaded with Android (and that only works with
M3).
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpClient, URLConnection, settings, etc...

2008-10-10 Thread Amos



Make sure you have the "android.permission.INTERNET" Uses Permission
in your AndroidManifest.xml file to enable your app to access the
internet.

I don't know of any preference between HttpClient and URLConnection
(I'd also be happy to know if one of them is preferred).

There's an apps-for-android project which contains app samples created
by Google's Android team. I haven't examined them in-depth, but I'm
sure they have some pretty good usage examples. From just a quick
browse, this class might be a useful reference for you:

http://code.google.com/p/apps-for-android/source/browse/trunk/Translate/src/com/beust/android/translate/Translate.java

Good Luck,
Amos

On Oct 9, 12:54 pm, Jasp182 <[EMAIL PROTECTED]> wrote:
> I have tried to call out to the web using both HttpClient and
> URLConnection, and I get "unknown error" in both cases at the point
> the call is actually made (HttpClient.execute() or
> URLConnection.getContent() methods).  My emulator is able to connect
> to the web, because I can use the Browser with no problem.  So, I'm
> assuming that there aren't any issues with my settings (this is being
> done on my home network with no proxy server).  Is there a "best
> practices" preference between using HttpClient or URLConnection, and
> are there any examples or sample apps (with source code) that make
> simple calls to the web?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Charting engine within Android?

2008-10-10 Thread Mark Murphy

This thread is better off being on [android-discuss].

Olaf Encke wrote:
>> Planned? My guess is no, only because few applications need charting and
> 
> I beg to differ. I think a lot of business applications, science tools
> and even some system/network utilities could really benefit from a
> builtin charting api. It would make developing such applications a
> breeze and with consistent (and themeable) charting graphs Android
> would present itself as a prime business platform.

Sorry, by "few" I mean "few as a percentage of the overall market of 
applications". Few desktop applications need charting, as a percentage 
of the desktop applications that exist. Few Web applications need 
charting. Few mobile applications for other platforms need charting. 
Hence, I don't feel like I'm completely out of line to suggest that few 
Android applications will need charting.

Perhaps I'll be wrong, particularly if a robust charting API comes to 
life. I certainly won't quibble if that's the case.

> Since flash memory in mobile devices is now at 256-512 MiB standard I
> think an investment of 1-2 MiB for a lean charting API would be well
> worth it instead of each app developer struggling to create his or her
> own charts which thus wouldn't look consistent on a systemwide scale
> or resign from implementing charts alltogether, leaving a lot to
> desire in the resulting app usability. Just look at WinMob for a lot
> of bad examples.

Everybody and their sister has a claim out on what goes in that silicon. 
You want charting. Another guy wants infrared support. Others want a 
wider range of programming languages. Others want more Bluetooth 
profiles and a Bluetooth API. Others want video recording.

I'm not saying charting is necessarily more or less worthy than any of 
the other candidates. I am saying, though, that there are limits as to 
what the silicon can hold and what the core Android team can manage, 
particularly without heavy lifting from the community.

> Yes that would be one way to do it, but my goal would be for (most)
> all charts in Android applications to deliver a consistent user
> experience and the only way to make sure we'll come close to meeting
> it in my opinion would be to integrate one suitable charting engine
> into the Android core.

The first step is to either port a charting API to Android or build one 
from scratch. The second step is to get lots of applications to settle 
on it as their charting solution (probably easy, since it'll be the only 
one available). The third step is to propose it as a contribution to 
Android once it's open source, demonstrating its success in the 
marketplace and the valuable contribution it makes to the platform.

The sooner somebody with a charting itch to scratch starts in, the 
sooner you'll see your vision realized.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to use the existing MediaPlayer in Android ?

2008-10-10 Thread Baonq86

I really need the solution for this problem! Does anyone in group help
me ?? Thank you !

On Oct 8, 3:29 pm, Baonq86 <[EMAIL PROTECTED]> wrote:
> I developped a MediaPlayer program successfully by using
> android.media.MediaPlayer libraries. However, now I want to access and
> use the existing MediaPlayer in Android to play music.
>
> Can anyone help me ? 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using Street View within my app

2008-10-10 Thread Peli

Unfortunately, I don't think there is an API for this in the current
system...

Peli

On Oct 10, 12:06 pm, mscwd01 <[EMAIL PROTECTED]> wrote:
> Am I able to embed a streetview within my app, like you would with a
> mapview?
>
> On Oct 8, 3:54 pm, Peli <[EMAIL PROTECTED]> wrote:
>
> > You could call the VIEW intent on a streetview URI 
> > (seehttp://www.openintents.org/en/node/63) to display the streetview from
> > your application.
>
> > Would this be sufficient for your purposes?
>
> > Peli
>
> > On Oct 8, 2:08 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > > Is there no way to get a panoramic image of a given set of
> > > coordinates? There must be!
> > > Any help?
>
> > > On Oct 6, 3:04 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > > > Hey,
>
> > > > Is there a simple way to get aStreetViewof a given set of
> > > > coordinates (plus heading i.e. direction camera is pointng) and
> > > > display it as an image within my application?
>
> > > > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-10-10 Thread songs

Interesting.  Thanks for the lead.  I'll look into this an report back
either way.

On Oct 10, 1:48 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> Then you should check carefully where exactly you pass your Activity
> (or Context) to other classes/APIs, etc. The Context is used by many
> different classes in the Android framework and if you somehow "leak"
> the Context, you leak all the views, images, etc. Your issue is very
> similar to several issues we fixed over the past few months: on each
> rotation the Context leaks and everything leaks with it. You can use
> DDMS to check how the heap is growing after each rotation, it should
> tell you whether this is the problem or not.
>
>
>
> On Fri, Oct 10, 2008 at 1:44 AM, songs <[EMAIL PROTECTED]> wrote:
>
> > Nope, the only static variables I have are constants.  I do keep an
> > array of Drawable in the view, but that's an instance variable.
>
> > On Oct 10, 1:14 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> >> Looks like you're leaking memory somewhere. Do you keep a static cache
> >> somewhere in your app?
>
> >> On Thu, Oct 9, 2008 at 10:02 PM, songs <[EMAIL PROTECTED]> wrote:
>
> >> > Hi,
>
> >> > I think that either I've stumbled onto a bug or I'm missing something
> >> > on how to manage my resources.  I have an activity with a Java based
> >> > view that contains 30 or so small images (~2k each .png) that are
> >> > loaded into an array when the view is created.  In "normal" operation,
> >> > everything runs fine.  When I flip the orientation between landscape
> >> > and portrait 3-4 times, I get the following:
>
> >> > E/AndroidRuntime(  472): java.lang.OutOfMemoryError: bitmap size
> >> > exceeds VM budget
> >> > E/AndroidRuntime(  472):        at
> >> > android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
> >> > E/AndroidRuntime(  472):        at
> >> > android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
> >> > E/AndroidRuntime(  472):        at
> >> > android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
> >> > E/AndroidRuntime(  472):        at
> >> > android.content.res.Resources.loadDrawable(Resources.java:1440)
> >> > E/AndroidRuntime(  472):        at
> >> > android.content.res.Resources.getDrawable(Resources.java:498)
>
> >> > When the orientation gets changed, the activity seems to go through
> >> > the entire lifecycle (pause, stop, then create again).  A new instance
> >> > of the activity's view is created in the onCreate method and it seems
> >> > that the pause/stop steps in the lifecycle don't clean up the old
> >> > view.  I've tried explicitly setting the reference to the view to null
> >> > in onPause and doing a System.gc(), but that doesn't seem to help.
> >> > I've also tried setting the requested orientation to portrait in hopes
> >> > that the activity would then ignore orientation changes, but that
> >> > didn't work either.  GC messages come up after every orientation
> >> > change so one would think that the garbage collector was doing its
> >> > job.
>
> >> > I could just leave this be and assume people aren't going to be
> >> > randomly flipping their phone open and closed while they're using my
> >> > app, but that seems pretty sloppy.  I'd like to know what's going on
> >> > here and fix it.
>
> >> > Any ideas?
>
> >> > Thanks,
> >> > Steve
>
> >> --
> >> Romain Guywww.curious-creature.org
>
> --
> Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Saved Instance State and ListViews

2008-10-10 Thread Mark Hansen

I have a ListView I'm populating with a call to an XML feed, and I'd
like to save it when the orientation flips to save a reload.

I've read that you can Override the onSaveInstanceState and store your
information there, but I can't figure out how to save the values of a
ListView?

Am I on the right path or am I doing something wrong?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Stoyan Damov

I don't get the question - just serialize the items into the bundle?
Am I missing something here?

On Fri, Oct 10, 2008 at 4:31 PM, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
> I have a ListView I'm populating with a call to an XML feed, and I'd
> like to save it when the orientation flips to save a reload.
>
> I've read that you can Override the onSaveInstanceState and store your
> information there, but I can't figure out how to save the values of a
> ListView?
>
> Am I on the right path or am I doing something wrong?
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Code working in standalone java; doesnot work in android (android-sdk-windows-0.9_beta)

2008-10-10 Thread androidian

Does anyone have a cleaner solution to this problem (i.e. apart from
modifying/hacking google's own gdata code)?  It seems strange that
you'd have to do that in order to access google APIs from android.

I've added uses-permission android:name="android.permission.INTERNET"
to my manifest but I still get the error:
com.google.gdata.util.AuthenticationException: Error connecting with
login URI
...
Caused by: java.io.IOException: Hostname  was not
verified

This is just by using the following code in my app:
SpreadsheetService myService = new SpreadsheetService(
"mydomain.com-myapp-1");
myService.setUserCredentials("[EMAIL PROTECTED]",
"mypassword");

Any ideas?  It seems to be trying to get an SSL connection for some
reason.  Can someone point me in the right direction?

cheers,
Ian

On Sep 12, 6:11 am, haig <[EMAIL PROTECTED]> wrote:
> The getRequestConnection method that was modifiedhttp://pastebin.com/f5efc9f0d
>
> Error:http://pastebin.com/f6f115f2d
>
> On Sep 11, 11:40 am, haig <[EMAIL PROTECTED]> wrote:
>
> > Hi Stunti,
>
> > I still am receiving errors, but it is slightly different:  Host is
> > unresolved:www.google.com:443
> > Any thoughts?
>
> > On Sep 9, 7:34 am, stunti <[EMAIL PROTECTED]> wrote:
>
> > > You need to modify the code of gdata.
> > > The certificates used by HttpURLConnection arenotavailable to
> > > validate thehostnameduring a SSL connexion.
> > > A small workaround below.
> > > around line 332 in com.google.gdata.client.http.HttpGDataRequest
>
> > > You might also want to disable GZIP compression as it seems to messed
> > > up the content for the XML parser.
> > > I don't know if it will be fized within the next release.
>
> > >     HttpsURLConnection uc = (HttpsURLConnection)
> > > requestUrl.openConnection();
> > >     uc.setHostnameVerifier( new X509HostnameVerifier(){
> > >                 @Override
> > >                 public boolean verify(String host, SSLSession session) {
> > >                         // TODO Auto-generated method stub
> > >                         return true;
> > >                 }
>
> > >                 @Override
> > >                 public void verify(String host, SSLSocket ssl) 
> > > throwsIOException{
> > >                         // TODO Auto-generated method stub
> > >                 }
>
> > >                 @Override
> > >                 public void verify(String host, X509Certificate cert)
> > >                                 throws SSLException {
> > >                         // TODO Auto-generated method stub
> > >                 }
>
> > >                 @Override
> > >                 public void verify(String host, String[] cns, String[] 
> > > subjectAlts)
> > >                                 throws SSLException {
> > >                         // TODO Auto-generated method stub
> > >                 }
> > >     });
>
> > > On Sep 8, 5:24 am, haig <[EMAIL PROTECTED]> wrote:
>
> > > > I am having similar problems, hope someone can help.
>
> > > > In my example, "myService" is a GoogleService
>
> > > > GoogleService myService = new GoogleService("blogger", "exampleCo-
> > > > exampleApp-1");
>
> > > > Standalone client works fine, butnotin my android app.
>
> > > > Error from logcat:
>
> > > >  com.google.gdata.util.AuthenticationException: Error connecting with
> > > > login URI
> > > >      at
> > > > com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(Unknown
> > > > Source)
> > > >      at
> > > > com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(Unknown
> > > > Source)
> > > >      at
> > > > com.google.gdata.client.GoogleService.setUserCredentials(Unknown
> > > > Source)
> > > >      at
> > > > com.google.gdata.client.GoogleService.setUserCredentials(Unknown
> > > > Source)
> > > >      at com.travelrecorder.network.Blogger.publish_post(Blogger.java:
> > > > 32)
> > > >      at com.travelrecorder.network.AlarmService_Service
> > > > $1.run(AlarmService_Service.java:71)
> > > >      at java.lang.Thread.run(Thread.java:914)
> > > >  Caused by: java.io.IOException:Hostname wasnot
> > > >verified
> > > >      at
> > > > org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:
> > > > 169)
> > > >      at
> > > > org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection
> > > > $HttpsEngine.connect(HttpsURLConnection.java:398)
> > > >      at
> > > > org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection...
> > > > 1129)
> > > >      at
> > > > org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getOutputStream(HttpsURLConnect...
> > > > 262)
> > > >      at
> > > > com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(Unknown
> > > > Source)
> > > >      ... 7 more
>
> > > > On Aug 25, 1:40 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > You didn't a

[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Mark Hansen

I think I'm missing something... I want to do something like.  I have
the list Adapater being set to a custom adapter... so I was trying to
do it this way..

@Override
public void onSaveInstanceState(Bundle savedInstanceState)
{
savedInstanceState.putSerializable("listview", (Serializable)
getListAdapter());

}

@Override
public void onRestoreInstanceState(Bundle savedInstanceState)
{

setListAdapter((MyCustomListAdapter)
savedInstanceState.getSerializable("listview"));

}

On Oct 10, 9:40 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
> I don't get the question - just serialize the items into the bundle?
> Am I missing something here?
>
> On Fri, Oct 10, 2008 at 4:31 PM, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
> > I have a ListView I'm populating with a call to an XML feed, and I'd
> > like to save it when the orientation flips to save a reload.
>
> > I've read that you can Override the onSaveInstanceState and store your
> > information there, but I can't figure out how to save the values of a
> > ListView?
>
> > Am I on the right path or am I doing something wrong?
>
>
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Custom drawing with fingers

2008-10-10 Thread Arron

I want to allow the user to paint/draw with their fingers.  Can
someone point me to the right direction to go? or a sample app that
has this capability?

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Stoyan Damov

I don't think that would work. You'll need to manually serialize the items.

On Fri, Oct 10, 2008 at 4:49 PM, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
> I think I'm missing something... I want to do something like.  I have
> the list Adapater being set to a custom adapter... so I was trying to
> do it this way..
>
>@Override
>public void onSaveInstanceState(Bundle savedInstanceState)
>{
>savedInstanceState.putSerializable("listview", (Serializable)
> getListAdapter());
>
>}
>
>@Override
>public void onRestoreInstanceState(Bundle savedInstanceState)
>{
>
>setListAdapter((MyCustomListAdapter)
> savedInstanceState.getSerializable("listview"));
>
>}
>
> On Oct 10, 9:40 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
>> I don't get the question - just serialize the items into the bundle?
>> Am I missing something here?
>>
>> On Fri, Oct 10, 2008 at 4:31 PM, Mark Hansen <[EMAIL PROTECTED]> wrote:
>>
>> > I have a ListView I'm populating with a call to an XML feed, and I'd
>> > like to save it when the orientation flips to save a reload.
>>
>> > I've read that you can Override the onSaveInstanceState and store your
>> > information there, but I can't figure out how to save the values of a
>> > ListView?
>>
>> > Am I on the right path or am I doing something wrong?
>>
>>
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Mark Murphy

Stoyan Damov wrote:
> I don't think that would work. You'll need to manually serialize the items.

Or, if the actual ListAdapter contents are already stored somewhere 
(e.g., database), just store transient state, like the selected position 
and visible items.

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

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Mark Hansen

The list is pulled from a remote feed over the web, so I was trying to
prevent having to reload the listview via another web pull.

Basically I just want the application to save everything and then
restore itself when the user changes orientation, instead of having to
make another full call back data source.



On Oct 10, 10:09 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Stoyan Damov wrote:
> > I don't think that would work. You'll need to manually serialize the items.
>
> Or, if the actual ListAdapter contents are already stored somewhere
> (e.g., database), just store transient state, like the selected position
> and visible items.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to control the TabHost.TabSpec's Width and Height?

2008-10-10 Thread alan

I would like to do the same, for simple text tabs the height is quite
excessive

On Sep 22, 3:04 am, "dailyLife"<[EMAIL PROTECTED]> wrote:
> Hi,
>   L want to control the TabHost.TabSpec's Width and Height im my program.
>   How to achieve such a function?
> Can anyone tell me the way ?
> thanks,
> goto.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpClient, URLConnection, settings, etc...

2008-10-10 Thread Guillaume Perrot

What are you trying to do ?
Can you post your code ?
For the HttpClient usage, there are several examples at
http://hc.apache.org/httpcomponents-client/examples.html

I have no best practice for you but concerning my usage:
* I only use HttpClient when I need to handle cookies.
* For REST API calls, I use URLConnection which is quite simple.

On Oct 9, 12:54 pm, Jasp182 <[EMAIL PROTECTED]> wrote:
> I have tried to call out to the web using both HttpClient and
> URLConnection, and I get "unknown error" in both cases at the point
> the call is actually made (HttpClient.execute() or
> URLConnection.getContent() methods).  My emulator is able to connect
> to the web, because I can use the Browser with no problem.  So, I'm
> assuming that there aren't any issues with my settings (this is being
> done on my home network with no proxy server).  Is there a "best
> practices" preference between using HttpClient or URLConnection, and
> are there any examples or sample apps (with source code) that make
> simple calls to the web?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using Street View within my app

2008-10-10 Thread mscwd01

Am I able to embed a streetview within my app, like you would with a
mapview?

On Oct 8, 3:54 pm, Peli <[EMAIL PROTECTED]> wrote:
> You could call the VIEW intent on a streetview URI 
> (seehttp://www.openintents.org/en/node/63) to display the streetview from
> your application.
>
> Would this be sufficient for your purposes?
>
> Peli
>
> On Oct 8, 2:08 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > Is there no way to get a panoramic image of a given set of
> > coordinates? There must be!
> > Any help?
>
> > On Oct 6, 3:04 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > > Hey,
>
> > > Is there a simple way to get aStreetViewof a given set of
> > > coordinates (plus heading i.e. direction camera is pointng) and
> > > display it as an image within my application?
>
> > > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] interrupt incoming sms.

2008-10-10 Thread e

Hi,
plz help me out..How to interrupt incoming sms??is it possible in new
sdk(1.0)???
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there android 2.0?

2008-10-10 Thread Guillaume Perrot

This is a spam post, and the link is for phishing...

On Oct 10, 5:02 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> my friend told me google has android,is this the truth.
>
> jim liu
> http://www.googlemother.com/wpblogs/?p=7281";>prototype wtp
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help me to test APK file on your real device

2008-10-10 Thread Al Sutton

Hi Ulziisaikhan,

If you want to list it at AndAppStore.com with a note in your description about 
it being for testing purposes feel free. Part of what I'm trying to achieve 
with AndAppStore is creating a place where users can not only get finished 
apps, but also help by testing out up and coming programs.

Al.

Ulzii wrote:
> Hi All,
>
> I have finished an application for the Android platform device.
>
> I am writing from Ulaanbaatar, Mongolia. It means there is no
> possibility to test apk file on real android gPhone device.
>
> Is there anyone who obtained gPhone, could you help me to test my APK
> file on your device.
>
> My APK file is located on next link.
>
> http://terelj.googlepages.com/ToDoListApplet.apk
>
> Next link touches screenshots of my application.
>
> http://water.appspot.com/
>
> Thanks,
>
> Any help would be greatly appreciated!
>
> Ulziisaikhan
> >
>   


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-10-10 Thread songs

Nope, the only static variables I have are constants.  I do keep an
array of Drawable in the view, but that's an instance variable.

On Oct 10, 1:14 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> Looks like you're leaking memory somewhere. Do you keep a static cache
> somewhere in your app?
>
>
>
> On Thu, Oct 9, 2008 at 10:02 PM, songs <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I think that either I've stumbled onto a bug or I'm missing something
> > on how to manage my resources.  I have an activity with a Java based
> > view that contains 30 or so small images (~2k each .png) that are
> > loaded into an array when the view is created.  In "normal" operation,
> > everything runs fine.  When I flip the orientation between landscape
> > and portrait 3-4 times, I get the following:
>
> > E/AndroidRuntime(  472): java.lang.OutOfMemoryError: bitmap size
> > exceeds VM budget
> > E/AndroidRuntime(  472):        at
> > android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
> > E/AndroidRuntime(  472):        at
> > android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
> > E/AndroidRuntime(  472):        at
> > android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
> > E/AndroidRuntime(  472):        at
> > android.content.res.Resources.loadDrawable(Resources.java:1440)
> > E/AndroidRuntime(  472):        at
> > android.content.res.Resources.getDrawable(Resources.java:498)
>
> > When the orientation gets changed, the activity seems to go through
> > the entire lifecycle (pause, stop, then create again).  A new instance
> > of the activity's view is created in the onCreate method and it seems
> > that the pause/stop steps in the lifecycle don't clean up the old
> > view.  I've tried explicitly setting the reference to the view to null
> > in onPause and doing a System.gc(), but that doesn't seem to help.
> > I've also tried setting the requested orientation to portrait in hopes
> > that the activity would then ignore orientation changes, but that
> > didn't work either.  GC messages come up after every orientation
> > change so one would think that the garbage collector was doing its
> > job.
>
> > I could just leave this be and assume people aren't going to be
> > randomly flipping their phone open and closed while they're using my
> > app, but that seems pretty sloppy.  I'd like to know what's going on
> > here and fix it.
>
> > Any ideas?
>
> > Thanks,
> > Steve
>
> --
> Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: dalvikvm-gc error at startup creating "ashmem mark stack"

2008-10-10 Thread twebb

I'm not having much luck in either place.


On Oct 9, 8:48 pm, "Andrew Stadler" <[EMAIL PROTECTED]> wrote:
> You'll probably get better feedback on this problem in the
> android-internals mailing list.
>
> On Thu, Oct 9, 2008 at 12:51 PM, twebb <[EMAIL PROTECTED]> wrote:
>
> > When mounting rootfs as yaffs2, the servicemanager dies/exits almost
> > immediately on android startup, and logcat output is shown below.
> > However, when mounting same rootfs via NFS, I don't see this problem
> > (though I do have other issues).  Does the error
>
> > E/dalvikvm-gc(  483): Could not create 176128-byte ashmem mark stack
>
> > indicate a specific problem?  Might there be a way to dump more
> > specific/verbose output at startup to get a better understanding of
> > what's wrong?
>
> > Thanks,
> > twebb
>
> > I/DEBUG   (  481): debuggerd: Aug 14 2008 18:58:32
> > E/mountd  (  480): could not read initial mass storage state
> > D/AndroidRuntime(  483):
> > D/AndroidRuntime(  483): >> AndroidRuntime START
> > <<
> > D/AndroidRuntime(  483): CheckJNI is ON
> > D/AndroidRuntime(  483): --- registering native functions ---
> > I/Zygote  (  483): Preloading classes...
> > E/dalvikvm-gc(  483): Could not create 176128-byte ashmem mark stack
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Mark Hansen

Thanks for the input.. I ended up just saving out my data from the
pull as suggested, it was already an ArrayList and I just jammed it in
with the putSerializable and it works fine.

Thanks for the help guys.

On Oct 10, 10:26 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Mark Hansen wrote:
> > The list is pulled from a remote feed over the web, so I was trying to
> > prevent having to reload the listview via another web pull.
>
> I would recommend storing the data from the feed somewhere other than
> just in the ListView itself. Database, XML file, JSON file, whatever. If
> you go with the database option, you can use a CursorAdapter and still
> only have one copy of the data -- just in a spot that is designed to
> live longer.
>
> > Basically I just want the application to save everything and then
> > restore itself when the user changes orientation, instead of having to
> > make another full call back data source.
>
> Understood, but I suspect the instance-state mechanism isn't designed
> for large data sets.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-10-10 Thread Romain Guy

Then you should check carefully where exactly you pass your Activity
(or Context) to other classes/APIs, etc. The Context is used by many
different classes in the Android framework and if you somehow "leak"
the Context, you leak all the views, images, etc. Your issue is very
similar to several issues we fixed over the past few months: on each
rotation the Context leaks and everything leaks with it. You can use
DDMS to check how the heap is growing after each rotation, it should
tell you whether this is the problem or not.

On Fri, Oct 10, 2008 at 1:44 AM, songs <[EMAIL PROTECTED]> wrote:
>
> Nope, the only static variables I have are constants.  I do keep an
> array of Drawable in the view, but that's an instance variable.
>
> On Oct 10, 1:14 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>> Looks like you're leaking memory somewhere. Do you keep a static cache
>> somewhere in your app?
>>
>>
>>
>> On Thu, Oct 9, 2008 at 10:02 PM, songs <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > I think that either I've stumbled onto a bug or I'm missing something
>> > on how to manage my resources.  I have an activity with a Java based
>> > view that contains 30 or so small images (~2k each .png) that are
>> > loaded into an array when the view is created.  In "normal" operation,
>> > everything runs fine.  When I flip the orientation between landscape
>> > and portrait 3-4 times, I get the following:
>>
>> > E/AndroidRuntime(  472): java.lang.OutOfMemoryError: bitmap size
>> > exceeds VM budget
>> > E/AndroidRuntime(  472):at
>> > android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
>> > E/AndroidRuntime(  472):at
>> > android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
>> > E/AndroidRuntime(  472):at
>> > android.graphics.drawable.Drawable.createFromStream(Drawable.java:635)
>> > E/AndroidRuntime(  472):at
>> > android.content.res.Resources.loadDrawable(Resources.java:1440)
>> > E/AndroidRuntime(  472):at
>> > android.content.res.Resources.getDrawable(Resources.java:498)
>>
>> > When the orientation gets changed, the activity seems to go through
>> > the entire lifecycle (pause, stop, then create again).  A new instance
>> > of the activity's view is created in the onCreate method and it seems
>> > that the pause/stop steps in the lifecycle don't clean up the old
>> > view.  I've tried explicitly setting the reference to the view to null
>> > in onPause and doing a System.gc(), but that doesn't seem to help.
>> > I've also tried setting the requested orientation to portrait in hopes
>> > that the activity would then ignore orientation changes, but that
>> > didn't work either.  GC messages come up after every orientation
>> > change so one would think that the garbage collector was doing its
>> > job.
>>
>> > I could just leave this be and assume people aren't going to be
>> > randomly flipping their phone open and closed while they're using my
>> > app, but that seems pretty sloppy.  I'd like to know what's going on
>> > here and fix it.
>>
>> > Any ideas?
>>
>> > Thanks,
>> > Steve
>>
>> --
>> Romain Guywww.curious-creature.org
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Help me to test APK file on your real device

2008-10-10 Thread Ulzii

Hi All,

I have finished an application for the Android platform device.

I am writing from Ulaanbaatar, Mongolia. It means there is no
possibility to test apk file on real android gPhone device.

Is there anyone who obtained gPhone, could you help me to test my APK
file on your device.

My APK file is located on next link.

http://terelj.googlepages.com/ToDoListApplet.apk

Next link touches screenshots of my application.

http://water.appspot.com/

Thanks,

Any help would be greatly appreciated!

Ulziisaikhan
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Charting engine within Android?

2008-10-10 Thread Olaf Encke

> Planned? My guess is no, only because few applications need charting and

I beg to differ. I think a lot of business applications, science tools
and even some system/network utilities could really benefit from a
builtin charting api. It would make developing such applications a
breeze and with consistent (and themeable) charting graphs Android
would present itself as a prime business platform.

> the bigger the operating system, the more expensive it is to put it on a
> phone. But, I could be wrong.

Since flash memory in mobile devices is now at 256-512 MiB standard I
think an investment of 1-2 MiB for a lean charting API would be well
worth it instead of each app developer struggling to create his or her
own charts which thus wouldn't look consistent on a systemwide scale
or resign from implementing charts alltogether, leaving a lot to
desire in the resulting app usability. Just look at WinMob for a lot
of bad examples.

> Ummm...OK. There are plenty of Java charting solutions out there, some
> for Swing, some that generate graphics on the server side, that you are
> welcome to port to work with Android and its Canvas model.

Yes that would be one way to do it, but my goal would be for (most)
all charts in Android applications to deliver a consistent user
experience and the only way to make sure we'll come close to meeting
it in my opinion would be to integrate one suitable charting engine
into the Android core.

I think at the moment Android lays too much focus on the "cool" gagdet
apps with location based services and I just hope dearly that the gps
power drain won't completely ruin the usability of all those
applications.
On the other hand the classic reason for buying an expensive phone/
data plan is business use and visualizing data in charts for quick
analysis is a typical requirement in this scenario.

That's my opinion.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Saved Instance State and ListViews

2008-10-10 Thread Mark Murphy

Mark Hansen wrote:
> The list is pulled from a remote feed over the web, so I was trying to
> prevent having to reload the listview via another web pull.

I would recommend storing the data from the feed somewhere other than 
just in the ListView itself. Database, XML file, JSON file, whatever. If 
you go with the database option, you can use a CursorAdapter and still 
only have one copy of the data -- just in a spot that is designed to 
live longer.

> Basically I just want the application to save everything and then
> restore itself when the user changes orientation, instead of having to
> make another full call back data source.

Understood, but I suspect the instance-state mechanism isn't designed 
for large data sets.

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

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Charting engine within Android?

2008-10-10 Thread hackbod

On Oct 10, 3:05 am, Olaf Encke <[EMAIL PROTECTED]> wrote:

> Since flash memory in mobile devices is now at 256-512 MiB standard I
> think an investment of 1-2 MiB for a lean charting API would be well

1-2MB...  -lean-...?!?  That's about the same size as the entire
android frameworks!!!  And consider that your huge whopping 256-512MB
must be used for the entire system, plus kernel, plus radio image, as
well as internal data storage, and a measly 1-2MB can easily mean 10
or more fewer apps you can install.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: polite request for better error messages

2008-10-10 Thread hackbod

On Oct 9, 11:25 pm, Jason Proctor <[EMAIL PROTECTED]> wrote:
> the android error situations i'm talking about are not even close to
> this. the network connection error i specified is an android
> permissions error, which is a long way above the kernel. but still,
> android only sees fit to provide "unknown error", which i'm sure you
> agree, given the context, could be a lot better.

Please read again what I wrote.  The permission for access to the
network is enforced at the KERNEL level, nowhere near Java.

> Google might be new to Java and to mobile, but many people in this
> sphere, including me, are new to neither.

Google is in no way new to Java, and the Android team is composed
almost entirely by people with a long history in mobile operating
systems, including big chunks of people from Palm/PalmSource/Access,
Danger, Microsoft, etc.

Anyway, I am not arguing about this, I am not saying the errors are
great as they are, I was just trying to give some insight into why in
many cases giving better errors in Android is not as simple as you
seem to think it is.  If you don't want to believe me that this is how
things work, well fine, but it's not really worth arguing about.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Automatic "word wrap" for views?

2008-10-10 Thread Nikkelitous

Is there any way to automatically wrap widgets within a view? I'd like
a display with a series of number buttons.  I'd like to have them show
up as 4 rows on a portrait screen (As on a telephone) and 2 rows in
Landscape (6 per row).  Now, I'm not set on these two options, and I
guess I could make 2 separate views depending on orientation but is
there any easy/automatic way to do this?

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Automatic "word wrap" for views?

2008-10-10 Thread Stoyan Damov

http://code.google.com/android/reference/android/widget/TableLayout.html

On Fri, Oct 10, 2008 at 8:08 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>
> Is there any way to automatically wrap widgets within a view? I'd like
> a display with a series of number buttons.  I'd like to have them show
> up as 4 rows on a portrait screen (As on a telephone) and 2 rows in
> Landscape (6 per row).  Now, I'm not set on these two options, and I
> guess I could make 2 separate views depending on orientation but is
> there any easy/automatic way to do this?
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: getLatitudeSpan, getLongitudeSpan, getHeight, getWidth errors

2008-10-10 Thread yarun

Thank-you, this makes sense.

What is the best way to wait for an activity to be laid out? Should I
set a listener (if so which listener), use multi-threading, or another
alternative?

The multi-threading option seems redundant to me because the map
rendering is occurring in the UI thread and I just want to know when
its done rendering hence I just want to setup a listener.

yarun

On Oct 9, 8:01 pm, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> This is because at the time code is executed in onCreate(), the first
> layout pass hasn't happened yet. You need to wait for the activity to
> be laid out before you can retrieve these information.
>
>
>
> On Thu, Oct 9, 2008 at 6:28 PM, yarun <[EMAIL PROTECTED]> wrote:
>
> > Hello, in my MapView, getLatitudeSpan is returning 0, and
> > getLongitudeSpan is returning 360,000,000. Similarly, getHeight,
> > getWidth and any other get[Pixel] method is returning 0. How am I
> > improperly setting up my code?
>
> > XML:
> > http://schemas.android.com/apk/res/
> > android"
> >    android:id="@+id/map_view_main"
> >    android:layout_width="fill_parent"
> >    android:layout_height="fill_parent">
> >     >        android:id="@+id/map_view"
> >        android:layout_width="fill_parent"
> >        android:layout_height="fill_parent"
> >        android:enabled="true"
> >        android:clickable="true"
> >        android:apiKey="map"
> >        />
> > 
>
> > Code:
> > public class SampleMap extends MapActivity{
> >        MapView map_view = null;
> >        private String DEBUG_TAG = "MapView";
>
> >        public void onCreate(Bundle icicle){
> >                super.onCreate(icicle);
>
> >                setContentView(R.layout.map_view);
> >                map_view = (MapView) findViewById(R.id.map_view);
>
> >                Log.d(DEBUG_TAG, "bottom: " + map_view.getBottom());
> >                Log.d(DEBUG_TAG, "map Height: " + map_view.getHeight());
> >                Log.d(DEBUG_TAG, "map Width: " + map_view.getWidth());
> >                Log.d(DEBUG_TAG, "latitude span: " +
> > map_view.getLatitudeSpan());
> >                Log.d(DEBUG_TAG, "longtitude span: " +
> > map_view.getLongitudeSpan());
> >        }
> > }
>
> > Aside from getLongitudeSpan, every method called in Log.d returns 0.
>
> --
> Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Automatic "word wrap" for views?

2008-10-10 Thread Nikkelitous

That lets me put them next to each other and above one another but
doesn't answer my question at all.  I would like to them to
automatically fill the screen not just in width, but automatically
making new rows when they are too wide to be usable on one row.

On Oct 10, 11:22 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
> http://code.google.com/android/reference/android/widget/TableLayout.html
>
> On Fri, Oct 10, 2008 at 8:08 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>
> > Is there any way to automatically wrap widgets within a view? I'd like
> > a display with a series of number buttons.  I'd like to have them show
> > up as 4 rows on a portrait screen (As on a telephone) and 2 rows in
> > Landscape (6 per row).  Now, I'm not set on these two options, and I
> > guess I could make 2 separate views depending on orientation but is
> > there any easy/automatic way to do this?
>
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Automatic "word wrap" for views?

2008-10-10 Thread Stoyan Damov

I'm sorry, I should have paid attention to "but is there any
easy/automatic way to do this?" part of your post.
I don't know of such a layout. You'll probably need to handle the
orientation change.

Cheers

On Fri, Oct 10, 2008 at 8:31 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>
> That lets me put them next to each other and above one another but
> doesn't answer my question at all.  I would like to them to
> automatically fill the screen not just in width, but automatically
> making new rows when they are too wide to be usable on one row.
>
> On Oct 10, 11:22 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
>> http://code.google.com/android/reference/android/widget/TableLayout.html
>>
>> On Fri, Oct 10, 2008 at 8:08 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>>
>> > Is there any way to automatically wrap widgets within a view? I'd like
>> > a display with a series of number buttons.  I'd like to have them show
>> > up as 4 rows on a portrait screen (As on a telephone) and 2 rows in
>> > Landscape (6 per row).  Now, I'm not set on these two options, and I
>> > guess I could make 2 separate views depending on orientation but is
>> > there any easy/automatic way to do this?
>>
>> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] polite request for better error messages

2008-10-10 Thread Jason Proctor

thanks for the response. sorry for the tone of my post - it was late, 
there were beers, and as you can tell error messages are a pet peeve.

i agree we all want the same things here and it's not always possible 
to provide the best.

Android permissions are enforced in the Linux kernel? really? i'm 
interested as to how this is done, is there any info up anywhere?

tx




>On Oct 9, 11:25 pm, Jason Proctor <[EMAIL PROTECTED]> wrote:
>>  the android error situations i'm talking about are not even close to
>>  this. the network connection error i specified is an android
>>  permissions error, which is a long way above the kernel. but still,
>>  android only sees fit to provide "unknown error", which i'm sure you
>>  agree, given the context, could be a lot better.
>
>Please read again what I wrote.  The permission for access to the
>network is enforced at the KERNEL level, nowhere near Java.
>
>>  Google might be new to Java and to mobile, but many people in this
>>  sphere, including me, are new to neither.
>
>Google is in no way new to Java, and the Android team is composed
>almost entirely by people with a long history in mobile operating
>systems, including big chunks of people from Palm/PalmSource/Access,
>Danger, Microsoft, etc.
>
>Anyway, I am not arguing about this, I am not saying the errors are
>great as they are, I was just trying to give some insight into why in
>many cases giving better errors in Android is not as simple as you
>seem to think it is.  If you don't want to believe me that this is how
>things work, well fine, but it's not really worth arguing about.
>
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HttpClient, URLConnection, settings, etc...

2008-10-10 Thread Jason Proctor

ensure that  is inside , too, not inside 
.

i've had problems using URLConnection directly - with short transfers 
i could reproducibly get "SOCKETLOG add_recv_stats 0" log error 
messages, accompanied by nothing being delivered to the Android app. 
i switched to using Socket or HttpClient, and everything worked fine. 
URLConnection should work though IMHO.




>Make sure you have the "android.permission.INTERNET" Uses Permission
>in your AndroidManifest.xml file to enable your app to access the
>internet.
>
>I don't know of any preference between HttpClient and URLConnection
>(I'd also be happy to know if one of them is preferred).
>
>There's an apps-for-android project which contains app samples created
>by Google's Android team. I haven't examined them in-depth, but I'm
>sure they have some pretty good usage examples. From just a quick
>browse, this class might be a useful reference for you:
>
>http://code.google.com/p/apps-for-android/source/browse/trunk/Translate/src/com/beust/android/translate/Translate.java
>
>Good Luck,
>Amos
>
>On Oct 9, 12:54 pm, Jasp182 <[EMAIL PROTECTED]> wrote:
>>  I have tried to call out to the web using both HttpClient and
>>  URLConnection, and I get "unknown error" in both cases at the point
>>  the call is actually made (HttpClient.execute() or
>>  URLConnection.getContent() methods).  My emulator is able to connect
>>  to the web, because I can use the Browser with no problem.  So, I'm
>>  assuming that there aren't any issues with my settings (this is being
>>  done on my home network with no proxy server).  Is there a "best
>>  practices" preference between using HttpClient or URLConnection, and
>>  are there any examples or sample apps (with source code) that make
>>  simple calls to the web?
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where does the emulator look for the SD Card Image File ?

2008-10-10 Thread guru

I have been trying to push an mp3 file for quite a while but i am
getting the error.
---
D:\android-sdk-windows-1.0_r1\tools>mksdcard 1024M sdcard.img

D:\android-sdk-windows-1.0_r1\tools>adb push D:/android-sdk-
windows-1.0_r1/tools/anirudh.mp3 /sdcard
530 KB/s (0 bytes in 4031977.007s)

D:\android-sdk-windows-1.0_r1\tools>adb push D:/android-sdk-
windows-1.0_r1/tools/anirudh.mp3 \sdcard
failed to copy 'D:/android-sdk-windows-1.0_r1/tools/anirudh.mp3' to
'\sdcard': Read-only file system

---

When i see in the emulator,I dont see the file i have pushed.Thanks
for your help.

Thanks
Guru


On Sep 24, 2:50 pm, Sudha <[EMAIL PROTECTED]> wrote:
> in addition to the above mail
>
> I tried  to pull out the default image coming the camera
> folder( apperas in the pictures in the emulator) and tried to push teh
> same back to /sdcar/dcim/camera.
> now also teh image appreas liek red block and blank screen when
> selected..
>
> Nothing is happening with the 1.0

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting GPS Strength ?

2008-10-10 Thread taleb akra

seyeysyesyes> Date: Thu, 9 Oct 2008 15:07:09 -0700> Subject: 
[android-developers] Re: Getting GPS Strength ?> From: [EMAIL PROTECTED]> To: 
android-developers@googlegroups.com> > > Great :) Thats what I've been 
searching for.> > So did you find a constant for 'satellites' ?> > On 2 Okt., 
06:12, Ludwig <[EMAIL PROTECTED]> wrote:> > The onStatusChanged() method for 
the LocationListener interface has a Bundle> > as a third parameter. From the 
LocationManager documentation:> >> > "The extras Bundle for the GPS location 
provider can contain the following> > key/value pairs:> >> >- satellites - 
the number of satellites used to derive the fix"> >> > That is AFAIK the only 
hook into more details from the GPS receiver, which> > is not much and for any 
real purposes pretty useless. And it is optional, so> > you cannot rely on it.> 
>> > Furthermore, I have no idea on how to get the Emulator provide any> > 
information of this sort. Pushing in a GPX file with DDMS gives me two calls> > 
to onStatusChanged: one at the beginning when no GPS information is> > 
available (the flag tells me that the GPS is temporarily unavailable), then> > 
when I start playing the GPX file it tells me it is available. But there is> > 
nothing in the bundle. The GPX file does not contain such information so I> > 
am not surprised. Maybe Google can tell us if there is a way to get> > 
satellite information to show in the Emulator.> >> > I can only say that the 
nicest thing to have on a physical device will be> > some access to the NMEA 
messages as only information of that detail can give> > a real idea of 
accuracy. (Just in case some GPS manufacturers are listening:> > build an 
Android enabled device, make NMEA message available over some> > Listener 
interface and hundreds of Android programmers will write all the> > software 
for you.)> >> > Ludwig> >> > 2008/10/1 Nikkelitous <[EMAIL PROTECTED]>> >> >> 
>> > > The best thing I can see is getAccuracy() in> > > 
android.location.Location.  It unfortunately doesn't return how many> > > GPS 
satellites it's seeing but is a more abstract result gathered from> > > all 
details of the connections.  This, I assume would include the> > > number of 
satellites their strength and other details.  But unless> > > theres a hidden 
API I don't think we can really get that data just> > > yet.  I'd say file it 
as a feature request but for most purposes> > > getAccuracy() should be 
sufficient.  If you're looking for specific> > > number for something else, why 
don't you post it and we'll brainstorm> > > and try to figure out a way to do 
what you want.> >> > > On Sep 28, 10:56 pm, plusminus <[EMAIL PROTECTED]> 
wrote:> > > > Hey guys,> >> > > > is there any possibility to get the 
Strength/Reliability/Quality of> > > > the current GPS-signal ?> > > > i.e. the 
number of satellites the gps-receiver is 'seeing' ?> >> > > > Best Regards,> > 
> > plusminus> >> >> 
_
Cansado de espaço para só 50 fotos? Conheça o Spaces, o site de relacionamentos 
com até 6,000 fotos!
http://www.amigosdomessenger.com.br
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HttpClient Connection Issue

2008-10-10 Thread Badri

I'm trying the following :
1)I have a service running on localhost:80
2)Iam trying to connect to the url via application and I'm trying to
display the content onto the screen .Iam not getting any content back
onto to screen ,

But while debugging using DDMS .I'm getting the following error :

I have given proper permission onto the manifest file.URL locally
works!.Any pointer on this connection refused problem.

10-10 21:33:26.195: WARN/System.err(176): java.net.ConnectException:
localhost/127.0.0.1:80 - Connection refused
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
239)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
523)
10-10 21:33:26.243: WARN/System.err(176): at
java.net.Socket.connect(Socket.java:945)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:
61)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager
$ConnectionPool.getHttpConnection(HttpConnectionManager.java:145)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager.getConnection(HttpConnectionManager.java:
67)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getHTTPConnection(HttpURLConnection.java:
800)
10-10 21:33:26.254: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:
786)
10-10 21:33:26.254: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1030)
10-10 21:33:26.254: WARN/System.err(176): at
com.badri..ConnectionHelper.connect(ConnectionHelper.java:30)
10-10 21:33:26.254: WARN/System.err(176): at
com.badri...onCreate(mtorrenta.java:30)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2103)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
10-10 21:33:26.283: INFO/jdwp(137): received file descriptor 26 from
ADB
10-10 21:33:26.297: WARN/System.err(176): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
10-10 21:33:26.297: WARN/System.err(176): at
android.os.Handler.dispatchMessage(Handler.java:88)
10-10 21:33:26.297: WARN/System.err(176): at
android.os.Looper.loop(Looper.java:123)
10-10 21:33:26.297: WARN/System.err(176): at
android.app.ActivityThread.main(ActivityThread.java:3742)
10-10 21:33:26.297: WARN/System.err(176): at
java.lang.reflect.Method.invokeNative(Native Method)
10-10 21:33:26.297: WARN/System.err(176): at
java.lang.reflect.Method.invoke(Method.java:515)
10-10 21:33:26.297: WARN/System.err(176): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
10-10 21:33:26.297: WARN/System.err(176): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
10-10 21:33:26.297: WARN/System.err(176): at
dalvik.system.NativeStart.main(Native Method)


The code snippet is as follows :


URLConnection connection=url.openConnection();
InputStream ins=connection.getInputStream();
BufferedInputStream bis = new BufferedInputStream(ins);
int current = 0;
ByteArrayBuffer bf= new ByteArrayBuffer(50);
while((current=bis.read())!= -1 )
{
bf.append((byte)current);

}

Thanks
-Badri

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] httpclient connection problem ?

2008-10-10 Thread Badri Narayanan Sugavanam
I'm trying the following :1)I have a service running on localhost:802)Iam
trying to connect to the url via application and I'm trying to display the
content onto the screen .Iam not getting any content back onto to screen ,

But while debugging using DDMS .I'm getting the following error :

I have given proper permission onto the manifest file.URL locally works!.ANy
pointer on this connection refusewd problem.

10-10 21:33:26.195: WARN/System.err(176): java.net.ConnectException:
localhost/127.0.0.1:80 - Connection refused
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:239)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:523)
10-10 21:33:26.243: WARN/System.err(176): at
java.net.Socket.connect(Socket.java:945)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:61)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager$ConnectionPool.getHttpConnection(HttpConnectionManager.java:145)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager.getConnection(HttpConnectionManager.java:67)
10-10 21:33:26.243: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getHTTPConnection(HttpURLConnection.java:800)
10-10 21:33:26.254: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:786)
10-10 21:33:26.254: WARN/System.err(176): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1030)
10-10 21:33:26.254: WARN/System.err(176): at
com.badri..ConnectionHelper.connect(ConnectionHelper.java:30)
10-10 21:33:26.254: WARN/System.err(176): at
com.badri...onCreate(mtorrenta.java:30)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2103)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2156)
10-10 21:33:26.254: WARN/System.err(176): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
10-10 21:33:26.283: INFO/jdwp(137): received file descriptor 26 from ADB
10-10 21:33:26.297: WARN/System.err(176): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
10-10 21:33:26.297: WARN/System.err(176): at
android.os.Handler.dispatchMessage(Handler.java:88)
10-10 21:33:26.297: WARN/System.err(176): at
android.os.Looper.loop(Looper.java:123)
10-10 21:33:26.297: WARN/System.err(176): at
android.app.ActivityThread.main(ActivityThread.java:3742)
10-10 21:33:26.297: WARN/System.err(176): at
java.lang.reflect.Method.invokeNative(Native Method)
10-10 21:33:26.297: WARN/System.err(176): at
java.lang.reflect.Method.invoke(Method.java:515)
10-10 21:33:26.297: WARN/System.err(176): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
10-10 21:33:26.297: WARN/System.err(176): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
10-10 21:33:26.297: WARN/System.err(176): at
dalvik.system.NativeStart.main(Native Method)


The code snippet is as follows :


URLConnection connection=url.openConnection();
InputStream ins=connection.getInputStream();
BufferedInputStream bis = new BufferedInputStream(ins);
int current = 0;
ByteArrayBuffer bf= new ByteArrayBuffer(50);
while((current=bis.read())!= -1 )
{
bf.append((byte)current);
 }

Thanks
-Badri

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where does the emulator look for the SD Card Image File ?

2008-10-10 Thread guru

I was trying to add audio files on to the emulator.I started the
emulator with the option -sdcard D:\android-sdk-windows-1.0_r1\tools
\sdcard.img
---
D:\android-sdk-windows-1.0_r1\tools>mksdcard 1024M sdcard.img

D:\android-sdk-windows-1.0_r1\tools>adb push D:/android-sdk-
windows-1.0_r1/tools/anirudh.mp3 /sdcard
530 KB/s (0 bytes in 4031977.007s)

D:\android-sdk-windows-1.0_r1\tools>adb push D:/android-sdk-
windows-1.0_r1/tools/anirudh.mp3 \sdcard
failed to copy 'D:/android-sdk-windows-1.0_r1/tools/anirudh.mp3' to
'\sdcard': Read-only file system
---

The files were not pushed.Please could anyone help


Thanks
Guru

On Sep 24, 2:50 pm, Sudha <[EMAIL PROTECTED]> wrote:
> in addition to the above mail
>
> I tried  to pull out the default image coming the camera
> folder( apperas in the pictures in the emulator) and tried to push teh
> same back to /sdcar/dcim/camera.
> now also teh image appreas liek red block and blank screen when
> selected..
>
> Nothing is happening with the 1.0

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Chinese Android Developer Sites

2008-10-10 Thread [EMAIL PROTECTED]

Share the Android Software Development Kit and Tutorials,Tips and
Reviews.Android

visit :  http://www.android123.com  or http://www.android123.com.cn

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: polite request for better error messages

2008-10-10 Thread taleb akra

nao e presiso
 



Date: Thu, 9 Oct 2008 14:45:15 -0700From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: 
[android-developers] Re: polite request for better error messages
 Thanks for your feedback Jason...those error messages aren't meaningful 
enough. The engineers are working on improving the error messages in 
general..It would be helpful though if you can log specific package/class or 
API related error message issues in the public issue tracker...in that way it 
will be easy to keep track of.
2008/10/9 Jason Proctor <[EMAIL PROTECTED]>
i'd never have thought of that ;-)in the socket case, the actual exception 
message is as i posted.prior to me logging the exception, OSNetworkSystem logs 
"unknownsocket error -1".in the MediaPlayer.create() case, no exception is 
thrown. the methodreturns null to signify the error. however, the internal 
exception islogged in the DDMS window, and it's exactly the message i posted.in 
both cases, some piece of Android SDK knew what the problem was,and decided not 
to tell.i hope that nobody is going to argue *against* informative 
errormessages? they are a hallmark of java development - i have 
writtencountless Swing applications with not even one question posted on 
alist.opaque error messages just lead to endless list FAQs and 
delayedapplications. biggest problem with the computer industry as a wholeIMHO.


>Wrap the issue in a try catch block and log the exception.  You'll get>much 
>more detailed info.>>On Wed, Oct 8, 2008 at 4:32 PM, Jason Proctor <[EMAIL 
>PROTECTED]> wrote:  dear google, any chance of better error messages from 
>the android>>  classes? usually, the java frameworks have nice 
>developer-friendly>>  (as opposed to user-friendly) messages in exceptions 
>when things go>>  wrong. but it seems that with the android.* packages, errors 
>are>>  unexpected and the message is invariably some variation on --  
>error code -1: unknown error  -- which isn't very helpful. that's the 
>actual error message when an>>  application tries to open a socket and doesn't 
>have internet>>  permission. this led to numerous list threads etc which could 
>have>>  been avoided if the piece of code discovering the problem and>>  
>throwing the exception had included a better message. then the>>  solution 
>would have been obvious.  i'm running into another one at the moment. if 
>MediaPlayer doesn't>>  like the data it's presented with, it will throw during 
>prepare().>>  the error message i'm looking at is --  error: Prepare 
>failed: status=0x  -- which is, you guessed it, error code -1 
>again. there are numerous>>  possible error cases here, and the code which 
>threw the exception>>  knew what the problem was, so why didn't it tell us? 
>i'm going to>>  have to start another list thread on streaming http, because i 
>can't>>  tell what the problem is. i *know* prepare() failed, how about>>  
>telling me WHY??  thanks in advance.  j>>  
-->~chris>>_
Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger!
http://www.amigosdomessenger.com.br/
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: http connection

2008-10-10 Thread for android
This can help u probably...

http://developerlife.com/tutorials/?p=290

Thanks
Guru


On Thu, Oct 9, 2008 at 8:31 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Yes, evidently.
> But, its doesn't work.
> My code :
>
> DefaultHttpClient httpclient = new DefaultHttpClient();
>HttpHost targetHost = new HttpHost(My_URL);
>HttpRequest req = new BasicHttpRequest("GET", "/",
> HttpVersion.HTTP_1_1);
>
>HttpResponse response=null;
>
>//uses proxy.
>//without, no connection
>HttpHost proxy = new HttpHost(proxy,3128);
>httpclient.getParams().setParameter
>(ConnRoutePNames.DEFAULT_PROXY, proxy);
>
>//send request
>response = httpclient.execute(targetHost, req);
>
>HttpEntity entity=response.getEntity();
>//finish??
>if (entity != null)
>entity.consumeContent();
>return response;
>
> I'd like to have a 401 error, because i want a page which need
> authenticate.
> But the response gives me a HTTP 200 ok
>
> That's strange, and i' really don't know why :/
>
> If you have some idea or clue...
>
> Thanks
>
> On 8 oct, 19:43, Mark Murphy <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > hey everybody.
> >
> > > I'd like tu do aHttpconnectionto a server with this lib :
> > > org.apache.http.*;
> >
> > > But, that's very difficult to me. i'm lost in all the interface &
> > > class.
> >
> > > So, if someone can describe me the different programming step or give
> > > me some tuto or example (source), that will be nice.
> >
> > http://hc.apache.org/httpcomponents-client/examples.html
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> >
> > Android Training on the Ranch! -- Mar 16-20, 2009
> http://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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: httpclient connection problem ?

2008-10-10 Thread Jason Proctor

if you're trying to connect to a server which is running on the host 
computer, then use 10.0.2.2 as the IP address. localhost, in this 
situation, is the emulator.

hth

>I'm trying the following :
>1)I have a service running on localhost:80
>2)Iam trying to connect to the url via application and I'm trying to 
>display the content onto the screen .Iam not getting any content 
>back onto to screen ,
>
>But while debugging using DDMS .I'm getting the following error :
>
>I have given proper permission onto the manifest file.URL locally 
>works!.ANy pointer on this connection refusewd problem.
>
>10-10 21:33:26.195: WARN/System.err(176): java.net.ConnectException: 
>localhost/127.0.0.1:80 - Connection refused


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How can I launch the default Contact Application provided in SDK with my app

2008-10-10 Thread Abraham

HI All,

I'm a newbie with Android.

I would like to understand how I could launch the default Listview of
contacts(similar to the behavior that you would observe on launching
the contacts app from the main menu).

Is this possible or do I have to create a similar activity in my
application which resembles the Contacts 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using Street View within my app

2008-10-10 Thread mscwd01

Its unfortunate they chose to leave out several major aspects within
the current sdk...

May have to reverse engineer Googles street view app then ;)

On Oct 10, 12:51 pm, Peli <[EMAIL PROTECTED]> wrote:
> Unfortunately, I don't think there is an API for this in the current
> system...
>
> Peli
>
> On Oct 10, 12:06 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > Am I able to embed a streetview within my app, like you would with a
> > mapview?
>
> > On Oct 8, 3:54 pm, Peli <[EMAIL PROTECTED]> wrote:
>
> > > You could call the VIEW intent on a streetview URI 
> > > (seehttp://www.openintents.org/en/node/63) to display the streetview from
> > > your application.
>
> > > Would this be sufficient for your purposes?
>
> > > Peli
>
> > > On Oct 8, 2:08 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > > > Is there no way to get a panoramic image of a given set of
> > > > coordinates? There must be!
> > > > Any help?
>
> > > > On Oct 6, 3:04 pm,mscwd01<[EMAIL PROTECTED]> wrote:
>
> > > > > Hey,
>
> > > > > Is there a simple way to get aStreetViewof a given set of
> > > > > coordinates (plus heading i.e. direction camera is pointng) and
> > > > > display it as an image within my application?
>
> > > > > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: polite request for better error messages

2008-10-10 Thread hackbod

On Oct 10, 11:56 am, Jason Proctor <[EMAIL PROTECTED]> wrote:
> Android permissions are enforced in the Linux kernel? really? i'm
> interested as to how this is done, is there any info up anywhere?

Yes, all security is enforced at the kernel and hardware level, via
process isolation, uid isolation, etc.  More info can be found here:
http://code.google.com/android/devel/security.html

A good thing to keep in mind is Android is not a "Java framework for
mobile phones," it is a "Linux-based operating system for mobile
phones, which uses Java as its programming language."

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpClient Connection Issue

2008-10-10 Thread Bill Zimmerly

Badri,

Can you see what the server is getting from Android? Is the "service"
a HTTP
web server? (It would seem so since you're using the HTTP default port
80.)

If it is, your code snippet doesn't look to me like it is formatting a
proper "GET"
request to send to the server.

- Bill

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using getDrawingCache() with MapView

2008-10-10 Thread sandroid

Hello,
  I want to use getDrawingCache() to get a Bitmap from MapView,
but I'm not sure where or when to call the routine.  In my ViewGroup
there is a dispatchDraw(Canvas) routine, but it seems to me like I
want to call getDrawingCache() after or during the MapView draw()
routine.

Does anybody know much about getDrawingCache()?  I cannot find a good
example online or in the ApiDemos.  Ideally I would like to be able to
do this for any View.

-Marc

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Comunication Server->Phone: SMS directed to an application (0.9 SDK)

2008-10-10 Thread Jonathan Herriott

Bump.  This needs to be addressed.

On Aug 29, 10:31 am, Cristina <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I am actually using the http client library in order to comunicate
> from my app to the server.
> The problem is that I want also the server to send some kind of
> "events" to the phone..so I need also to open a comunication from the
> central server to the phone... In this case, the phone will act as a
> server receiving the events...
>
> That is why I was thinking about sending the events from the central
> server using SMS...but if I cannot avoid others to receive those SMS,
> this option is not valid either... Gtalk was the other option, but
> there is not GTalk in 0.9..
>
> I do not want either to use polling (the phone asking the server for
> events from time to time)
>
> Any other option? wappush? sending SMS to a port associated to the app
> like in J2ME?
>
> On 28 ago, 20:16, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
>
>
>
> > 2008/8/26 Cristina <[EMAIL PROTECTED]>
>
> > > Hi!
>
> > > We are designing an application for android phones. In our application
> > > there is a central server, and this server must send some application
> > > information to the phone.
> > > So, we thought to use SMS in order to communicate with our application
> > > in the phone.
> > > Our application will look for messages with a particular prefix and
> > > consume it. Other applications (including messagig applications)
> > > should not get the application SMS messages.
>
> > > In order to do that, we have implemeted a Sms BroadcastReceiver, that
> > > get all SMS messages, but only processed the ones with the application
> > > prefix. After processing them, we do an abortBroadcast(), in order to
> > > stop the broadcast of the message to the Messaging application or
> > > other applications receiving the same intent.
>
> > > However, SMS Inbox is receiving the message, and is showing the
> > > message in the notification application.
>
> > > 1.  Is there any way for an application to receive the SMS message,
> > > avoiding the rest of applications to receive it? Is abortBroadcast
> > > working for SMS broadcast intents? I understand that maybe the
> > > abortBroadcast is not working for SMS broadcast intents, because of
> > > security reasons (for example we could abort the broadcast of all SMS
> > > messages ). Is there another way for an application to to receive SMS
> > > messages in an "exclusive" way (the rest of applications do not
> > > receive it)?
>
> > I don't think you can alter the behavior of inbuilt apps, Messaging(SMS) is
> > an inbuilt app, so you cannot
> > do anything, it will receive SMS and show the notification.
>
> > > 2. Is there any other way to communicate information from a external
> > > server to the application in the phone?
>
> > > For example, In other projects with other phones we have  used
> > > transparent wappush to implement that communication..Does android
> > > support wappush protocol?
>
> > > We would not like to implement an always open connection in the phone
> > > application (where the phone acts like a server), because that implies
> > > that we must have a list with all the IPs of the phones in order to
> > > communicate with them..that complicates a lot the  implementation...
>
> > You can use the inbuilt apache http client library in Android to communicate
> > with your server 
> > app..http://code.google.com/android/reference/org/apache/http/client/packa...
>
> > > Any other idea?- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Pass SmsMessage from broadcastreceiver to activity

2008-10-10 Thread Premier

Hello,
like in subject, in my BroadcastReceiver class, i've some data (sms
list received), and i want to show it in a new activity.
How i have to pass data to activity?

Regards.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Automatic "word wrap" for views?

2008-10-10 Thread Nikkelitous

Yeah, was worried about that.  I just hate the idea of putting the UI
into the code.  I guess I'll have to create multiple UI views and hope
that other hardware devices are similar in screen layout.

Thanks.

On Oct 10, 12:49 pm, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
> I'm sorry, I should have paid attention to "but is there any
> easy/automatic way to do this?" part of your post.
> I don't know of such a layout. You'll probably need to handle the
> orientation change.
>
> Cheers
>
> On Fri, Oct 10, 2008 at 8:31 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>
> > That lets me put them next to each other and above one another but
> > doesn't answer my question at all.  I would like to them to
> > automatically fill the screen not just in width, but automatically
> > making new rows when they are too wide to be usable on one row.
>
> > On Oct 10, 11:22 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
> >>http://code.google.com/android/reference/android/widget/TableLayout.html
>
> >> On Fri, Oct 10, 2008 at 8:08 PM, Nikkelitous <[EMAIL PROTECTED]> wrote:
>
> >> > Is there any way to automatically wrap widgets within a view? I'd like
> >> > a display with a series of number buttons.  I'd like to have them show
> >> > up as 4 rows on a portrait screen (As on a telephone) and 2 rows in
> >> > Landscape (6 per row).  Now, I'm not set on these two options, and I
> >> > guess I could make 2 separate views depending on orientation but is
> >> > there any easy/automatic way to do this?
>
> >> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Emulator Orientation Change on Mac

2008-10-10 Thread Anm

>From the emulator keyboard command docs:
  Switch to previous layout orientation (for example, portrait,
landscape)  KEYPAD_7, F11
  Switch to next layout orientation (for example, portrait, landscape)
KEYPAD_9, F12

These don't seem to work on a Mac.  Normally the F11 and F12 keys are
already mapped to expose and dashboard, but even if you turn those
off, it just beeps at you.  While I can test the resulting
orientations from the command line arguments, it's looking like I have
no way to test change of orientation via the emulator.

Can anyone verify that is 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: webView.loadUrl question

2008-10-10 Thread gke

I had the same problem and fixed it when I realized that the  must be
placed above the  tag.

Geir

On Sep 4, 12:14 pm, RPO <[EMAIL PROTECTED]> wrote:
> I have the same problem with the new version (0.9) of the SDK.  The
> following code:
>
> package com.good.atg.browserSample;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.webkit.WebView;
>
> public class BrowserSample extends Activity {WebViewbrowser;
>
> public void onCreate(Bundle icicle)
> /* Called when the activity is first created. */
> {
> super.onCreate(icicle);
> setContentView(R.layout.main);
> browser=(WebView)findViewById(R.id.webkit);
> browser.loadUrl("http://www.google.com";);
>
> }
> }
>
> produces the "Web page not available" message.  And yes, I added
>     
> to my AndroidManifest.xml file.  I am running on a Windows system, not
> a Mac, by the way.
>
> Robert O'Hara
>
> On Aug 21, 6:36 am, "Guillion Didier" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi,
>
> > IswebView.loadUrlis supposed to work on a real URL like 
> > "http://www.google.com"; or can only access to local files?
>
> > This provide a "Web page unvailable" error on my Mac.
>
> > If yes, Is this can be related to the fact I use a proxy ?
>
> > Best regards
>
> > --
> > Didier Guillion - Myriad
> > Web site:http://www.myriad-online.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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android FreeTTS server interfacing, a speech solution for your projects

2008-10-10 Thread Alvaro Rivas
Hi,

Due to many question about a interfacing with FreeTTS or speech generation,
I decided to open source a part of my ADC I project. It is intended to be
used for all of you who wants to get a text to speech system in yours
developments.

Android-freeTTS reads from a Free TTS server a file that can be executed in
the android application in order to get speech.

Code has been ported to 1.0 Android SDK. I put a sample "hello word" in
order to see the results of a speech generation.

Many bugs can be found, but the idea is to give you a basic speech
generation in order to be included in your developments in others ADC's

Projects are Eclipse projects, maybe you must add JDK System library in your
projects.

A documentation file is supplied. Please read the howto section. (IP address
and other things must be configured before you use this).

Hope it helps you, if not, sorry!..

http://sourceforge.net/projects/freettsandroidi/

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using getDrawingCache() with MapView

2008-10-10 Thread Romain Guy

getDrawingCache() will work only if you either enable the drawing
cache on the View or call buildDrawingCache() first. If you do this
manually make sure to disable/destroy the drawing cache when you are
done. Otherwise, every time the view is invalidated, it will have to
update the drawing cache. This is bad for Views that invalidate often,
like MapView.

Because the drawing cache API is a bit difficult to use properly, I
recommend you instead simply create your own Bitmap, create a Canvas
for that Bitmap and then call view.draw(canvas).

On Fri, Oct 10, 2008 at 2:13 PM, sandroid <[EMAIL PROTECTED]> wrote:
>
> Hello,
>  I want to use getDrawingCache() to get a Bitmap from MapView,
> but I'm not sure where or when to call the routine.  In my ViewGroup
> there is a dispatchDraw(Canvas) routine, but it seems to me like I
> want to call getDrawingCache() after or during the MapView draw()
> routine.
>
> Does anybody know much about getDrawingCache()?  I cannot find a good
> example online or in the ApiDemos.  Ideally I would like to be able to
> do this for any View.
>
> -Marc
>
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Emulator Orientation Change on Mac

2008-10-10 Thread Andrew Stadler

First, boilerplate answer, you can use

  $ emulator -help-keys

to get an up-to-date list of hotkeys in the emulator.

You didn't mention if you're on a laptop or mac desktop.  I know that
the keyboards are somewhat different.  I can only answer for laptops
because I'm using my laptop right now to test this.

One solution is to press "fn" and type "7".  This works because on a
macbook, there is a virtual numeric keypad (you can see a small set of
numbers, 0..9, on the keys).

The other solution is to type ctrl-F11.  This was put in to provide an
option for mac laptop users.

Hope these help.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Dynamic Overlay

2008-10-10 Thread indiabolbol.com

How do I update a map dynamically either as the user moves the map.

I tried to use the below code but the map does not display the data
from server

protected class SitesOverlay extends ItemizedOverlay {
private List items = new ArrayList();
private Drawable marker = null;

public SitesOverlay(Drawable marker) {
super(marker);
this.marker = marker;
populateFriends();

}

@Override
protected OverlayItem createItem(int i) {
return (items.get(i));
}

public synchronized void populateFriends() {

// get it from server
items = //Getting data from server here

super.populate();
}

@Override
public void draw(Canvas canvas, MapView mapView, boolean 
shadow) {
super.draw(canvas, mapView, shadow);
boundCenterBottom(marker);
}

@Override
protected boolean onTap(int i) {
showDialog(i);
return (true);
}

@Override
public int size() {
return (items.size());

}
}

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REQUEST: Android Eclipse plugin option to define compiling and packaging arguments

2008-10-10 Thread Adriano Crestani

Sure, only this option should work for me...but I might be required to
set another special argument, we never know :)

Adriano Crestani

On Oct 10, 1:06 am, "Stoyan Damov" <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 10, 2008 at 9:46 AM, Adriano Crestani
>
> <[EMAIL PROTECTED]> wrote:
>
> > Hi Google Android Developers,
>
> > I'd like to request a new version of Android Eclipse plugin which
> > contains an option to define the compiling and packaging arguments.
>
> > I really need to define an argument for the dex converter, but I can
> > only do it on command line or via ant script. So, I'm not being able
> > to compile it on my Eclipse environment.
>
> > In my case I need to define the "--core-library" argument.
>
> et tu? :) I'll be fine if there's just that option, I can live w/o the
> ability to pass params to dex.
>
>
>
> > Thanks in advance,
> > Adriano Crestani
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] New Android emulator skin for T-Mobile G1

2008-10-10 Thread Jeffrey Sharkey

The default emulator skin is getting very old after almost a year of
staring at it. :) About a week ago, T-Mobile released an interesting
Flash-based G1 emulator. It’s cute, but you can’t install your apps on
it.

So earlier today I created a new emulator skin using the background
from that Flash player. Just copy the G1 folder into your tools/lib/
images/skins/ folder and launch using the command line below. This
simple scenery change can really help boost motivation:

http://www.jsharkey.org/blog/2008/10/10/leveraging-the-android-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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---