[android-developers] Re: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-28 Thread hc

How do u add tools directory to PATH? Was that automatic in Eclipse,
and I broke that somehow?

On Apr 28, 1:56 pm, André Charles Legendre 
wrote:
> I got similar problems with SDK on Linux. I solved it by adding tools
> directory in PATH.
>
> Regards
>
> Andre
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AudioRecord can't get any notification when record/marker position updated

2009-04-28 Thread Steven_T

thanks it works

On Apr 28, 5:38 am, Dave Sparks  wrote:
> OK, so it sounds like audio is being produced by the kernel driver.
>
> I just looked at your code, and I think you need to call read() once
> to pass in your first input buffer.
>
> On Apr 24, 6:04 pm, Steven_T  wrote:
>
> > hi Dave Sparks:
> > thank you for reply!
>
> > I didn't disable audio input in avd
> > what you means is use option "-audio " to set an audio input
>
> > I had used the next code test audio input
> > //
> > 
> > Intent intent = new Intent
> > (MediaStore.Audio.Media.RECORD_SOUND_ACTION);
> > startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
> > /
> > =
> > it can recording and saved audio as a file named "recording47845.3gpp"
> > in sdcard
>
> > the next is logcat out put:
> > ===
> > tag: AudioHardware
> > Message: AudioStreamInGeneric::read(0x40715b40, 320) from fd 7
>
> > tag:AudioFlinger
> > Message: AudioRecordThread: buffer overflow
>
> > tag: InputMangerServic
> > Message: Starting input on non-focused client
> > com.android.internal.view.iinputmethodclient$stub$pr...@4360c470
> > (uid=100118 pid=764)
> > 
>
> > Please help me, thanks!
>
> > On Apr 25, 4:44 am, Dave Sparks  wrote:
>
> > > Did you enable audio input in the emulator?
>
> > > On Apr 23, 6:48 pm, Steven_T  wrote:
>
> > > > hi Dave Sparks:
> > > >    I have changed 50 frames to 400 frmaes, it doesn't work.
> > > >    then I set bufferSizeInBytes to 100 to init AudioRecord object,
> > > > and set update period to 400,
> > > >    it dosn't work too. I had used logcat to watch emulator'log, didn't
> > > > find this program pid throwed error,
> > > >    Can you give me sample?
> > > >    thanks
>
> > > > On Apr 24, 1:10 am, Dave Sparks  wrote:
>
> > > > > I suspect the problem is the interval you chose: 50 frames @ 8KHz is
> > > > > 6.25 msecs. Your app is not going to be able to handle a callback
> > > > > every 6.25 msecs. Try something more reasonable like 50 msecs (400
> > > > > frames) and see if that works.
>
> > > > > On Apr 23, 1:56 am, Steven_T  wrote:
>
> > > > > > hello everyone,
> > > > > > I would like to use the new AudioRecord class to record in PCM 
> > > > > > format.
> > > > > > Create class and setRecordPositionUpdateListener to it, then start
> > > > > > recording, I can't get any notification from system forever,why?(I
> > > > > > didn't get any error when running)
>
> > > > > > please help me, thanks.
>
> > > > > > the next is my code.
>
> > > > > > public class Recorder {
> > > > > >         private static final int AUDIO_SAMPLE_FREQ = 8000;
> > > > > >         private static final int AUDIO_BUFFER_SIZE = 20;
>
> > > > > >         private AudioRecord recorder;
>
> > > > > >         public Recorder()
> > > > > >         {
> > > > > >                 try
> > > > > >                 {
> > > > > >                         // init recorder
> > > > > >                         recorder = new 
> > > > > > AudioRecord(MediaRecorder.AudioSource.MIC,
> > > > > >                                         AUDIO_SAMPLE_FREQ,
> > > > > >                                         
> > > > > > AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > > > >                                         
> > > > > > AudioFormat.ENCODING_PCM_16BIT,
> > > > > >                                         AUDIO_BUFFER_SIZE);
> > > > > >                 }
> > > > > >                 catch (IllegalArgumentException e)
> > > > > >                 {
> > > > > >                        e.printStackTrace();
> > > > > >                 }
>
> > > > > >                 
> > > > > > recorder.setRecordPositionUpdateListener(mNotification);
> > > > > >                 recorder.setPositionNotificationPeriod(50);
> > > > > >                 
> > > > > > recorder.setNotificationMarkerPosition(AUDIO_SAMPLE_FREQ);
> > > > > >         }
>
> > > > > >         public OnRecordPositionUpdateListener mNotification = new
> > > > > >                 OnRecordPositionUpdateListener(){
> > > > > >                 public void onMarkerReached(AudioRecord arg0) {
> > > > > >                         // read PCM buffer here
> > > > > >                         byte[] audioBuffer = new 
> > > > > > byte[AUDIO_SAMPLE_FREQ];
> > > > > >                         arg0.read(audioBuffer, 0, 
> > > > > > AUDIO_SAMPLE_FREQ);
> > > > > >                 }
>
> > > > > >                 public void onPeriodicNotification(AudioRecord 
> > > > > > arg0) {
> > > > > >                         // read PCM buffer here
> > > > > >                         byte[] audioBuffer = new 
> > > > > > byte[AUDIO_SAMPLE_FREQ];
> > > > > >                         arg0.read(audioBuffer, 0, 
> > > > > > AUDIO_SAMPLE_FREQ);
> > > > > >             

[android-developers] Re: AudioRecord can't get any notification when record/marker position updated

2009-04-28 Thread Steven_T

thanks it works

On Apr 28, 5:38 am, Dave Sparks  wrote:
> OK, so it sounds like audio is being produced by the kernel driver.
>
> I just looked at your code, and I think you need to call read() once
> to pass in your first input buffer.
>
> On Apr 24, 6:04 pm, Steven_T  wrote:
>
> > hi Dave Sparks:
> > thank you for reply!
>
> > I didn't disable audio input in avd
> > what you means is use option "-audio " to set an audio input
>
> > I had used the next code test audio input
> > //
> > 
> > Intent intent = new Intent
> > (MediaStore.Audio.Media.RECORD_SOUND_ACTION);
> > startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
> > /
> > =
> > it can recording and saved audio as a file named "recording47845.3gpp"
> > in sdcard
>
> > the next is logcat out put:
> > ===
> > tag: AudioHardware
> > Message: AudioStreamInGeneric::read(0x40715b40, 320) from fd 7
>
> > tag:AudioFlinger
> > Message: AudioRecordThread: buffer overflow
>
> > tag: InputMangerServic
> > Message: Starting input on non-focused client
> > com.android.internal.view.iinputmethodclient$stub$pr...@4360c470
> > (uid=100118 pid=764)
> > 
>
> > Please help me, thanks!
>
> > On Apr 25, 4:44 am, Dave Sparks  wrote:
>
> > > Did you enable audio input in the emulator?
>
> > > On Apr 23, 6:48 pm, Steven_T  wrote:
>
> > > > hi Dave Sparks:
> > > >    I have changed 50 frames to 400 frmaes, it doesn't work.
> > > >    then I set bufferSizeInBytes to 100 to init AudioRecord object,
> > > > and set update period to 400,
> > > >    it dosn't work too. I had used logcat to watch emulator'log, didn't
> > > > find this program pid throwed error,
> > > >    Can you give me sample?
> > > >    thanks
>
> > > > On Apr 24, 1:10 am, Dave Sparks  wrote:
>
> > > > > I suspect the problem is the interval you chose: 50 frames @ 8KHz is
> > > > > 6.25 msecs. Your app is not going to be able to handle a callback
> > > > > every 6.25 msecs. Try something more reasonable like 50 msecs (400
> > > > > frames) and see if that works.
>
> > > > > On Apr 23, 1:56 am, Steven_T  wrote:
>
> > > > > > hello everyone,
> > > > > > I would like to use the new AudioRecord class to record in PCM 
> > > > > > format.
> > > > > > Create class and setRecordPositionUpdateListener to it, then start
> > > > > > recording, I can't get any notification from system forever,why?(I
> > > > > > didn't get any error when running)
>
> > > > > > please help me, thanks.
>
> > > > > > the next is my code.
>
> > > > > > public class Recorder {
> > > > > >         private static final int AUDIO_SAMPLE_FREQ = 8000;
> > > > > >         private static final int AUDIO_BUFFER_SIZE = 20;
>
> > > > > >         private AudioRecord recorder;
>
> > > > > >         public Recorder()
> > > > > >         {
> > > > > >                 try
> > > > > >                 {
> > > > > >                         // init recorder
> > > > > >                         recorder = new 
> > > > > > AudioRecord(MediaRecorder.AudioSource.MIC,
> > > > > >                                         AUDIO_SAMPLE_FREQ,
> > > > > >                                         
> > > > > > AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > > > >                                         
> > > > > > AudioFormat.ENCODING_PCM_16BIT,
> > > > > >                                         AUDIO_BUFFER_SIZE);
> > > > > >                 }
> > > > > >                 catch (IllegalArgumentException e)
> > > > > >                 {
> > > > > >                        e.printStackTrace();
> > > > > >                 }
>
> > > > > >                 
> > > > > > recorder.setRecordPositionUpdateListener(mNotification);
> > > > > >                 recorder.setPositionNotificationPeriod(50);
> > > > > >                 
> > > > > > recorder.setNotificationMarkerPosition(AUDIO_SAMPLE_FREQ);
> > > > > >         }
>
> > > > > >         public OnRecordPositionUpdateListener mNotification = new
> > > > > >                 OnRecordPositionUpdateListener(){
> > > > > >                 public void onMarkerReached(AudioRecord arg0) {
> > > > > >                         // read PCM buffer here
> > > > > >                         byte[] audioBuffer = new 
> > > > > > byte[AUDIO_SAMPLE_FREQ];
> > > > > >                         arg0.read(audioBuffer, 0, 
> > > > > > AUDIO_SAMPLE_FREQ);
> > > > > >                 }
>
> > > > > >                 public void onPeriodicNotification(AudioRecord 
> > > > > > arg0) {
> > > > > >                         // read PCM buffer here
> > > > > >                         byte[] audioBuffer = new 
> > > > > > byte[AUDIO_SAMPLE_FREQ];
> > > > > >                         arg0.read(audioBuffer, 0, 
> > > > > > AUDIO_SAMPLE_FREQ);
> > > > > >             

[android-developers] Re: SW (2D API) vs. HW (openGL) rendering

2009-04-28 Thread MrChaz

The easiest way would be to put to display the frames per second or
seconds per frame.
I'm pretty sure one of the Gl samples displays a counter like that.

On Apr 27, 9:51 pm, mcmc  wrote:
> I'm trying to compare the difference in speed between software and
> hardware graphics rendering, but I'm a little confused...
>
> Can someone please give me a starter?
>
> I have 2 apps right now - one written with only java/android 2D APIs,
> and one written with openGL calls...
>
> Thanks a bunch.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: xattr for yaffs2 to use SELinux on Android

2009-04-28 Thread Jun'ichi Hirayama
Hi Yuichi

I think this topics should disscussed  other ML
,android-platform,android-framework,android-porting,and android-discuss.

I recomend you post this message to these ML.

BR Jun'ichi

On Mon, Apr 27, 2009 at 9:32 AM, Yuichi  wrote:

>
> Hi.
>
> To port SELinux to Android on emulator,
> we are working xattr support for yaffs2.
>
> We have primitive code for xattr for yaffs2, as shown at the last of
> this message.
> xattr is implemented as hidden files like reiserfs.
> For example, selinux's xattr for a file is stored in following file.
> ...xattr//security.selinux
>
> I think there are many limitations and bugs,
> so I want to improve this patch.
> Do you have any comments, suggestions?
> Or, anyone working for better implementation?
>
> Following is a patch, it is based on yaffs2 in Android qemu kernel.
> http://www.aleph1.co.uk/lurker/message/20090424.003253.a5e3c4ac.en.html
>
> Regards,
> --
> Yuichi Nakamura
> Hitachi Software Engineering Co., Ltd.
> SELinux Policy Editor: http://seedit.sourceforge.net
>
> >
>


-- 
BR
Jun'ichi

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



[android-developers] How To Load Previous Activity Which Is Running In Background

2009-04-28 Thread Reghu

Hello,

Is there any way to load previous activity which is running in
background.

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



[android-developers] Is there any way to start a new activity from a service.

2009-04-28 Thread Reghu

Hi,

Is there any way to start a new activity from a service.

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



[android-developers] END CALL Api

2009-04-28 Thread Rain

HI,

   Does anyone could end up connected phone call by api not to click
the end call button?


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



[android-developers] Re: SW (2D API) vs. HW (openGL) rendering

2009-04-28 Thread Alistair.

Take a look at SpriteMethodTest here

http://code.google.com/p/apps-for-android/

Al.

On Apr 27, 9:51 pm, mcmc  wrote:
> I'm trying to compare the difference in speed between software and
> hardware graphics rendering, but I'm a little confused...
>
> Can someone please give me a starter?
>
> I have 2 apps right now - one written with only java/android 2D APIs,
> and one written with openGL calls...
>
> Thanks a bunch.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Unable to call SOAP webservice using KSOAP2

2009-04-28 Thread Saravanan.K

Hi All,


Please help me. Am trying to call a .net webservice from android I
have done the emualtor proxy settings and am able to access the
internet on the emulator  but when i try to access the wsdl file
from my android program am unable to do it... please help me

Here is the code which am using to call the webservice


The wsdl just returns HelloWorld string with out accepting any input
parameters.



class WebServiceClient implements Runnable
{
private static final String SOAP_ACTION = "http://tempuri.org/
HelloWorld";
private static final String METHOD_NAME = "HelloWorld";
private static final String NAMESPACE = "http://microsoft.com/
webservices/";
private static final String URL = "http://xxx.com/
WebService/Service.asmx";

public void run() {
// TODO Auto-generated method stub

Log.i("RUN METHOD","Inside the run method");
connect();

Log.i("RUN METHOD","End of run method");

}

public void connect()
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

Log.i("CONNECT METHOD","Inside the connect method");

SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;

Log.i("CONNECT METHOD","Inside the connect method 2");


envelope.setOutputSoapObject(request);

Log.i("CONNECT METHOD","Inside the connect method 3");

HttpTransportSE androidHttpTransport = new HttpTransportSE
(URL);


Log.i("CONNECT METHOD","Inside the connect method 4");

try {

Log.i("CONNECT METHOD","Inside the connect method 5");

androidHttpTransport.call(SOAP_ACTION, envelope);
Log.i("CONNECT METHOD","Inside the connect method
55");
SoapObject resultsRequestSOAP = (SoapObject)
envelope.bodyIn;
Log.i("CONNECT METHOD","Inside the connect method
56");
   // Vector  = (Vector)
resultsRequestSOAP.getProperty("[Data element name]");



Log.i("CONNECT METHOD","Inside the connect method
6");

Object result = envelope.getResponse();
} catch(Exception E) {
Log.i("ERROR IS",E.toString());
}




}

}



I get an error in this line

androidHttpTransport.call(SOAP_ACTION, envelope);

I have also added the following attributes to the AndroidManifest.xml
file





I always get the  following error.

request time failed: java.net.SocketTimeoutException: The operation
timed out


While trying to access the wsdl file with the xml rpc client i was
able to connect to the wsdl file using the following lines

client = new DefaultHttpClient();

HttpHost proxy = new HttpHost("proxyname",port number,"http");


client.getParams().setParameter
(ConnRoutePNames.DEFAULT_PROXY, proxy);



is there any similar proxy settings for the above code which i have
posted. Please help i have been struggling for almost 3 weeks
now.












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



[android-developers] Re: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-28 Thread André Charles Legendre

Hi hc

Under Unix to add tools directory to PATH you can do it in
.bash_profile of your user :
PATH=$PATH:/tools
export PATH

where xxx is the PATH of where you put the SDK

Andre

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



[android-developers] Cant access paid apps in US

2009-04-28 Thread John Doe

Hi all

I have an unlocked G1 bought it from ebay.I am currently in US and my
phone is using ATNT in roaming mode. However I cant access paid apps.
Is it because my account is set up from another country ?

Thanks



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



[android-developers] Plugin 0.9 ADT with Eclipse (G4.3.2) on WIN XP SP3 problem

2009-04-28 Thread EvgenyV

Hi all!

I've updated from 1.1 to 1.5 following 
http://developer.android.com/sdk/1.5_r1/upgrading.html

0.9 ADT plugin was succesfully installed. The Android plugin doesn't
present in Window -> Preferences options.
So I can't perform step "Update your Eclipse SDK Preferences".

Using fully updated Eclipse Ganymede 3.4.2

Any ideas?

Thanks in advance,
Evgeny


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



[android-developers] Re: Application Not Responding (ANR) dialog

2009-04-28 Thread Mike Hearn

You can't adjust the timeout. If the ANR dialog gets in the way when
your app is suspended during a breakpoint, that's probably a bug in
the Android SDK framework. If it "pops up" generically when your
program is running normally and you just want it to go away, you can't
do that - you have to make your app more responsive.

On Apr 28, 7:24 am, Meryl Silverburgh 
wrote:
> In the follow blog, it talks about Application Not Responding (ANR) dialog
>
> http://developer.android.com/guide/practices/design/responsiveness.html
>
> Can you please tell me where in the code which pop up this Application
> Not Responding (ANR) dialog? Or how can I adjust the timer for this
> dialog so that it won't pop up during debugging?
>
> Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Handler for map panning

2009-04-28 Thread jgostylo

Ok, I just tried to Override onDraw() in the MapView and it is a final
method so I can't do that.  Then I saw onAnimationEnd() as inherited
from View so I decided to Override that.  I set a break point and pan
around the map but the method never gets executed.

I am still looking for a solution.  The MapController does not appear
to have anything I could use to do this.

On Apr 27, 8:29 pm, jgostylo  wrote:
> I have searched this group extensively and have not found the answer
> to my issue.
>
> I have a lot of server data being loaded into overlays and I want to
> create the overlays as the user pans.  Ideally it would wait for the
> user to stop panning before it started loading the data.
>
> What is the best practices procedure for determining if the map has
> changed location or zoom level?  I was looking for something along the
> lines of onLocationChanged() for MapView or onPan() but I have not
> seen anything like that.
>
> Do I just need to set up my own parameters and Override onDraw() in
> the MapView and in that method run tests to see if the map has
> changed?  This idea seems like overkill and would lead to overzealous
> server hits.
>
> Anyone have a better idea?
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ActivityInfo is null in Intrumentation class

2009-04-28 Thread a...@lg

@Override
public void onStart() {
super.onStart();
_intent = new Intent(Intent.ACTION_MAIN);
_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
_intent = _intent.setClass(getTargetContext(), ClassUnderTest.class);
ActivityInfo ai = _intent.resolveActivityInfo(getTargetContext
().getPackageManager(), 0);
if (ai != null) {
   ClassUnderTest activity = (ClassUnderTest)
startActivitySync(_intent);
}
}


This a part of my code in my Instrumentation class. Earlier, i got a
run time Exception,Quote:
java.lang.RuntimeException: Unable to resolve activity for: Intent
{ flags=0x1000 comp={com.android.test.ui/
com.android.test.ui.ClassUnderTest} }.

Later on, i checked the activity info which is always null. How to set
the ActivityInfo..? What is required to update in the code?

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



[android-developers] Re: Android Market - Status "Saved Draft"

2009-04-28 Thread Pascal Merle

Yes, the two are checked. Anything else you can think of?

Thanks,
Pascal


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



[android-developers] Re: Playing sound from memory

2009-04-28 Thread niko20

Hi, You can use the AudioTrack class to stream raw PCM data.


On Apr 27, 7:50 pm, rookie1_1998  wrote:
> I need a way to play a short sound clip repeatedly very fast, with
> precise timing for musical purpose.  I looked around, and it seems
> like MediaPlayer and SoundPool don't guarantee lag-free playing.  Is
> there anyway I could load the sound to memory myself and play from
> memory (edit the stream)?
>
> I know in Java I can do something with ByteArrayInputStream but so far
> I couldn't find any way to do this in Android...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Not able to play video from the network URL

2009-04-28 Thread Amit Panwar

Hi,

I am not able to play the video streaming example from the samples
provided in Android SDK for any video URL:

ex: 
http://d.peperonity.com/c/d/4E76D7/12563/ssc3/home/062/akram.ak47/albums/dog_smoke.3gp

The issue comes at the time of executing the prepare() method:

and throws the following exeption:


04-28 16:17:13.973: ERROR/VideoPlayer(821): error: Prepare failed.:
status=0xFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821): java.io.IOException:
Prepare failed.: status=0xFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.media.MediaPlayer.prepare(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming.playVideo
(VideoStreaming.java:232)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming.access$0
(VideoStreaming.java:197)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming$1.onClick
(VideoStreaming.java:117)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.performClick(View.java:2129)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.onTouchEvent(View.java:3543)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.dispatchTouchEvent(View.java:3198)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1089)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.app.Activity.dispatchTouchEvent(Activity.java:1871)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.os.Handler.dispatchMessage(Handler.java:88)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.os.Looper.loop(Looper.java:123)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.app.ActivityThread.main(ActivityThread.java:3739)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
java.lang.reflect.Method.invokeNative(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
java.lang.reflect.Method.invoke(Method.java:515)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
dalvik.system.NativeStart.main(Native Method)


Please help me to resolve the issue. If someone else has the same with
it.

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



[android-developers] Re: What is the correct way to refresh UI when I use android:configChanges="keyboardHidden|orientation"

2009-04-28 Thread quakeboy

You might want to take a look at setRequestedOrientation if u want
to ..

On Apr 24, 1:53 pm, Wang He  wrote:
> Hi all
>
> when I use android:configChanges="keyboardHidden|orientation" in my
> code, the activity will not destroy and recreate when I change from
> portrait to landscape, only onConfigurationChanged(newConfig) will be
> called by framework.
>
> The issue is:
> My UI cannot refresh by default, what is the correct way in
> onConfigurationChanged() to refresh my UI?
>
> BTW, my UI is write with mylayout.xml and added to my Widget by addView
> (inflator(mylayout.xml),null).
>
> Thanks in advance!!
> BRs
> Wang He
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ActivityInfo is null in Intrumentation class

2009-04-28 Thread Omer Saatcioglu
did you add the intents to AndroidManifest.xml?

On Tue, Apr 28, 2009 at 2:05 PM, a...@lg  wrote:

>
> @Override
>public void onStart() {
>super.onStart();
> _intent = new Intent(Intent.ACTION_MAIN);
> _intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> _intent = _intent.setClass(getTargetContext(), ClassUnderTest.class);
> ActivityInfo ai = _intent.resolveActivityInfo(getTargetContext
> ().getPackageManager(), 0);
>if (ai != null) {
>   ClassUnderTest activity = (ClassUnderTest)
> startActivitySync(_intent);
>}
> }
>
>
> This a part of my code in my Instrumentation class. Earlier, i got a
> run time Exception,Quote:
> java.lang.RuntimeException: Unable to resolve activity for: Intent
> { flags=0x1000 comp={com.android.test.ui/
> com.android.test.ui.ClassUnderTest} }.
>
> Later on, i checked the activity info which is always null. How to set
> the ActivityInfo..? What is required to update in the code?
>
> >
>


-- 
Omer

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



[android-developers] Re: TabHost launching Intent multiple times

2009-04-28 Thread Brian

I got the same behavior with the Tabs2 APIDemo source, which doesn't
use Intents, but rather a TabContentFactory.

Until the app gets an onDestroy, it seems to add new instances into
the call stack, instead of reactivating the current one.  After it
gets an onDestroy, future launches work fine.
So:
1. Launch app, hit home, launch app, hit home, launch app, hit home,
launch app.
2. Now start hitting the back button.  For as many times as you
launched the app, hitting the back button will display an old app
instead of exiting.
3. Continue hitting back button until the app gets an onDestroy()
(should 4 times in the example above)
3. Repeat from 1. Notice the change of behavior.  At 2, a single back
button will exit the app

Is there some bit that needs to be flipped after a launch?  Is this
just an emulator thing?

Thanks.

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



[android-developers] Re: MediaPlayer.start() doesnot work fine after calling MediaPlayer.seekTo(0)

2009-04-28 Thread Sudha

Hi,

for now i have found a work around

In onCompletionListener() am resetting the player and setting
DataSource and then calling prepare() then start() so that no sounds
are skipped.

mp.setOnCompletionListener(new
MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp)
{
try
{
mp.reset();
FileInputStream fIn = 
Utils.getContext().openFileInput(res);
if (fIn != null)
{
mp.setDataSource(fIn.getFD());
fIn.close();
}

isPlayingSound = false;
}
catch(Exception e){e.printStackTrace();}
}
});


But this way I am getting the below error but still the sounds are
being played, (i didn't observe any sound to be skipped).

 IllegalStateException: setDataSource() called in state 2

I dont know why am getting this exception coz as per below link call
to setDataSource() can be followed by reset(), Can anybody please
clarify this exception.

As per 
http://developer.android.com/reference/android/media/MediaPlayer.html#Valid_and_Invalid_States

I suppose We can also try:
mp.stop()
mp.prepare()
mp.seekTo(0)
mp.start()

i will try the above case, but want the answer to the
IllegalStateException..


On Apr 28, 8:03 am, niko20  wrote:
> Sorry you are right, I meant you have to pause. Worth a try anyway..
>
> On Apr 27, 4:19 pm, Dave Sparks  wrote:
>
> > Try this:
>
> > mp.prepare();
> > mp.seekTo(0);
> > mp.start();
>
> > And get rid of your onPreparedListener. It is unnecessary since you
> > are calling prepare().
>
> > On Apr 27, 1:20 am, Sudha  wrote:
>
> > > Hi,
>
> > > I have a requirement to play several sounds many times in my game so
> > > instead of creating the MediaPlayer again and again I have called
> > > mp.seekTo(0) in onCompletion(mp) so that it will restart.
> > > Sometimes the sound is not audible from the device when I call mp.start
> > > () after setting mp.seekTo(0); but the player calls onCompletion()
> > > without playing any sound, this is observed randomly on most of the
> > > sounds
>
> > > FYI:
>
> > >   -  My sounds are of short duration mostly less than a second.
> > >   -  I am using a separate MediaPlayer for each sound (as I need this)
> > >   -  There are almost 28 sounds in my game so i will be creating 28
> > > MediaPlayers.
> > >   -  Below is the attached code for player
>
> > > Also If I try to play many sounds one after the other in a short
> > > period of time i get an error saying "no more track names available".
> > > can u tell Why this is happening...?
>
> > > check the below code:
>
> > > public boolean isPlayingSound; //class member
> > > MediaPlayer mp = null;
> > > String last_req = "";
> > > public void playSound(final String res) {
> > >         if (isPlayingSound){
> > >                 return;
> > >         }
> > >         try {
>
> > >                 if (last_req.equals(res))
> > >                 {
> > >                         System.out.println("starting 
> > > again: "+res); //
> > > Sudhaker
> > >                         mp.start();
> > >                         isPlayingSound = true;
> > >                         return;
> > >                 }
> > >                 last_req = res;
> > >                 mp = new MediaPlayer();
>
> > >                 FileInputStream fIn = 
> > > Utils.getContext().openFileInput(res);
> > >                 if (fIn != null)
> > >                 {
> > >                         //we tell the mediaplayer which file he needs to 
> > > play. notice we
> > > don't tell him if this is a MIDI, WAV, MP3 or even AVI for that
> > > matter.
> > >                         //why? he is smart enough to recognize them!! we 
> > > don't even have to
> > > use valid extensions like say .mid, .mp3, .wav!!! ... WOAH!! =D
> > >                         mp.setDataSource(fIn.getFD());
> > >                         fIn.close();
> > >                 }
>
> > >                 mp.setOnPreparedListener(new
> > >                 MediaPlayer.OnPreparedListener() {
> > >                         public void onPrepared(MediaPlayer mp)
> > >                         {
> > >                                 mp.start();
> > >                                 isPlayingSound = true;
> > >                         }
> > >                 });
>
> > >                 mp.setOnCompletionListener(new
> > >                 MediaPlayer.OnCompletionListener() {
> > >                         public void onCompletion(MediaPlayer mp)
> > >                         {
> > >                                 System.out.println("sound playing 
> > > finished : "+res + " and seek to
> > > start"); //Sudhaker
> > >                                 //mp.release();
> > >                                 mp.seekTo(0);
> > >                                 isPl

[android-developers] Re: Webview Question: onCreate always get called when activity comes to foreground

2009-04-28 Thread Brian

Wow reading this first would have saved me a many, many hours.

It's not just WebView apps, but can be as simple as Hello,World.  I
had a pretty complex app with intents in a tabhost that I thought was
the problem, whittled down to a simple tabhost app with Intents, down
to a tabhost with a view factory, whittled down to just hello world.

What I found was my app launch from eclipse would get onCreate, and
the usual flow.  Hitting the home key, then relaunching the app from
the android emulator launcher, would result in another onCreate call.
Repeat this pattern (home key, launch app), and when you get tired,
start hitting the back button in your app.
The prior app instances are shown instead of the launcher.
Until -- your app gets an onDelete(). Now it's ok.  Now when you tap
the icon from the launcher (onCreate), hit home, and hit the app icon
again, another onCreate is not sent -- it's working as normal --
hitting back button gets you to the launcher
>From now on, it works fine.  Subsequent launches are from the
launcher, and all is good.

Here's all you need to repro the problem: this code, eclipse, and the
plugin.
Build from eclipse, run it from eclipse, app launches.  Hit home, hit
the app icon, hit home, hit app icon.  Now hit the back button.
- expected is that you would exit back to the launcher
- what you get is a prior instance (I guess) of your app

public class MyTest extends Activity {
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.my_content);
  System.out.println("onCreate");
}



On Apr 9, 1:20 pm, UBZack  wrote:
> Hi Mark, thank you very much for your reply.
>
> I have some more findings to report!  Turns out it's not just
> launching it from Eclipse that causes this behavior, but also
> downloading the apk from the Android web browser, installing it, and
> tapping the launch button.
>
> I set up a basic hello world app, uploaded it to my site, downloaded
> it on my G1, installed it, hit the Launch button after it said the
> install was successful, and it opened the app, showing the root
> activity.  I then hit the Home button, and re-opened the app.  It
> opened and showed the root activity, but then I hit the back button,
> and it showed the same root activity that was previously instantiated
> when it first launched.
>
> I have not tried this with downloading an app from the Android Market,
> but I would say that this is a bug in Android that should be fixed,
> specifically in its package installer, or perhaps just in launching an
> app in general right after installing it.  Anyway, thank you again for
> your contributions, and if you have anything else to add to my
> observations I'd be more than glad to hear it!
>
> Best,
> Zack
>
> On Apr 8, 6:44 pm, Mark Murphy  wrote:
>
> > UBZack wrote:
> > > I did a little poking around and I think I can DEFINITELY shine some
> > > light on this.
>
> > > Basically, I think the difference lies in the way Eclipse ports the
> > > apk to theemulatorand launches it.
>
> > 
>
> > > It seems that eclipse ports the app to theemulatorin such a way that
> > > each successive launch that is made while the app is running pushes
> > > another instance of the app onto the stack, unless you hit the back
> > > button before relaunching.
>
> > I don't use Eclipse. If I understand correctly, from this post and
> > others, is that when you run the application from Eclipse, you are taken
> > right to the initialactivityof that application, bypassing the home
> > screen and launcher.
>
> > In that case, what may be happening is that Eclipse tells theemulator
> > to launch the rootactivity...and specifies FLAG_ACTIVITY_NEW_TASK and
> >  FLAG_ACTIVITY_MULTIPLE_TASK on the launching Intent. That would provide
> > the behavior you're experiencing, if I understand correctly.
>
> > > Any light that you guys can shine on this would help a lot, and well
> > > done on providing very helpful examples and suggestions
>
> > Clearly, Eclipse is part of a broader Hulu-led initiative to "turn our
> > chunky brain matter into creamy goo". ;-)
>
> > > Mark, you've been quite a legend on this forum!
>
> > Legend? I hope not. Legends are frequently rather dead.
>
> > But, thanks!
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Making VideoView play automatically

2009-04-28 Thread l hx
now i found a matter in my device,but the emulation is ok. that is, when  i
use the movieview in camera to play video ,but when i come back to another
activity in my app. the orientation of the screen is also transverse. who
know why?

On Sat, Apr 25, 2009 at 4:32 PM, Nithin Varamballi wrote:

>
> Try this code... This code woks for me..
>
> package mypack.mydemos;
>
> import android.app.Activity;
> import android.graphics.PixelFormat;
> import android.os.Bundle;
> import android.widget.MediaController;
> import android.widget.VideoView;
>
> public class demo extends Activity {
>/** Called when the activity is first created. */
>private VideoView myVideo,myVideo1;
>private MediaController mc,mc1;
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>getWindow().setFormat(PixelFormat.TRANSLUCENT);
>setContentView(R.layout.main);
>
>myVideo1=(VideoView)findViewById(R.id.video);
>myVideo1.setVideoPath("/sdcard/nithin.mp4");
>myVideo1.start();
>mc1=new MediaController(this);
>mc1.setMediaPlayer(myVideo1);
>myVideo1.setMediaController(mc1);
>//mc.show(RESULT_OK);
>myVideo1.requestFocus();
>}
> }
>
> Thsnk You
> Nithin N V
>
> >
>

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



[android-developers] Re: Handler for map panning

2009-04-28 Thread jgostylo

I am getting the panning recognition to work by overriding
dispatchTouchEvent for MapView.  I think I will just have to separate
out the tasks and do the same thing for the zoom control

On Apr 28, 6:03 am, jgostylo  wrote:
> Ok, I just tried to Override onDraw() in the MapView and it is a final
> method so I can't do that.  Then I saw onAnimationEnd() as inherited
> from View so I decided to Override that.  I set a break point and pan
> around the map but the method never gets executed.
>
> I am still looking for a solution.  The MapController does not appear
> to have anything I could use to do this.
>
> On Apr 27, 8:29 pm, jgostylo  wrote:
>
> > I have searched this group extensively and have not found the answer
> > to my issue.
>
> > I have a lot of server data being loaded into overlays and I want to
> > create the overlays as the user pans.  Ideally it would wait for the
> > user to stop panning before it started loading the data.
>
> > What is the best practices procedure for determining if the map has
> > changed location or zoom level?  I was looking for something along the
> > lines of onLocationChanged() for MapView or onPan() but I have not
> > seen anything like that.
>
> > Do I just need to set up my own parameters and Override onDraw() in
> > the MapView and in that method run tests to see if the map has
> > changed?  This idea seems like overkill and would lead to overzealous
> > server hits.
>
> > Anyone have a better idea?
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer.start() doesnot work fine after calling MediaPlayer.seekTo(0)

2009-04-28 Thread Sudha

Oops I tried the below code:

mp.setOnCompletionListener(new
MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp)
{
mp.stop();
isPlayingSound = false;
}
});

then when the same sound is requested again called

mp.prepare();
mp.seekTo(0);
mp.start();

Even in this way most of the sounds are not played and am getting an
exception for prepare

E/MidiFile(   31): EAS_Prepare failed: [-31]
W/System.err( 4133): java.io.IOException: Prepare failed.:
status=0xFFFD
W/System.err( 4133):at android.media.MediaPlayer.prepare(Native
Method)

and the most important is my game's FPS dropped to the least and the
device is shedding its sweat to run the game. :(

Is there a simple way to play the sounds smoothly (i mean repeat the
sounds without creating them again & again or resetting it every
time...?)

coz if i reset am getting the IlleagalStateException even though the
setDataSource is called right after reset()...?

I cannot upgrade the SDK to 1.5 in the current situation but will try
the new SDK from my next project.

Can you please suggest me what to do in the current situation with SDK
1.1?


On Apr 28, 5:10 pm, Sudha  wrote:
> Hi,
>
> for now i have found a work around
>
> In onCompletionListener() am resetting the player and setting
> DataSource and then calling prepare() then start() so that no sounds
> are skipped.
>
> mp.setOnCompletionListener(new
> MediaPlayer.OnCompletionListener() {
>         public void onCompletion(MediaPlayer mp)
>         {
>                 try
>                 {
>                         mp.reset();
>                         FileInputStream fIn = 
> Utils.getContext().openFileInput(res);
>                         if (fIn != null)
>                         {
>                                 mp.setDataSource(fIn.getFD());
>                                 fIn.close();
>                         }
>
>                         isPlayingSound = false;
>                 }
>                 catch(Exception e){e.printStackTrace();}
>         }
>
> });
>
> But this way I am getting the below error but still the sounds are
> being played, (i didn't observe any sound to be skipped).
>
>          IllegalStateException: setDataSource() called in state 2
>
> I dont know why am getting this exception coz as per below link call
> to setDataSource() can be followed by reset(), Can anybody please
> clarify this exception.
>
> As perhttp://developer.android.com/reference/android/media/MediaPlayer.html...
>
> I suppose We can also try:
> mp.stop()
> mp.prepare()
> mp.seekTo(0)
> mp.start()
>
> i will try the above case, but want the answer to the
> IllegalStateException..
>
> On Apr 28, 8:03 am, niko20  wrote:
>
> > Sorry you are right, I meant you have to pause. Worth a try anyway..
>
> > On Apr 27, 4:19 pm, Dave Sparks  wrote:
>
> > > Try this:
>
> > > mp.prepare();
> > > mp.seekTo(0);
> > > mp.start();
>
> > > And get rid of your onPreparedListener. It is unnecessary since you
> > > are calling prepare().
>
> > > On Apr 27, 1:20 am, Sudha  wrote:
>
> > > > Hi,
>
> > > > I have a requirement to play several sounds many times in my game so
> > > > instead of creating the MediaPlayer again and again I have called
> > > > mp.seekTo(0) in onCompletion(mp) so that it will restart.
> > > > Sometimes the sound is not audible from the device when I call mp.start
> > > > () after setting mp.seekTo(0); but the player calls onCompletion()
> > > > without playing any sound, this is observed randomly on most of the
> > > > sounds
>
> > > > FYI:
>
> > > >   -  My sounds are of short duration mostly less than a second.
> > > >   -  I am using a separate MediaPlayer for each sound (as I need this)
> > > >   -  There are almost 28 sounds in my game so i will be creating 28
> > > > MediaPlayers.
> > > >   -  Below is the attached code for player
>
> > > > Also If I try to play many sounds one after the other in a short
> > > > period of time i get an error saying "no more track names available".
> > > > can u tell Why this is happening...?
>
> > > > check the below code:
>
> > > > public boolean isPlayingSound; //class member
> > > > MediaPlayer mp = null;
> > > > String last_req = "";
> > > > public void playSound(final String res) {
> > > >         if (isPlayingSound){
> > > >                 return;
> > > >         }
> > > >         try {
>
> > > >                 if (last_req.equals(res))
> > > >                 {
> > > >                         System.out.println("starting 
> > > > again: "+res); //
> > > > Sudhaker
> > > >                         mp.start();
> > > >                         isPlayingSound = true;
> > > >                         return;
> > > >                 }
> > > >                 last_req = res;
> > > >                 mp = new MediaPlayer();
>
> > > >                 FileInputStream fIn = 
> > > > Utils.getContext().openFileInput(res);
> > > >                 if (fIn != null)
>

[android-developers] sdk 1.5 digital keyboard

2009-04-28 Thread Mr.No

Hello,
how i can get a reference to the digital keyboard?
is the keyboard added to the activity?
how i can set a other style to the keyboard?


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



[android-developers] Re: Android Market - Status "Saved Draft"

2009-04-28 Thread Mariano Kamp
Did you check the two check boxes at the bottom?
See screenshot.

On Tue, Apr 28, 2009 at 8:31 AM, Pascal Merle wrote:

>
> Yesterday I uploaded two apps to the market, "Ambient Light Sensor"
> and later "Sipdroid".
>
> While editing they already showed in the list as "Saved Draft" but
> after clicking "Publish - Save" they still remain with that status,
> and they don't show up in the market itself. I can't browse or
> download them.
>
> Is there anything I missed in the UI or do apps need some time to get
> online?
> >
>

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

<>

[android-developers] cupcake 1.5 r1 surfaceCreated is not called!!!

2009-04-28 Thread ad

I've created game,
everything works fine on all previous android versions except current
cupcake 1.5.
It works even on cupcake pre release.I'm using exact the same
build.xml, sources and resources.
The problem is that surfaceCreated is not called :
SurfaceHolder mSurfaceHolder = getHolder();
mSurfaceHolder.addCallback(this);
setFocusable(true);

waitForScreen(); - here I untill surfaceCreated change variable 
that
it's ready,but it's never called.
I just can explain that I'm running SurfaceView activity after
stopping regular View activity (for the game menu - it was easier to
create it).

 Please help me if you can figure out something. I'm just a developer
not a Android engine tester. If they are putting such stuff to the
market they should test it a little bit (not talking about discovered
VM crashes instead of exceptions).

AA


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



[android-developers] Re: Android Market - Status "Saved Draft"

2009-04-28 Thread Pascal Merle

The solution is easy:
There are two buttons "Publish" and "Save". If you click "Save" it
will be saved as a draft. If you click "Publish" it gets published.
Easy, isn't it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout question - how to replicate what the iPhone does...

2009-04-28 Thread Anna PS

Thank you Jon, this is exactly what I needed!

best wishes,
Anna

On Apr 28, 5:43 am, Jon Colverson  wrote:
> On Apr 27, 10:01 pm, Anna PS  wrote:
>
> > How would I even start to create a home screen that looks like this in
> > Android? Essentially I need clickable areas with text and icons.
> > Buttons can't have images attached, nor can they be greyed out.
>
> Yes, they can have images: use the drawableLeft etc. attributes, or
> setCompoundDrawables() method. They can also be grayed out by using
> setEnabled().
>
> --
> Jon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Application doesnot quit on calling finish()

2009-04-28 Thread Sudha

Hi,

I have been developing a game on Android and wrote a wrapper for J2ME
classes,

When notifyDestroyed() is called in my ME program and calling finish()
but the application doesn't close correctly.

The App goes to background and when launched again it shows an error
message and presents an option to "force close" the App, if i force
close it and launch again, the app launches fine but again the same
has to be repeated upon every launch..

Can you please explain why the App is not being erased from memory
when finish() is called.\

when i check the log i found no exceptions when closing but when
launched again it throws a null pointer exception.

for now to work around I placed "System.exit(0)" after calling finish
() so that the app is exited abruptly, but am waiting for a valid
answer on whats going on behind...?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] 1.5 SDK problems

2009-04-28 Thread EvgenyV

Hi all!

I just want to make sure that is not only my personal experience that
the latest SDK 1.5.
Looks like 1. 5 is causing couple of serious upgrade, installation and
runtime issues.

Should we wait for some quick local patch soon?

Thanks,
Evgeny



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



[android-developers] Re: build JNI C code fail ???

2009-04-28 Thread Keroro

Thank you, have been solution.

On 4月27日, 下午11時19分, Michael MacDonald 
wrote:
> Keroro wrote:
>
> You need to supply variable names for all your function parameters, not
> just jinit j.
>
>
>
> > Whybuilderror?
>
> >buildand Error Message:
> > ../mydroid$ make libmax
> > target thumbC: libmax <= development/max/max.c
> > development/max/max.c: In function 'Java_testdll_set':
> > development/max/max.c:7: error: parameter name omitted
> > development/max/max.c:7: error: parameter name omitted
> > make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
> > libmax_intermediates/max.o] Error 1
>
> >codeas follows:
>
> > max.c
> > ===
> > #include 
> > JNIEXPORT void JNICALL Java_testdll_set (JNIEnv *, jclass, jint);
>
> >  int i = 0;
>
> > JNIEXPORT void JNICALL Java_testdll_set (JNIEnv *, jclass, jint
> > j)
> >   {
> >i = j;
> >   }
> > ===
>
> > Android.mk
> > 
> > LOCAL_PATH:= $(call my-dir)
>
> > include $(CLEAR_VARS)
>
> > LOCAL_SRC_FILES:= \
>
> > max.c
>
> > LOCAL_C_INCLUDES := \
>
> > $(JNI_H_INCLUDE)
>
> > LOCAL_SHARED_LIBRARIES := \
>
> > libutils
>
> > LOCAL_PRELINK_MODULE := false
>
> > LOCAL_MODULE := libmax
>
> > include $(BUILD_SHARED_LIBRARY)
> > ==- 隱藏被引用文字 -
>
> - 顯示被引用文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Jean-Baptiste Queru

finish() doesn't close your application, is just closes your activity.
The Appliction object itself stays behind, as well, as the entire
process, as long as there's memory available to keep them around, so
that re-launching your app is faster then next time around.

JBQ

On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>
> Hi,
>
> I have been developing a game on Android and wrote a wrapper for J2ME
> classes,
>
> When notifyDestroyed() is called in my ME program and calling finish()
> but the application doesn't close correctly.
>
> The App goes to background and when launched again it shows an error
> message and presents an option to "force close" the App, if i force
> close it and launch again, the app launches fine but again the same
> has to be repeated upon every launch..
>
> Can you please explain why the App is not being erased from memory
> when finish() is called.\
>
> when i check the log i found no exceptions when closing but when
> launched again it throws a null pointer exception.
>
> for now to work around I placed "System.exit(0)" after calling finish
> () so that the app is exited abruptly, but am waiting for a valid
> answer on whats going on behind...?
> >
>



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

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

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



[android-developers] Re: Webview Question: onCreate always get called when activity comes to foreground

2009-04-28 Thread Brian

A quick workaround for this in Eclipse, is to set your application's
Run Configuration's Launch Action to "Do Nothing".  Now when you press
the play icon to launch, it seems to just push the apk to the emulator
and not launch it.
Then you go in and click your app icon, and launch/relaunch behavior
is as expected.

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



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Sudha

So can you please just brief me on where to concentrate and what all
should be done while closing an app so that it is entirely erased from
the memory when exited...?

On Apr 28, 5:51 pm, Jean-Baptiste Queru  wrote:
> finish() doesn't close your application, is just closes your activity.
> The Appliction object itself stays behind, as well, as the entire
> process, as long as there's memory available to keep them around, so
> that re-launching your app is faster then next time around.
>
> JBQ
>
>
>
> On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>
> > Hi,
>
> > I have been developing a game on Android and wrote a wrapper for J2ME
> > classes,
>
> > When notifyDestroyed() is called in my ME program and calling finish()
> > but the application doesn't close correctly.
>
> > The App goes to background and when launched again it shows an error
> > message and presents an option to "force close" the App, if i force
> > close it and launch again, the app launches fine but again the same
> > has to be repeated upon every launch..
>
> > Can you please explain why the App is not being erased from memory
> > when finish() is called.\
>
> > when i check the log i found no exceptions when closing but when
> > launched again it throws a null pointer exception.
>
> > for now to work around I placed "System.exit(0)" after calling finish
> > () so that the app is exited abruptly, but am waiting for a valid
> > answer on whats going on behind...?
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Streets Of Boston

Probably System.exit().

But why would you want to do that? Why not leave it up the the OS to
kill your process when necessary?
Your activities should be able to handle the Android life-cycle
process correctly (onCreate, onResume, onPause, onDestroy, etc).


On Apr 28, 8:56 am, Sudha  wrote:
> So can you please just brief me on where to concentrate and what all
> should be done while closing an app so that it is entirely erased from
> the memory when exited...?
>
> On Apr 28, 5:51 pm, Jean-Baptiste Queru  wrote:
>
>
>
> > finish() doesn't close your application, is just closes your activity.
> > The Appliction object itself stays behind, as well, as the entire
> > process, as long as there's memory available to keep them around, so
> > that re-launching your app is faster then next time around.
>
> > JBQ
>
> > On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>
> > > Hi,
>
> > > I have been developing a game on Android and wrote a wrapper for J2ME
> > > classes,
>
> > > When notifyDestroyed() is called in my ME program and calling finish()
> > > but the application doesn't close correctly.
>
> > > The App goes to background and when launched again it shows an error
> > > message and presents an option to "force close" the App, if i force
> > > close it and launch again, the app launches fine but again the same
> > > has to be repeated upon every launch..
>
> > > Can you please explain why the App is not being erased from memory
> > > when finish() is called.\
>
> > > when i check the log i found no exceptions when closing but when
> > > launched again it throws a null pointer exception.
>
> > > for now to work around I placed "System.exit(0)" after calling finish
> > > () so that the app is exited abruptly, but am waiting for a valid
> > > answer on whats going on behind...?
>
> > --
> > Jean-Baptiste M. "JBQ" Queru
> > Android Engineer, Google.
>
> > Questions sent directly to me that have no reason for being private
> > will likely get ignored or forwarded to a public forum with no further
> > warning.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Jean-Baptiste Queru

This is not the way Android works.

JBQ

On Tue, Apr 28, 2009 at 5:56 AM, Sudha  wrote:
>
> So can you please just brief me on where to concentrate and what all
> should be done while closing an app so that it is entirely erased from
> the memory when exited...?
>
> On Apr 28, 5:51 pm, Jean-Baptiste Queru  wrote:
>> finish() doesn't close your application, is just closes your activity.
>> The Appliction object itself stays behind, as well, as the entire
>> process, as long as there's memory available to keep them around, so
>> that re-launching your app is faster then next time around.
>>
>> JBQ
>>
>>
>>
>> On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>>
>> > Hi,
>>
>> > I have been developing a game on Android and wrote a wrapper for J2ME
>> > classes,
>>
>> > When notifyDestroyed() is called in my ME program and calling finish()
>> > but the application doesn't close correctly.
>>
>> > The App goes to background and when launched again it shows an error
>> > message and presents an option to "force close" the App, if i force
>> > close it and launch again, the app launches fine but again the same
>> > has to be repeated upon every launch..
>>
>> > Can you please explain why the App is not being erased from memory
>> > when finish() is called.\
>>
>> > when i check the log i found no exceptions when closing but when
>> > launched again it throws a null pointer exception.
>>
>> > for now to work around I placed "System.exit(0)" after calling finish
>> > () so that the app is exited abruptly, but am waiting for a valid
>> > answer on whats going on behind...?
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Android Engineer, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
> >
>



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

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

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



[android-developers] Re: java.lang.StackOverflowError when deserializing

2009-04-28 Thread Marco Schmitz

dear fadden,

thanks a lot for "Thread(ThreadGroup group, Runnable target, String
name, long stackSize)".

this works perfectly :)

greetings,
darolla

2009/4/22 fadden :
>
> On Apr 21, 2:17 am, DaRolla  wrote:
>> In order to work with a server object (that uses Castor un/
>> marshalling) I do it like I always do. Same routines. Well, this time
>> the file is only 172kb (my routines works pretty well with 2,4mb
>> files) but the interlacing is quite deep. So it all starts with a
>> class containing 2 ArrayLists. I tried de/serializing just
>> ArrayList and this works very well. But the XML file (which is
>> unmarshalled with Castor and serialized in JDK) has 7000 lines. So I
>> get this StackOverflowError.
>
> Android's default stack size is 8KB.  This gets you 60-100 stack
> frames, depending on how complex your methods are.
>
> You can either:
>
> (a) use something that doesn't recurse as deeply
> (b) do the work on a thread you create with Thread(ThreadGroup group,
> Runnable target, String name, long stackSize)
>
> You can create a thread with a much larger stack (max is 256KB), which
> should be enough for your needs.  If you need more than that, you
> should seriously consider adjusting your needs. :-)
>
> >
>

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



[android-developers] Load Previous UI From Stack

2009-04-28 Thread Reghu

Hai

Is there any way to load my previous UI from stack.

My requirement is

I click "HOME" from my current UI and now i am listening to a external
event with the help of a service.
When i get the external event i like to load my previous UI. Is there
any way.

What i did was...

Intent callerpageIntent = new Intent();
(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
callerpageIntent.setClassName("org.innovature.androidsipclient",
"org.innovature.androidsipclient.SIPCallerPage");
startActivity(callerpageIntent);

But i am not getting old or new UI on "Home Screen"

Is there any way, can any one tell me i miss some thing?

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



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Sudha

I could leave the process to OS to kill but if I want to launch it
again in no time i get exceptions as the memory allocated previously
is not being erased.

I am handling all the activities in the wrapper correctly but the
problem seems to be:

I have most of the references created and assigned to static variables

I mean all the instances of the objects are being referenced by static
variables, so might be all the variables are still hiding in the
memory even after the app has exited.

is there any other way to kill the process when finish() is called...?

On Apr 28, 6:10 pm, Jean-Baptiste Queru  wrote:
> This is not the way Android works.
>
> JBQ
>
>
>
> On Tue, Apr 28, 2009 at 5:56 AM, Sudha  wrote:
>
> > So can you please just brief me on where to concentrate and what all
> > should be done while closing an app so that it is entirely erased from
> > the memory when exited...?
>
> > On Apr 28, 5:51 pm, Jean-Baptiste Queru  wrote:
> >> finish() doesn't close your application, is just closes your activity.
> >> The Appliction object itself stays behind, as well, as the entire
> >> process, as long as there's memory available to keep them around, so
> >> that re-launching your app is faster then next time around.
>
> >> JBQ
>
> >> On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>
> >> > Hi,
>
> >> > I have been developing a game on Android and wrote a wrapper for J2ME
> >> > classes,
>
> >> > When notifyDestroyed() is called in my ME program and calling finish()
> >> > but the application doesn't close correctly.
>
> >> > The App goes to background and when launched again it shows an error
> >> > message and presents an option to "force close" the App, if i force
> >> > close it and launch again, the app launches fine but again the same
> >> > has to be repeated upon every launch..
>
> >> > Can you please explain why the App is not being erased from memory
> >> > when finish() is called.\
>
> >> > when i check the log i found no exceptions when closing but when
> >> > launched again it throws a null pointer exception.
>
> >> > for now to work around I placed "System.exit(0)" after calling finish
> >> > () so that the app is exited abruptly, but am waiting for a valid
> >> > answer on whats going on behind...?
>
> >> --
> >> Jean-Baptiste M. "JBQ" Queru
> >> Android Engineer, Google.
>
> >> Questions sent directly to me that have no reason for being private
> >> will likely get ignored or forwarded to a public forum with no further
> >> warning.
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Cupcake on ADP1

2009-04-28 Thread roland

Xavier Ducrohet wrote "I'd also like to note that Android developer
phones like the ADP1 are intended for application development, rather
than daily use. Additionally, they are operator-neutral and country-
neutral, so they may not include certain features found on end-user
devices." in the official android blog, i think if you need the other
locales, you should install them separately (if you could get the
necessary files).

On 27 avr, 19:38, ericsk  wrote:
> Hi,
>
> I've upgraded my ADP1 to cupcake through the official 
> roms:http://www.htc.com/www/support/android/adp.html#s3
>
> However, the official roms equiped ONLY Englishlocalenow.
> Will the official ADP1 roms equip other locales (e.g., Chinese) in the
> future?
>
> anybody knows? Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Plugin 0.9 ADT with Eclipse (G4.3.2) on WIN XP SP3 problem

2009-04-28 Thread heyunh...@gmail.com

1.download SDK1.5 and 0.9ADT plugin
2.updata ADT to V0.9(it need not removed 0.8ADT)
3.Install SDK(windows->Preferences OPT)
4.Select SDK Target (Android 1.5)
5.set run configurations -> Target (Select Automatic AVD.if cann't see
AVD,u need creat an AVD by manual)

It's will be fine.


On Apr 28, 6:12 pm, EvgenyV  wrote:
> Hi all!
>
> I've updated from 1.1 to 1.5 
> followinghttp://developer.android.com/sdk/1.5_r1/upgrading.html
>
> 0.9 ADT plugin was succesfully installed. The Android plugin doesn't
> present in Window -> Preferences options.
> So I can't perform step "Update your Eclipse SDK Preferences".
>
> Using fully updated Eclipse Ganymede 3.4.2
>
> Any ideas?
>
> Thanks in advance,
> Evgeny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application doesnot quit on calling finish()

2009-04-28 Thread Jean-Baptiste Queru

Write your code such that it either cleans up those static variables
or re-uses them if they've already been initialized.

There are going to be many combinations of the lifecycle of your
activity that will be similar to what you're seeing (e.g. your app
going in the background, the phone getting locked, the orientation
changing), and you'll need to deal with the problem at its root.
You're attacking a symptom without attacking the root cause.

JBQ

On Tue, Apr 28, 2009 at 6:24 AM, Sudha  wrote:
>
> I could leave the process to OS to kill but if I want to launch it
> again in no time i get exceptions as the memory allocated previously
> is not being erased.
>
> I am handling all the activities in the wrapper correctly but the
> problem seems to be:
>
> I have most of the references created and assigned to static variables
>
> I mean all the instances of the objects are being referenced by static
> variables, so might be all the variables are still hiding in the
> memory even after the app has exited.
>
> is there any other way to kill the process when finish() is called...?
>
> On Apr 28, 6:10 pm, Jean-Baptiste Queru  wrote:
>> This is not the way Android works.
>>
>> JBQ
>>
>>
>>
>> On Tue, Apr 28, 2009 at 5:56 AM, Sudha  wrote:
>>
>> > So can you please just brief me on where to concentrate and what all
>> > should be done while closing an app so that it is entirely erased from
>> > the memory when exited...?
>>
>> > On Apr 28, 5:51 pm, Jean-Baptiste Queru  wrote:
>> >> finish() doesn't close your application, is just closes your activity.
>> >> The Appliction object itself stays behind, as well, as the entire
>> >> process, as long as there's memory available to keep them around, so
>> >> that re-launching your app is faster then next time around.
>>
>> >> JBQ
>>
>> >> On Tue, Apr 28, 2009 at 5:40 AM, Sudha  wrote:
>>
>> >> > Hi,
>>
>> >> > I have been developing a game on Android and wrote a wrapper for J2ME
>> >> > classes,
>>
>> >> > When notifyDestroyed() is called in my ME program and calling finish()
>> >> > but the application doesn't close correctly.
>>
>> >> > The App goes to background and when launched again it shows an error
>> >> > message and presents an option to "force close" the App, if i force
>> >> > close it and launch again, the app launches fine but again the same
>> >> > has to be repeated upon every launch..
>>
>> >> > Can you please explain why the App is not being erased from memory
>> >> > when finish() is called.\
>>
>> >> > when i check the log i found no exceptions when closing but when
>> >> > launched again it throws a null pointer exception.
>>
>> >> > for now to work around I placed "System.exit(0)" after calling finish
>> >> > () so that the app is exited abruptly, but am waiting for a valid
>> >> > answer on whats going on behind...?
>>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Android Engineer, Google.
>>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Android Engineer, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
> >
>



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

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

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



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread yarik...@gmail.com

I have exactly same problem. Why do we have 102 values of position
when there is only 100 cells displayed on screen?
"position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
of that? Can someone from google team answer?
That seems to be a bug, very annoying bug. Answer "It's not a bug" is
not answer! How do you generate position?

On Apr 27, 9:40 pm, Illidane  wrote:
> There is a way to make GridView without Adapter ( e.g. something
> like .addView() method ) ?
>
> On 27 апр, 21:38, Illidane  wrote:
>
>
>
> > My GridView shows all 100 cells on the screen ( all visible at one
> > moment )
> > and all the animation works fine, and pretty fast ( on all 100
> > elements ),
> > but than begin problems with last cell.
> > Animation not child-view's. Each cell is a imageView with animation on
> > it.
>
> > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> > > It's not buggy. I use the adapters and grid/list-views in my apps and
> > > they work fine. I think they are not designed for your purpose.
>
> > > e.g. If your adapter has 100 elements and the grid/list-view only
> > > shows about 15 at a time on the screen, the getView is called about 15
> > > times. Sometimes more times, depending whether a little bit (a few
> > > pixels) of the top or bottom child-view become visible or not. Then,
> > > when you start scrolling, getView gets called again and again when
> > > child-views become visible and others become invisible.
>
> > > Also, seriously consider re-using the convertView for your grid- or
> > > list-view. My experience is that it can really slow down your app if
> > > you just return new View instances for each child-view/cell:
> > > public ... getView() {
> > >   View view = convertView != null ? convertView : createNewView(...);
> > >   ...
> > >   ...
> > >   return view;
>
> > > }
>
> > > The implementation of the adapter+listviews does not need to rely on
> > > the order in which the getView is called. As long as it is called for
> > > every child-view that becomes visible.
>
> > > Isn't is possible to start a child-view's (cell's) animation when you
> > > handle it the getView(...) method?
>
> > > If you really want at least 100 child-views/cells to be created (i
> > > won't recommend it... it's a LOT), you can override the Adapter's
> > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
> > > still not sure if getView would get called in the order you want.
>
> > > ...
> > >   private static int EXPECTED_CELL_COUNT = 100;
>
> > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
> > >   public int getItemViewType(int pos) { return pos %
> > > EXPECTED_CELL_COUNT; }
>
> > > On Apr 27, 1:07 pm, Illidane  wrote:
>
> > > > And you think it's not a bug? where is guarantee that it will work in
> > > > general?
> > > > Where adapter takes it's magic number N?
>
> > > > On 27 апр, 19:56, Romain Guy  wrote:
>
> > > > > There is no guarantee it's going to be called N times either.
>
> > > > > 2009/4/27 Illidane :
>
> > > > > > Even with convertView problem is still same - last cell is not
> > > > > > animating.
> > > > > > And... you said WHEN getView()... I think it's no matter, matter HOW
> > > > > > MANY times getView() called.
> > > > > > It calls more than 100 times, whats very strange.
> > > > > > For the first time it's called 102 times and all animations was
> > > > > > working. For the second and next times it was 101, and last 
> > > > > > animation
> > > > > > was static.
> > > > > > I think where is some bug regularity...
>
> > > > > > On 27 апр, 19:31, Romain Guy  wrote:
> > > > > >> You should ALWAYS reuse the convertView, oherwise you're gonna eat 
> > > > > >> up
> > > > > >> memory and just slow down your app. And like I said, there is no
> > > > > >> guarantee on how and when getView() is called so you cannot rely 
> > > > > >> on it
> > > > > >> with your anim counter.
>
> > > > > >> 2009/4/27 Illidane :
>
> > > > > >> > I dont use convertView parametr and return new child-view.
>
> > > > > >> > Each cell has an animation. In the getView I generate an array of
> > > > > >> > animations, wich I start when the adapter stops his work ( e.g. 
> > > > > >> > when
> > > > > >> > my mAnimCounter == 102 ( but need be max 100, lol ) When I run 
> > > > > >> > app,
> > > > > >> > all 100 cells are animated. But when I re-check the field as I 
> > > > > >> > need
> > > > > >> > and call mGameGrid.setAdapter(mAdapter), new animations working, 
> > > > > >> > but
> > > > > >> > last. Last cell are NOT animated. Problem can be only in getView 
> > > > > >> > and
> > > > > >> > method how it works. I very doubt that it's not a bug of 
> > > > > >> > GridView or
> > > > > >> > Adapter.
>
> > > > > >> > On 27 апр, 18:59, Streets Of Boston  
> > > > > >> > wrote:
> > > > > >> >> The child/item-views in list-views and grid-views are re-used
> > > > > >> >> (convertView input parameter). I suspect that depending on the 
> > > > > >> >> layout/
> > > > > >> >>

[android-developers] Re: Plugin 0.9 ADT with Eclipse (G4.3.2) on WIN XP SP3 problem

2009-04-28 Thread Evgeny V
On Tue, Apr 28, 2009 at 4:28 PM, heyunh...@gmail.com wrote:

>
> 1.download SDK1.5 and 0.9ADT plugin
> 2.updata ADT to V0.9(it need not removed 0.8ADT)
> 3.Install SDK(windows->Preferences OPT)
> 4.Select SDK Target (Android 1.5)
> 5.set run configurations -> Target (Select Automatic AVD.if cann't see
> AVD,u need creat an AVD by manual)
>
> It's will be fine.
>
>
> On Apr 28, 6:12 pm, EvgenyV  wrote:
> > Hi all!
> >
> > I've updated from 1.1 to 1.5 followinghttp://
> developer.android.com/sdk/1.5_r1/upgrading.html
>  >
> > 0.9 ADT plugin was succesfully installed. The Android plugin doesn't
> > present in Window -> Preferences options.
> > So I can't perform step "Update your Eclipse SDK Preferences".
> >
> > Using fully updated Eclipse Ganymede 3.4.2
> >
> > Any ideas?
> >
> > Thanks in advance,
> > Evgeny
> >
>

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



[android-developers] Re: 1.5 SDK problems

2009-04-28 Thread Andreas Frey

I think the same, working with the Google Maps API just does not work
anymore. a simple example with a MylocationOverlay does only take ONE
position via a geo fix command. All further submit positioins are
ignored.


Greetings Andy

On 28 Apr., 14:40, EvgenyV  wrote:
> Hi all!
>
> I just want to make sure that is not only my personal experience that
> the latest SDK 1.5.
> Looks like 1. 5 is causing couple of serious upgrade, installation and
> runtime issues.
>
> Should we wait for some quick local patch soon?
>
> Thanks,
> Evgeny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Plugin 0.9 ADT with Eclipse (G4.3.2) on WIN XP SP3 problem

2009-04-28 Thread Evgeny V
Thanks,

FInally I got it works now after Eclipse reinstall only.



On Tue, Apr 28, 2009 at 4:45 PM, Evgeny V  wrote:

>
>
> On Tue, Apr 28, 2009 at 4:28 PM, heyunh...@gmail.com 
> wrote:
>
>>
>> 1.download SDK1.5 and 0.9ADT plugin
>> 2.updata ADT to V0.9(it need not removed 0.8ADT)
>> 3.Install SDK(windows->Preferences OPT)
>> 4.Select SDK Target (Android 1.5)
>> 5.set run configurations -> Target (Select Automatic AVD.if cann't see
>> AVD,u need creat an AVD by manual)
>>
>> It's will be fine.
>>
>>
>> On Apr 28, 6:12 pm, EvgenyV  wrote:
>> > Hi all!
>> >
>> > I've updated from 1.1 to 1.5 followinghttp://
>> developer.android.com/sdk/1.5_r1/upgrading.html
>>  >
>> > 0.9 ADT plugin was succesfully installed. The Android plugin doesn't
>> > present in Window -> Preferences options.
>> > So I can't perform step "Update your Eclipse SDK Preferences".
>> >
>> > Using fully updated Eclipse Ganymede 3.4.2
>> >
>> > Any ideas?
>> >
>> > Thanks in advance,
>> > Evgeny
>> >>
>>
>

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



[android-developers] Bug? Geo fix and sdk 1.5

2009-04-28 Thread Andreas Frey

Hello,

I have a really simple Android Application using a MyLocationOverlay
and a LocationManager to determine and show the current position via a
Toast.

But the geo fix command i submit via telnet does only work the first
time i submit it. ALl later tries to update the position do not work.

Anybody knows this problem?
Any solutiions

This is the relevant source code:
-
..
  private void initLocationManager() {
locManager = (LocationManager) getSystemService
(Context.LOCATION_SERVICE);

locationListener = new LocationListener() {

public void onLocationChanged(Location location) {
updatePosition(location);
}
public void onProviderDisabled(String arg0) {
}
public void onProviderEnabled(String arg0) {
}
public void onStatusChanged(String arg0, int arg1, 
Bundle arg2) {
}
};

locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 
0,
0,
locationListener);
}

private void updatePosition(Location location) {
Toast t = Toast.makeText(
this,
getString(R.string.msgPosition, location.getLatitude(),
location.getLongitude()),
Toast.LENGTH_SHORT);
t.show();

theMap.getController().animateTo(
new GeoPoint(

(int)(location.getLatitude()*1E6),

(int)(location.getLongitude()*1E6)));
theMap.postInvalidate();

}
--

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



[android-developers] Re: URGENT!!!!! Can't update apps in android market!!!

2009-04-28 Thread jsdf

I was finally able to solve this, but the solution made no sense at
all.
1.) I upgraded to the ADT 0.9 SDK 1.5 (released yesterday), and used
the 1.1 target within.
2.) I changed my AndroidManifest.xml to be the following.

http://schemas.android.com/apk/res/android";
package="com.my.package" android:versionName="1.071"
android:versionCode="20">




















Note the two changes from the previous version I posted earlier in the
thread:
- All the  lines moved to the top, which I do not
think made any difference.
- The  line moved to the top of , which
finally fixed this problem.

I hope this helps others who are still having this problem.  I will
post a bug report now.
Jason


On Apr 27, 9:03 pm, aleung  wrote:
> I was using 1.1 SDK and failed to publish.
> I haven't tried 1.5 SDK yet.
>
> On Apr 27, 10:25 pm,jsdf wrote:
>
> > aleung, you are correct.  It seems the line " > android:name="com.google.android.maps" />" is preventing the
> > AndroidManifest.xml from being parsed correctly.
> > Unfortunately, I have Maps in my application and cannot simply remove
> > this line.
>
> > Were you (and others) using the 1.5 SDK package with a 1.1 target to
> > build your application?
> > Or were you using 1.1 SDK release 1 with 1.1 target to build your
> > application?
>
> > (This question is somewhat replicated 
> > here:http://groups.google.com/group/android-developers/browse_thread/threa...)
>
> > Thanks,
> > Jason
>
> > On Apr 26, 2:16 am, aleung  wrote:
>
> > > Perhaps it's because of this line:
> > > 
>
> > > The Android blog said that Google Maps API is a plugin in the 1.5 SDK.
> > > I'm now downloading the 1.5 SDK early look to have a try.
>
> > > On Apr 26, 12:05 pm,jsdf wrote:
>
> > > > Even with "1" this does not work. I still get "The server could not
> > > > process your apk. Try again."
> > > > I've pasted the relevant AndroidManifest.xml code below.  Is there
> > > > anything else that is wrong?  Perhaps use of the custom Application
> > > > (vs. the default Application) is throwing the XML parser for a loop?
> > > > (I hope not; I've been using this structure for AndroidManifest for
> > > > over a month now!)
>
> > > > 
> > > > http://schemas.android.com/apk/res/android";
> > > >         package="com.my.package" android:versionName="1.071"
> > > >         android:versionCode="20">
> > > >         
> > > >          > > > android:label="@string/
> > > > app_name"
> > > >                 android:name="com.my.package.MyApplication">
> > > >                  > > > android:label="@string/
> > > > app_name">
> > > >                         
> > > >                                  > > > android:name="android.intent.action.MAIN" />
> > > >                                  > > > android:name="android.intent.category.LAUNCHER" />
> > > >                         
> > > >                 
> > > >                 
> > > >                 
> > > >                 
> > > >                  > > > android:name="UserRouteNameActivity">
> > > >                 
> > > >                  > > > android:name="com.my.package.map.MapViewActivity"> > > > activity>
> > > >                 
> > > >         
> > > >          > > > android:name="android.permission.VIBRATE"> > > > permission>
> > > >          > > > android:name="android.permission.INTERNET"> > > > permission>
> > > > 
>
> > > > Thanks for the help!
> > > > Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Streets Of Boston

Don't rely on the order in which getView is called. It is not a bug.
It is a decision of the design of the grid/list view not to be
dependent on the order in which getView is called. Why getView with
position '0' is called three times... i don't know. *If* this is a
bug, it is only a peformance issue. Maybe it has to do with lay-out
issues (layout 'weights' are used)? Just don't rely on the order.

However, maybe you can do this instead. Below is code that does not
rely on the number of times getView is called nor the order in which
it is called:

You know that you have 100 cells. Make an array of 100 booleans as an
instance variable of your adapter or activity (e.g. boolean[] _visited
= new boolean[100]). Initially, set every element in this array to
false. When getView is called with a value of position, do this inside
of your getView method:

  ...
  ...
  _visited[position] = true;
  boolean allCellsAreShown = true;
  for (int i = 0; i < _visited.length; i++) {
if (!_visited[i]) {
  allCellsAreShown = false;
  break;
}
  }
  if (allCellsAreShown) {
... // start your animation.
  }
  ...
  ...

(you could optimize the above code a bit... but i think you'd get the
idea :=) ).


On Apr 28, 9:43 am, "yarik...@gmail.com"  wrote:
> I have exactly same problem. Why do we have 102 values of position
> when there is only 100 cells displayed on screen?
> "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> of that? Can someone from google team answer?
> That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> not answer! How do you generate position?
>
> On Apr 27, 9:40 pm, Illidane  wrote:
>
>
>
> > There is a way to make GridView without Adapter ( e.g. something
> > like .addView() method ) ?
>
> > On 27 апр, 21:38, Illidane  wrote:
>
> > > My GridView shows all 100 cells on the screen ( all visible at one
> > > moment )
> > > and all the animation works fine, and pretty fast ( on all 100
> > > elements ),
> > > but than begin problems with last cell.
> > > Animation not child-view's. Each cell is a imageView with animation on
> > > it.
>
> > > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> > > > It's not buggy. I use the adapters and grid/list-views in my apps and
> > > > they work fine. I think they are not designed for your purpose.
>
> > > > e.g. If your adapter has 100 elements and the grid/list-view only
> > > > shows about 15 at a time on the screen, the getView is called about 15
> > > > times. Sometimes more times, depending whether a little bit (a few
> > > > pixels) of the top or bottom child-view become visible or not. Then,
> > > > when you start scrolling, getView gets called again and again when
> > > > child-views become visible and others become invisible.
>
> > > > Also, seriously consider re-using the convertView for your grid- or
> > > > list-view. My experience is that it can really slow down your app if
> > > > you just return new View instances for each child-view/cell:
> > > > public ... getView() {
> > > >   View view = convertView != null ? convertView : createNewView(...);
> > > >   ...
> > > >   ...
> > > >   return view;
>
> > > > }
>
> > > > The implementation of the adapter+listviews does not need to rely on
> > > > the order in which the getView is called. As long as it is called for
> > > > every child-view that becomes visible.
>
> > > > Isn't is possible to start a child-view's (cell's) animation when you
> > > > handle it the getView(...) method?
>
> > > > If you really want at least 100 child-views/cells to be created (i
> > > > won't recommend it... it's a LOT), you can override the Adapter's
> > > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
> > > > still not sure if getView would get called in the order you want.
>
> > > > ...
> > > >   private static int EXPECTED_CELL_COUNT = 100;
>
> > > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
> > > >   public int getItemViewType(int pos) { return pos %
> > > > EXPECTED_CELL_COUNT; }
>
> > > > On Apr 27, 1:07 pm, Illidane  wrote:
>
> > > > > And you think it's not a bug? where is guarantee that it will work in
> > > > > general?
> > > > > Where adapter takes it's magic number N?
>
> > > > > On 27 апр, 19:56, Romain Guy  wrote:
>
> > > > > > There is no guarantee it's going to be called N times either.
>
> > > > > > 2009/4/27 Illidane :
>
> > > > > > > Even with convertView problem is still same - last cell is not
> > > > > > > animating.
> > > > > > > And... you said WHEN getView()... I think it's no matter, matter 
> > > > > > > HOW
> > > > > > > MANY times getView() called.
> > > > > > > It calls more than 100 times, whats very strange.
> > > > > > > For the first time it's called 102 times and all animations was
> > > > > > > working. For the second and next times it was 101, and last 
> > > > > > > animation
> > > > > > > was static.
> > > > > > > I think where is some bug regularity...
>
> > > > > > > On 27 апр, 19:31, 

[android-developers] Re: Directory to store files

2009-04-28 Thread Odessa Silverberg

Depends what you're going to save there. If it's some vital data to
the application to work (i.e. SQLite Database, Preferences, etc.) then
you have to save them in your applications directory on the phone.

If it's some downloaded files, MP3s, Videos etc. then you can save it
on the SD card. The home directory of an app is /data/data/
/ but you should use the context instead of
absolute path names.

On Apr 24, 3:40 pm, LD  wrote:
> Hello,
>
> can anybody advice what is the recommended directory to store files
> generated by your application: audio files, video files or some
> images.
>
> If the phone contains SD card, it is clear that files should be saved
> there, but if there is no any external storage. where would you
> recommend to save to?
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Help | RSS Reader Feeds | Socket Exception

2009-04-28 Thread Gaurav

Hi,

I am trying to access rss feeds :

RSSFEEDOFCHOICE = "http://rss.news.yahoo.com/rss/entertainment";;

Below is the code:

try
{
// setup the url
   URL url = new URL(urlToRssFeed);

   // create the factory
   SAXParserFactory factory = SAXParserFactory.newInstance();
   // create a parser
   SAXParser parser = factory.newSAXParser();

   // create the reader (scanner)
   XMLReader xmlreader = parser.getXMLReader();
   // instantiate our handler
   RSSHandler theRssHandler = new RSSHandler();
   // assign our handler
   xmlreader.setContentHandler(theRssHandler);
   Log.i("getFeed", "before inputsource ");
   // get our data via the url class

   //InputSource is = new InputSource(inputStream);
   InputSource is = new InputSource();
   is.setByteStream(url.openConnection().getInputStream());
   // perform the synchronous parse
   xmlreader.parse(is);
   // get the results - should be a fully populated RSSFeed
instance, or null on error
   return theRssHandler.getFeed();
}
catch (Exception ee)
{
Log.e("getFeed", "ee ==> " +ee.getMessage(),ee);

// if we have a problem, simply return null
return null;
}


below is the exception trace:

04-28 19:47:54.155: INFO/RSSReader: onCreate(854): START
04-28 19:47:54.226: INFO/RSSReader: onCreate(854): RSSFEEDOFCHOICE
http://rss.news.yahoo.com/rss/entertainment
04-28 19:47:54.235: INFO/getFeed(854): urlToRssFeed ==>
http://rss.news.yahoo.com/rss/entertainment
04-28 19:47:54.306: INFO/getFeed(854): before inputsource
04-28 19:47:54.355: ERROR/OSNetworkSystem(854): unknown socket error
-1
04-28 19:47:54.389: ERROR/getFeed(854): ee ==> unknown error
04-28 19:47:54.389: ERROR/getFeed(854): java.net.SocketException:
unknown error
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl
(Native Method)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocket
(OSNetworkSystem.java:79)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.net.PlainSocketImpl2.create
(PlainSocketImpl2.java:59)
04-28 19:47:54.389: ERROR/getFeed(854): at
java.net.Socket.checkClosedAndCreate(Socket.java:763)
04-28 19:47:54.389: ERROR/getFeed(854): at java.net.Socket.connect
(Socket.java:910)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.
(HttpConnection.java:61)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager
$ConnectionPool.getHttpConnection(HttpConnectionManager.java:145)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager.getConnection
(HttpConnectionManager.java:67)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getHTTPConnection
(HttpURLConnection.java:800)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connect
(HttpURLConnection.java:786)
04-28 19:47:54.389: ERROR/getFeed(854): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:1030)
04-28 19:47:54.389: ERROR/getFeed(854): at
com.msi.androidrss.RSSReader.getFeed(RSSReader.java:94)
04-28 19:47:54.389: ERROR/getFeed(854): at
com.msi.androidrss.RSSReader.onCreate(RSSReader.java:53)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2103)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.os.Handler.dispatchMessage(Handler.java:88)
04-28 19:47:54.389: ERROR/getFeed(854): at android.os.Looper.loop
(Looper.java:123)
04-28 19:47:54.389: ERROR/getFeed(854): at
android.app.ActivityThread.main(ActivityThread.java:3742)
04-28 19:47:54.389: ERROR/getFeed(854): at
java.lang.reflect.Method.invokeNative(Native Method)
04-28 19:47:54.389: ERROR/getFeed(854): at
java.lang.reflect.Method.invoke(Method.java:515)
04-28 19:47:54.389: ERROR/getFeed(854): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
04-28 19:47:54.389: ERROR/getFeed(854):

[android-developers] Re: Screen Orientation.

2009-04-28 Thread jrgraf...@googlemail.com

The problem for me though is that the constants returned never change
after I set a preferred Orientation no matter how I rotate the
Phone :/

On Apr 28, 4:34 am, Dianne Hackborn  wrote:
> getResources().getConfiguration().orientation contains the current
> orientation, as defined by the constants described in the java docs (NOT the
> SCREEN_ORIENTATION_* contantgs).
>
> On Mon, Apr 27, 2009 at 4:05 PM, jrgraf...@googlemail.com <
>
>
>
> jrgraf...@googlemail.com> wrote:
>
> > I cant seem to get current orientation via either:
>
> > getResources().getConfiguration().orientation
> > or
> > (WindowManager) getSystemService(WINDOW_SERVICE).getDefaultDisplay
> > ().getOrientation();
>
> > after setting up a preferred orientation via:
>
> > setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
>
> > Is there something I am doing wrong here? Is there a different way to
> > access the current orientation of the phone?
>
> > Thanks!
>
> > On Mar 26, 9:50 am, Amir Alagic  wrote:
> > > int orientation = getResources().getConfiguration().orientation
>
> > > On Mar 25, 8:12 am, Dianne Hackborn  wrote:
>
> > > > Sorry I made a mistake, use getResources().getConfiguration().
>
> > > > On Tue, Mar 24, 2009 at 10:43 PM, for android 
> > wrote:
> > > > > Does that mean from the DisplayMetrics we need to check from the
> > height and
> > > > > width?
>
> > > > > On Wed, Mar 25, 2009 at 10:55 AM, Dianne Hackborn <
> > hack...@android.com>wrote:
>
> > > > >> That returns the orientation mode your activity has requested.  The
> > actual
> > > > >> current orientation is in getResources().getDisplayMetrics().
>
> > > > >> On Tue, Mar 24, 2009 at 10:01 PM, for android  > >wrote:
>
> > > > >>> getRequestedOrientation()
>
> > > > >>> On Wed, Mar 25, 2009 at 9:34 AM, Suman 
> > wrote:
>
> > > >  Hi all...
>
> > > >                 Thanks for replies. Can any one tell me by which
> > > >  method i can check the screen orientation? I mean i want to check
> > > >  whether it is land-scap mode or portrait mode. Thanks in advance.
>
> > > >  Suman.
>
> > > > >> --
> > > > >> Dianne Hackborn
> > > > >> Android framework engineer
> > > > >> hack...@android.com
>
> > > > >> Note: please don't send private questions to me, as I don't have
> > time to
> > > > >> provide private support.  All such questions should be posted on
> > public
> > > > >> forums, where I and others can see and answer them.
>
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > hack...@android.com
>
> > > > Note: please don't send private questions to me, as I don't have time
> > to
> > > > provide private support.  All such questions should be posted on public
> > > > forums, where I and others can see and answer them.- Hide quoted text -
>
> > > > - Show quoted text -
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread AlexK

Hi,

Why Android team does not include Ukraine language into release?!

Translation to all applications was uploaded long time ago.
Please take a look at https://review.source.android.com/Gerrit#all,open,n,z

Items from 9613 till 9642 providing Ukraine language translation. And
all items has a prove from more then 2 code reviewers.

Please explain to me how you decide which items should be included
into release and which not...

Thanks,
Good Luck

On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
> Hello developers,
>
> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
> download.
>
> More information 
> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>
> Xav
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sdk 1.5 digital keyboard

2009-04-28 Thread Chander Pechetty

Read the blog post at
http://android-developers.blogspot.com/search/label/Input%20methods
and then API documentation

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



[android-developers] Re: Updated to Android SDK 1.5 r1 - adb connectivity problems

2009-04-28 Thread Chander Pechetty

Describe your platform,
did you flash the 1.5 images onto your device ?
http://www.htc.com/www/support/android/adp.html

Unless enough details are  provided, there is very little help one can
give

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



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread Al Sutton

I expect they're looking for a internal staff member who can confirm the
translation is accurate and correct for the context in which it's used,
hence why there are +1's on the code review, but no +1s for verification.

Al.
---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of AlexK
Sent: 28 April 2009 15:26
To: Android Developers
Subject: [android-developers] Re: Android 1.5 SDK now available


Hi,

Why Android team does not include Ukraine language into release?!

Translation to all applications was uploaded long time ago.
Please take a look at https://review.source.android.com/Gerrit#all,open,n,z

Items from 9613 till 9642 providing Ukraine language translation. And all
items has a prove from more then 2 code reviewers.

Please explain to me how you decide which items should be included into
release and which not...

Thanks,
Good Luck

On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
> Hello developers,
>
> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for
download.
>
> More information 
> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.ht
> ml
>
> Xav
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.



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



[android-developers] out of memory exception on transferring large file to DataOutputStream

2009-04-28 Thread zeeshan

Hi Experts,

I need to post some files on my server, it works fine for small files
like 1mb but when i try for more than 4 mb ; it force close because of
memory overload.

please have a look on my code below:

URL url = new URL(uri);
URLConnection conn = url.openConnection();


String boundary = "myboundary";
conn.setDoOutput(true);

conn.setDoInput(true);
conn.setUseCaches(false);
conn.setRequestProperty("Connection","Keep-Alive");
conn.setRequestProperty("user-
agent",this.user_agent);
conn.setRequestProperty("accept-
language",this.accept_language);
conn.setRequestProperty("user-agent-
id",this.user_agent_id);
conn.setRequestProperty("Content-Type","multipart/
form-data; boundary=" + boundary);
DataOutputStream wr = new DataOutputStream
(conn.getOutputStream());
// Send the normal form data

Iterator i = parameters.entrySet().iterator();
while (i.hasNext()) {
Map.Entry param = (Map.Entry)i.next();
wr.write( ("--" + boundary + "\r\n").getBytes
() );
wr.write( ("Content-Disposition: form-data; name=
\""+(String)param.getKey()+"\"\r\n\r\n").getBytes());

wr.write( ((String)param.getValue() +
"\r").getBytes());

wr.flush();
}
   /* wr.write( ("\r--" + boundary + "--\r\n").getBytes
());
wr.flush();*/
  if(includeFiles){
int bytesRead = 0;

byte [] buffer = new byte[1024*4];
InputStream is;
Iterator i2 = fileParameters.entrySet().iterator
();
while (i2.hasNext()) {

Map.Entry param = (Map.Entry)i2.next();
String filekey = (String)param.getKey();
String fileName = (String)param.getValue();

wr.write( ("--" + boundary + "\r\n").getBytes
() );
wr.write( ("Content-Disposition: form-data; name=
\""+(String)param.getKey()+"\"; ").getBytes());

if(filekey.endsWith("message[audio]")){
 if(fileName.contains("/sdcard")){
 wr.write( ("filename=\"" + fileName +
"\"\r").getBytes());
File file = new File(fileName);
Uri ab= Uri.parse(fileName);
is = new 
FileInputStream(fileName);}
 else {
 wr.write( ("filename=\"" + 
fileName.concat
(".amr") + "\"\r").getBytes());
 is = this.cr.openInputStream( Uri.parse
(fileName));}
wr.write( ("Content-Type: audio \r\n\r
\n").getBytes());
wr.flush();

/*File file = new File(fileName);
Uri ab= Uri.parse(fileName);
is = new FileInputStream(fileName);*/
}
else{
 if(fileName.contains("/sdcard")){

File file = new File(fileName);
//long temp=file.length();
Uri ab= Uri.parse(fileName);
is = new 
FileInputStream(fileName);}
 else {

 is = this.cr.openInputStream( Uri.parse
(fileName));}

wr.write( ("filename=\"" + fileName +
"\"\r").getBytes());
wr.write( ("Content-Type: image \r\n\r
\n").getBytes());
wr.flush();


}



//FileInputStream is = new FileInputStream(new
File(fileName));

//bytesAvailable = is.available();



while( (bytesRead = is.read(buffer)) > 0) {
wr.write(buffer,0,bytesRead);
wr.flush();
}
if(i2.hasNext()){
wr.write( ("\r\n").getBytes());
}
}
   }
wr.write( ("\r--" + boundary + "--\r\n").getBytes(

[android-developers] Re: Android Market: Can you download apps without publishing them? Do you pay for your own apps? +signing problems

2009-04-28 Thread Just Checking

Thank you. That provided the hint I needed to figure out what was
happening.

It turns out that if your Eclipse project name has a space in it,
there's no problem whatsoever before you sign the .apk; after you sign
it, though, it won't install. Something breaks when there's a space in
the project name. So if you have a version called "MyApp Lite", it
fails to install. "MyAppLite" works.
The alarming thing is that when you upload an app to Market, the
problem is not detected - it only happens when you download it to a
phone. So you could upload an app, be certain it's available on
Market, but nobody can download it. Scary thought, isn't it?


On Apr 27, 4:44 pm, Raphael  wrote:
> Try using adb install using your signed apk. Does that succeed?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread Jean-Baptiste Queru

1.5 was released from the cupcake branch, into which we didn't accept
external contributions.

JBQ

On Tue, Apr 28, 2009 at 7:25 AM, AlexK  wrote:
>
> Hi,
>
> Why Android team does not include Ukraine language into release?!
>
> Translation to all applications was uploaded long time ago.
> Please take a look at https://review.source.android.com/Gerrit#all,open,n,z
>
> Items from 9613 till 9642 providing Ukraine language translation. And
> all items has a prove from more then 2 code reviewers.
>
> Please explain to me how you decide which items should be included
> into release and which not...
>
> Thanks,
> Good Luck
>
> On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
>> Hello developers,
>>
>> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
>> download.
>>
>> More information 
>> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>>
>> Xav
>> --
>> Xavier Ducrohet
>> Android Developer Tools Engineer
>> Google Inc.
> >
>



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

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

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



[android-developers] Re: Updated to Android SDK 1.5 r1 - adb connectivity problems

2009-04-28 Thread Rob Franz
Well I've not flashed the new image on the device - my target is still 1.1
(waiting until TMobile pushes 1.5 out to all users).  Anything I develop for
1.5 I'm running on the simulator which works fine... that's good enough for
my purposes at the moment.
However it looks like I fixed the problem with a simple reboot - everything
looks ok now.  I can logcat, push APKs to the phone, etc.

Either that instruction to reboot the phone is not listed in the guide OR I
just plain missed it.  The latter is not completely out of the question.

Anyway, thanks for the response, Chandler.

-Rob


On Tue, Apr 28, 2009 at 10:30 AM, Chander Pechetty wrote:

>
> Describe your platform,
> did you flash the 1.5 images onto your device ?
> http://www.htc.com/www/support/android/adp.html
>
> Unless enough details are  provided, there is very little help one can
> give
>
> >
>

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



[android-developers] Eclipse + cupcake + referenced projects in build path = VerifyError

2009-04-28 Thread Guillaume Perrot

In the previous SDK releases, we have our application cut into 3
android projects:
* Project REAL (the real android project)
* Project LIB1 (a non executable android project, just to make android
reusable classes)
* Project LIB2 (same as LIB1)
LIB1 and LIB2 are android projects rather than J2SE ones because of
the API they use, indeed LIB1 and LIB2 use Android classes.
Project REAL has LIB1 and LIB2 in its project build path in Eclipse.

In SDK 1.0 and 1.1, no problem at all when running the project REAL
from Eclipse, it mixes the code of the 3 projects and produces one big
APK with everything in it.

But now in SDK 1.5, it installs 3 different APKs on the emulator or on
the phone (I tested both), and the project REAL immediately crashes
because of a VerifyError: it does not found a class that is in LIB1.

The size of the produced APK is smaller, indeed, LIB1 and LIB2 classes
are not in it...
I tried using uses-library in the manifest like google maps library
but it complains at installing, we have a "missing shared library"
error.
I tried adding class folders in build path, it compiles in Eclipse but
we still have VerifyError.
Same thing if we use external class folders in build path.

The only thing that worked for me was to add an eclipse folder, which
is in fact a symbolic link, and to make it a source folder. But that
solution is not convenient for us when because we share the projects
in SVN and so the paths are different. Using eclipse path variables
can do the trick but we waste some time to configure them so it's not
convenient enough.

Is there a way to restore the old behavior on other android projects
in build path ?


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



[android-developers] Re: out of memory exception on transferring large file to DataOutputStream

2009-04-28 Thread Mike Baroukh

Maybe you could try using httpclient ?
haven't tried myself but using "chunked" request, the output will not be 
buffered.
for exemple, cf
http://www.java-tips.org/other-api-tips/httpclient/how-to-use-unbuffered-chunk-encoded-post-re.html
 


Mike


zeeshan a écrit :
> Hi Experts,
>
> I need to post some files on my server, it works fine for small files
> like 1mb but when i try for more than 4 mb ; it force close because of
> memory overload.
>
> please have a look on my code below:
>
>   URL url = new URL(uri);
>   URLConnection conn = url.openConnection();
>
>
>   String boundary = "myboundary";
>   conn.setDoOutput(true);
>
>   conn.setDoInput(true);
>   conn.setUseCaches(false);
>   conn.setRequestProperty("Connection","Keep-Alive");
>   conn.setRequestProperty("user-
> agent",this.user_agent);
>   conn.setRequestProperty("accept-
> language",this.accept_language);
>   conn.setRequestProperty("user-agent-
> id",this.user_agent_id);
>   conn.setRequestProperty("Content-Type","multipart/
> form-data; boundary=" + boundary);
>   DataOutputStream wr = new DataOutputStream
> (conn.getOutputStream());
>   // Send the normal form data
>
>   Iterator i = parameters.entrySet().iterator();
>   while (i.hasNext()) {
>   Map.Entry param = (Map.Entry)i.next();
>   wr.write( ("--" + boundary + "\r\n").getBytes
> () );
>   wr.write( ("Content-Disposition: form-data; name=
> \""+(String)param.getKey()+"\"\r\n\r\n").getBytes());
>
>   wr.write( ((String)param.getValue() +
> "\r").getBytes());
>
>   wr.flush();
>   }
>  /* wr.write( ("\r--" + boundary + "--\r\n").getBytes
> ());
>   wr.flush();*/
> if(includeFiles){
>   int bytesRead = 0;
>
>   byte [] buffer = new byte[1024*4];
>   InputStream is;
>   Iterator i2 = fileParameters.entrySet().iterator
> ();
>   while (i2.hasNext()) {
>
>   Map.Entry param = (Map.Entry)i2.next();
>   String filekey = (String)param.getKey();
>   String fileName = (String)param.getValue();
>
>   wr.write( ("--" + boundary + "\r\n").getBytes
> () );
>   wr.write( ("Content-Disposition: form-data; name=
> \""+(String)param.getKey()+"\"; ").getBytes());
>
>   if(filekey.endsWith("message[audio]")){
>if(fileName.contains("/sdcard")){
>wr.write( ("filename=\"" + fileName +
> "\"\r").getBytes());
>   File file = new File(fileName);
>   Uri ab= Uri.parse(fileName);
>   is = new 
> FileInputStream(fileName);}
>else {
>wr.write( ("filename=\"" + 
> fileName.concat
> (".amr") + "\"\r").getBytes());
>is = this.cr.openInputStream( Uri.parse
> (fileName));}
>   wr.write( ("Content-Type: audio \r\n\r
> \n").getBytes());
>   wr.flush();
>
>   /*File file = new File(fileName);
>   Uri ab= Uri.parse(fileName);
>   is = new FileInputStream(fileName);*/
>   }
>   else{
>if(fileName.contains("/sdcard")){
>
>   File file = new File(fileName);
>   //long temp=file.length();
>   Uri ab= Uri.parse(fileName);
>   is = new 
> FileInputStream(fileName);}
>else {
>
>is = this.cr.openInputStream( Uri.parse
> (fileName));}
>
>   wr.write( ("filename=\"" + fileName +
> "\"\r").getBytes());
>   wr.write( ("Content-Type: image \r\n\r
> \n").getBytes());
>   wr.flush();
>
>
>   }
>
>
>
>   //FileInputStream is = new FileInputStream(new
> File(fileName));
>
>   //bytesAvailable = is.available();
>
>
>
>   while( (bytesRead = is.read(buffer)) > 0) {
>   wr.write(buffer

[android-developers] Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-28 Thread Guillaume Perrot

We have an application cut into 3 android projects:
* Project REAL (the real android project)
* Project LIB1 (an android project without any activity, just to make
android reusable classes)
* Project LIB2 (same as LIB1)
LIB1 and LIB2 are android projects rather than J2SE ones because LIB1
and LIB2 use Android classes.
Project REAL has LIB1 and LIB2 in its project build path in Eclipse.

In SDK 1.0 and 1.1, no problem at all when running the project REAL
from Eclipse, it mixes the code of the 3 projects and produces one big
APK with everything in it.

But now in SDK 1.5, it installs 3 different APKs on the emulator or on
the phone (I tested both), and the project REAL immediately crashes
because of a VerifyError: it does not find a class that is in LIB1.

The size of the produced APK is smaller, indeed LIB1 and LIB2 classes
are not in it...
I tried using uses-library in the manifest like google maps library
but it complains at installing, we have a "missing shared library"
error.
I tried adding class folders in build path, it compiles in Eclipse but
we still have a VerifyError.
Same thing if we use external class folders in build path.

The only thing that worked for me was to add an eclipse folder, which
is in fact a symbolic link, and to make it a source folder. But that
solution is not convenient for us because when we share the projects
in SVN, the referenced paths are different for each developer. Using
eclipse path variables can do the trick but it is far from being
convenient. Indeed, if we have to reinstall Eclipse or if we move the
place we check out the code in our developer station we have to
reconfigure all these messy path variables in Eclipse.

Is there a way to restore the old behavior on other android projects
in build path ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Playing sound from memory

2009-04-28 Thread Marco Nelissen
On Mon, Apr 27, 2009 at 5:50 PM, rookie1_1998
wrote:

>
> I need a way to play a short sound clip repeatedly very fast, with
> precise timing for musical purpose.  I looked around, and it seems
> like MediaPlayer and SoundPool don't guarantee lag-free playing.  Is
> there anyway I could load the sound to memory myself and play from
> memory (edit the stream)?


That's what SoundPool does: it loads the sound in to memory.
If you really want to copy the bytes yourself, then you should use
AudioTrack.

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



[android-developers] Re: Hiding media files from Music Player

2009-04-28 Thread Marco Nelissen
On Mon, Apr 27, 2009 at 11:32 PM, nEx.Software wrote:

>
> A quick look shows at the source indicates the MediaScanner omits
> files that begin like "._" or are like "Folder.jpg",
> "AlbumArtSmall.jpg", "AlbumArt_{...}_Large.jpg" or "AlbumArt_{...}
> _Small.jpg". But it all seems to be based on filename. Of course
> there's a native method in there "processDirectory" that I don't
> understand because I don't understand c++. Maybe that's supposed to
> weed out certain folders/files? Of course, I don't know if this helps


The native method will skip any folders whose name starts with a period.

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



[android-developers] Re: Screen Orientation.

2009-04-28 Thread Troglodad

I can get my phone to rotate one way only- If I rotate the phone onto
the left side, as though I were going to use the keyboard. Upside down
and right side, nothing.

Also, I notice that only some programs rotate- the main screen doesn't
rotate, but the browser, messaging and notepad do.


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



[android-developers] Re: Hiding media files from Music Player

2009-04-28 Thread Marco Nelissen
You put the files in a folder whose name starts with a period, and they
still show up in the music app?
Are you sure it's not the old files in the old location that are still
showing? Can you check that there are actually entries in the media database
whose path (the _data column) includes a folder that starts with a period?


On Mon, Apr 27, 2009 at 10:08 PM, clark  wrote:

>
> Just tried it and the sounds are showing up in the music player.  So
> much for that idea.  Anyone else  have experience with this?
>
> I guess I can try changing the extension since I pass it the Uri, and
> hopefully MediaPlayer and SoundPool don't choke.  I just have quite a
> few files and would hate to have to check them and rename them from
> within the app or have the users re-download the new data.
>
> Suggestions welcomed.
>
>
> ~clark
> On Apr 27, 4:51 pm, Marco Nelissen  wrote:
> > On Mon, Apr 27, 2009 at 4:36 PM, clark  wrote:
> >
> > > I'm torn between which group to post this too, but since it is for an
> > > application I am working on, I guess I'll stick it here.
> >
> > > So here we go.  I have an application which downloads data onto the
> > > sdcard to be used by the application.  Some of these files are sound
> > > or music files and the music player in android seems to parse these
> > > directories and add these files to the list.  I'd like to somehow
> > > block or hide these files from the music player.  Is there is a way to
> > > do this?
> >
> > > I was thinking it may be possible to name my folder with a period at
> > > the beginning, since linux hides such files.  I'm just not sure if
> > > that is going to hide it from the music player or if there is another
> > > way to handle this.
> >
> > You could have just tried it, and you would have found that that does
> indeed
> > have the effect you're looking for.
> > Alternatively, you can put a file called ".nomedia" in a directory to
> > prevent the media scanner from scanning that directory.
> >
>

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



[android-developers] Re: Eclipse + cupcake + referenced projects in build path = VerifyError

2009-04-28 Thread Inderjeet Singh

I ran into the same problem this morning and was hating myself for
being a compulsive early adopter. :)
Also, the fact that you actually have to create a device before you
can launch anything.

Anyone else figured out what is going on?

Inder


On Tue, Apr 28, 2009 at 8:02 AM, Guillaume Perrot
 wrote:
>
> In the previous SDK releases, we have our application cut into 3
> android projects:
> * Project REAL (the real android project)
> * Project LIB1 (a non executable android project, just to make android
> reusable classes)
> * Project LIB2 (same as LIB1)
> LIB1 and LIB2 are android projects rather than J2SE ones because of
> the API they use, indeed LIB1 and LIB2 use Android classes.
> Project REAL has LIB1 and LIB2 in its project build path in Eclipse.
>
> In SDK 1.0 and 1.1, no problem at all when running the project REAL
> from Eclipse, it mixes the code of the 3 projects and produces one big
> APK with everything in it.
>
> But now in SDK 1.5, it installs 3 different APKs on the emulator or on
> the phone (I tested both), and the project REAL immediately crashes
> because of a VerifyError: it does not found a class that is in LIB1.
>
> The size of the produced APK is smaller, indeed, LIB1 and LIB2 classes
> are not in it...
> I tried using uses-library in the manifest like google maps library
> but it complains at installing, we have a "missing shared library"
> error.
> I tried adding class folders in build path, it compiles in Eclipse but
> we still have VerifyError.
> Same thing if we use external class folders in build path.
>
> The only thing that worked for me was to add an eclipse folder, which
> is in fact a symbolic link, and to make it a source folder. But that
> solution is not convenient for us when because we share the projects
> in SVN and so the paths are different. Using eclipse path variables
> can do the trick but we waste some time to configure them so it's not
> convenient enough.
>
> Is there a way to restore the old behavior on other android projects
> in build path ?
>
>
> >
>

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



[android-developers] Re: Launch android emulator on mingw/msys, but failed

2009-04-28 Thread Hua Xia
How to use "emulator -verbose or -debug "? just type "emulator -verbose or
-debug " in shell?

2009/4/27 Raphael 

>
> What does it say if you run it with emulator -verbose or -debug init?
> R/
>
> On Thu, Apr 23, 2009 at 9:17 PM, Edward  wrote:
> >
> > Hi,
> > I built the android emulator source on mingw/msys, then run "./
> > emulator" in msys console as below, but failed.
> >
> > $ ./emulator
> >
> > This application has requested the Runtime to terminate it in an
> > unusual way.
> > Please contact the application's support team for more information.
> > .
> >
> > Is anyone who can help me?
> >
> >
> > Edward
> > >
> >
>
> >
>

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



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Illidane

I have tried to do that - doesn't working for me :(
Animation is running always without last cell.
I think so:
In first case there is a '0' at the end of position values. Without
your algorithm all 100 animations is running, than without last ( and
there is no '0' at the end ).
With you alhorithm animation will start before position will be a '0'
for the third time, because _visited[0] will be true;
I think there is some regularity here.

And one more thing... I would like to start animations in some other
function. Than it's working fine. For example in onCreate method in
the my grid click listener: after mGameGrid.setAdapter(mAdapter). But
I need to set timer in 200, or 500 ms for waiting for getView finish
its work ( but even so, it's not always make it in time and I see only
half or 2/3 of all animations running). If I call start animation
after setAdapter without timer - it's doesn't work. Why animation is
working fine in that case, but don't working if I run it in getView
method, even with your algorithm?

On 28 апр, 16:55, Streets Of Boston  wrote:
> Don't rely on the order in which getView is called. It is not a bug.
> It is a decision of the design of the grid/list view not to be
> dependent on the order in which getView is called. Why getView with
> position '0' is called three times... i don't know. *If* this is a
> bug, it is only a peformance issue. Maybe it has to do with lay-out
> issues (layout 'weights' are used)? Just don't rely on the order.
>
> However, maybe you can do this instead. Below is code that does not
> rely on the number of times getView is called nor the order in which
> it is called:
>
> You know that you have 100 cells. Make an array of 100 booleans as an
> instance variable of your adapter or activity (e.g. boolean[] _visited
> = new boolean[100]). Initially, set every element in this array to
> false. When getView is called with a value of position, do this inside
> of your getView method:
>
>   ...
>   ...
>   _visited[position] = true;
>   boolean allCellsAreShown = true;
>   for (int i = 0; i < _visited.length; i++) {
>     if (!_visited[i]) {
>       allCellsAreShown = false;
>       break;
>     }
>   }
>   if (allCellsAreShown) {
>     ... // start your animation.
>   }
>   ...
>   ...
>
> (you could optimize the above code a bit... but i think you'd get the
> idea :=) ).
>
> On Apr 28, 9:43 am, "yarik...@gmail.com"  wrote:
>
>
>
> > I have exactly same problem. Why do we have 102 values of position
> > when there is only 100 cells displayed on screen?
> > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> > of that? Can someone from google team answer?
> > That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> > not answer! How do you generate position?
>
> > On Apr 27, 9:40 pm, Illidane  wrote:
>
> > > There is a way to make GridView without Adapter ( e.g. something
> > > like .addView() method ) ?
>
> > > On 27 апр, 21:38, Illidane  wrote:
>
> > > > My GridView shows all 100 cells on the screen ( all visible at one
> > > > moment )
> > > > and all the animation works fine, and pretty fast ( on all 100
> > > > elements ),
> > > > but than begin problems with last cell.
> > > > Animation not child-view's. Each cell is a imageView with animation on
> > > > it.
>
> > > > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> > > > > It's not buggy. I use the adapters and grid/list-views in my apps and
> > > > > they work fine. I think they are not designed for your purpose.
>
> > > > > e.g. If your adapter has 100 elements and the grid/list-view only
> > > > > shows about 15 at a time on the screen, the getView is called about 15
> > > > > times. Sometimes more times, depending whether a little bit (a few
> > > > > pixels) of the top or bottom child-view become visible or not. Then,
> > > > > when you start scrolling, getView gets called again and again when
> > > > > child-views become visible and others become invisible.
>
> > > > > Also, seriously consider re-using the convertView for your grid- or
> > > > > list-view. My experience is that it can really slow down your app if
> > > > > you just return new View instances for each child-view/cell:
> > > > > public ... getView() {
> > > > >   View view = convertView != null ? convertView : createNewView(...);
> > > > >   ...
> > > > >   ...
> > > > >   return view;
>
> > > > > }
>
> > > > > The implementation of the adapter+listviews does not need to rely on
> > > > > the order in which the getView is called. As long as it is called for
> > > > > every child-view that becomes visible.
>
> > > > > Isn't is possible to start a child-view's (cell's) animation when you
> > > > > handle it the getView(...) method?
>
> > > > > If you really want at least 100 child-views/cells to be created (i
> > > > > won't recommend it... it's a LOT), you can override the Adapter's
> > > > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
> > > > > still not sure if getView would

[android-developers] SearchManager sample

2009-04-28 Thread André Charles Legendre

Hi

I would like to find some examples to use android.app.SearchManager with maps.

Any help welcome

Andre

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



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread AlexK

A little trust for translation done by other vendors will help a
lot :)

On Apr 28, 5:35 pm, "Al Sutton"  wrote:
> I expect they're looking for a internal staff member who can confirm the
> translation is accurate and correct for the context in which it's used,
> hence why there are +1's on the code review, but no +1s for verification.
>
> Al.
> ---
>
> * Written an Android App? - List it athttp://andappstore.com/*
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
>
> -Original Message-
> From: android-developers@googlegroups.com
>
> [mailto:android-develop...@googlegroups.com] On Behalf Of AlexK
> Sent: 28 April 2009 15:26
> To: Android Developers
> Subject: [android-developers] Re: Android 1.5 SDK now available
>
> Hi,
>
> Why Android team does not include Ukraine language into release?!
>
> Translation to all applications was uploaded long time ago.
> Please take a look athttps://review.source.android.com/Gerrit#all,open,n,z
>
> Items from 9613 till 9642 providing Ukraine language translation. And all
> items has a prove from more then 2 code reviewers.
>
> Please explain to me how you decide which items should be included into
> release and which not...
>
> Thanks,
> Good Luck
>
> On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
> > Hello developers,
>
> > The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for
> download.
>
> > More information
> > athttp://android-developers.blogspot.com/2009/04/android-15-is-here.ht
> > ml
>
> > Xav
> > --
> > Xavier Ducrohet
> > Android Developer Tools Engineer
> > Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread Fred Grott(shareme)

Xavier

On the eclipse plugin, ADT 0.9 I am still getting a build path hiccup
at project setup errors show  up as:

[2009-04-28 10:43:43 - DummyAndroid] no classfiles specified
[2009-04-28 10:43:43 - DummyAndroid] Conversion to Dalvik format
failed with error 1

once I go to build path and recheck something everything is than fine
as no problems reported as they disappear in the problem vie tab.

My environment is Linux, Ubuntu 9.0.4..




On Apr 27, 1:12 pm, Xavier Ducrohet  wrote:
> Hello developers,
>
> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
> download.
>
> More information 
> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>
> Xav
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread AlexK

Thanks for explanation...

I expecting more features for localization in cupcake release.
Still in release are known issues: Virtual keyboard does not support
several languages switching, still has issue with ALT and SHIFT key
status (led)...

Do you know which branch/tag will be used for future releases?! Do you
have any news about next releases?

On Apr 28, 5:45 pm, Jean-Baptiste Queru  wrote:
> 1.5 was released from the cupcake branch, into which we didn't accept
> external contributions.
>
> JBQ
>
>
>
>
>
> On Tue, Apr 28, 2009 at 7:25 AM, AlexK  wrote:
>
> > Hi,
>
> > Why Android team does not include Ukraine language into release?!
>
> > Translation to all applications was uploaded long time ago.
> > Please take a look athttps://review.source.android.com/Gerrit#all,open,n,z
>
> > Items from 9613 till 9642 providing Ukraine language translation. And
> > all items has a prove from more then 2 code reviewers.
>
> > Please explain to me how you decide which items should be included
> > into release and which not...
>
> > Thanks,
> > Good Luck
>
> > On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
> >> Hello developers,
>
> >> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
> >> download.
>
> >> More information 
> >> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>
> >> Xav
> >> --
> >> Xavier Ducrohet
> >> Android Developer Tools Engineer
> >> Google Inc.
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: audio codec

2009-04-28 Thread intbt

Thanks, I think AudioTrack may be what I am looking for to read the
codec output???

http://developer.android.com/reference/android/media/AudioTrack.html



On Apr 27, 6:11 pm, benmccann  wrote:
> The 1.5 SDK includes "Raw audio recording and playback APIs".  I think
> I'd take a look 
> athttp://developer.android.com/reference/android/media/AudioRecord.html
> I'm not real sure how AudioRecord and MediaRecorder work together, if
> at all.  It looks like maybe AudioRecord is closer to the native calls
> while MediaRecorder wraps AudioRecord to provide a slightly friendlier
> interface and additonal encoding.  It's hard to tell from the JavaDocs
> alone.
> Here's a post talking about AudioRecord 
> instantiation:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> On Apr 27, 5:23 pm, intbt  wrote:
>
> > Is there a method to access the digital output of the audio codec
> > without first storing it into a file, a streaming output?
>
> > intbt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Eclipse plugin 0.9

2009-04-28 Thread Al Sutton

Can someone confirm or let me know if it's a problem with my setup where the
0.9 eclipse plugin will complain about not finding the SDK even if the
workspace has no Android projects in it?

I work on a few projects and many of them don't have Android apps involved,
so it's a little annoying to get the popup on every single workspace.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 



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



[android-developers] sdcard in avd SDK 1.5

2009-04-28 Thread longhairedsi

Hello,

I've been trying to figure out how to use the sdcard that was
generated when I created the avd file for the emulator in SDK 1.5 r1.

In previous SDKs I set this in the Eclipse run configurations  -sdcard
c:\android\sd500m.img

I could then access the sdcard through DDMS etc.

How do i specify the sdcard that was created in the avd?

Cheers
Si


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



[android-developers] Re: Hiding media files from Music Player

2009-04-28 Thread clark

On Apr 28, 8:33 am, Marco Nelissen  wrote:
> You put the files in a folder whose name starts with a period, and they
> still show up in the music app?
> Are you sure it's not the old files in the old location that are still
> showing? Can you check that there are actually entries in the media database
> whose path (the _data column) includes a folder that starts with a period?

I actually renamed the folder programmatically and verified that it
was indeed renamed.  Files in media player still show up and play.

I can check the DB once I get home and I am at my development machine,
unless there is an easy way to check that information directly within
the phone.  Music player does not provide file details, unfortunately.


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



[android-developers] Re: Android 1.5 SDK now available

2009-04-28 Thread Jean-Baptiste Queru

There's no precise information about future releases yet.

JBQ

On Tue, Apr 28, 2009 at 8:49 AM, AlexK  wrote:
>
> Thanks for explanation...
>
> I expecting more features for localization in cupcake release.
> Still in release are known issues: Virtual keyboard does not support
> several languages switching, still has issue with ALT and SHIFT key
> status (led)...
>
> Do you know which branch/tag will be used for future releases?! Do you
> have any news about next releases?
>
> On Apr 28, 5:45 pm, Jean-Baptiste Queru  wrote:
>> 1.5 was released from the cupcake branch, into which we didn't accept
>> external contributions.
>>
>> JBQ
>>
>>
>>
>>
>>
>> On Tue, Apr 28, 2009 at 7:25 AM, AlexK  wrote:
>>
>> > Hi,
>>
>> > Why Android team does not include Ukraine language into release?!
>>
>> > Translation to all applications was uploaded long time ago.
>> > Please take a look athttps://review.source.android.com/Gerrit#all,open,n,z
>>
>> > Items from 9613 till 9642 providing Ukraine language translation. And
>> > all items has a prove from more then 2 code reviewers.
>>
>> > Please explain to me how you decide which items should be included
>> > into release and which not...
>>
>> > Thanks,
>> > Good Luck
>>
>> > On Apr 27, 9:12 pm, Xavier Ducrohet  wrote:
>> >> Hello developers,
>>
>> >> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
>> >> download.
>>
>> >> More information 
>> >> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>>
>> >> Xav
>> >> --
>> >> Xavier Ducrohet
>> >> Android Developer Tools Engineer
>> >> Google Inc.
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Android Engineer, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
> >
>



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

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

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



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Romain Guy

I am from the Google team (and I did implement a lot of GridView and
ListView) and it is NOT a bug. GridView and ListView can call
getView() out of order and more times than the number of views that
will fit on screen, depending how the Grid/ListView is measured/laid
out.

2009/4/28 yarik...@gmail.com :
>
> I have exactly same problem. Why do we have 102 values of position
> when there is only 100 cells displayed on screen?
> "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> of that? Can someone from google team answer?
> That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> not answer! How do you generate position?
>
> On Apr 27, 9:40 pm, Illidane  wrote:
>> There is a way to make GridView without Adapter ( e.g. something
>> like .addView() method ) ?
>>
>> On 27 апр, 21:38, Illidane  wrote:
>>
>>
>>
>> > My GridView shows all 100 cells on the screen ( all visible at one
>> > moment )
>> > and all the animation works fine, and pretty fast ( on all 100
>> > elements ),
>> > but than begin problems with last cell.
>> > Animation not child-view's. Each cell is a imageView with animation on
>> > it.
>>
>> > On 27 апр, 20:43, Streets Of Boston  wrote:
>>
>> > > It's not buggy. I use the adapters and grid/list-views in my apps and
>> > > they work fine. I think they are not designed for your purpose.
>>
>> > > e.g. If your adapter has 100 elements and the grid/list-view only
>> > > shows about 15 at a time on the screen, the getView is called about 15
>> > > times. Sometimes more times, depending whether a little bit (a few
>> > > pixels) of the top or bottom child-view become visible or not. Then,
>> > > when you start scrolling, getView gets called again and again when
>> > > child-views become visible and others become invisible.
>>
>> > > Also, seriously consider re-using the convertView for your grid- or
>> > > list-view. My experience is that it can really slow down your app if
>> > > you just return new View instances for each child-view/cell:
>> > > public ... getView() {
>> > >   View view = convertView != null ? convertView : createNewView(...);
>> > >   ...
>> > >   ...
>> > >   return view;
>>
>> > > }
>>
>> > > The implementation of the adapter+listviews does not need to rely on
>> > > the order in which the getView is called. As long as it is called for
>> > > every child-view that becomes visible.
>>
>> > > Isn't is possible to start a child-view's (cell's) animation when you
>> > > handle it the getView(...) method?
>>
>> > > If you really want at least 100 child-views/cells to be created (i
>> > > won't recommend it... it's a LOT), you can override the Adapter's
>> > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
>> > > still not sure if getView would get called in the order you want.
>>
>> > > ...
>> > >   private static int EXPECTED_CELL_COUNT = 100;
>>
>> > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
>> > >   public int getItemViewType(int pos) { return pos %
>> > > EXPECTED_CELL_COUNT; }
>>
>> > > On Apr 27, 1:07 pm, Illidane  wrote:
>>
>> > > > And you think it's not a bug? where is guarantee that it will work in
>> > > > general?
>> > > > Where adapter takes it's magic number N?
>>
>> > > > On 27 апр, 19:56, Romain Guy  wrote:
>>
>> > > > > There is no guarantee it's going to be called N times either.
>>
>> > > > > 2009/4/27 Illidane :
>>
>> > > > > > Even with convertView problem is still same - last cell is not
>> > > > > > animating.
>> > > > > > And... you said WHEN getView()... I think it's no matter, matter 
>> > > > > > HOW
>> > > > > > MANY times getView() called.
>> > > > > > It calls more than 100 times, whats very strange.
>> > > > > > For the first time it's called 102 times and all animations was
>> > > > > > working. For the second and next times it was 101, and last 
>> > > > > > animation
>> > > > > > was static.
>> > > > > > I think where is some bug regularity...
>>
>> > > > > > On 27 апр, 19:31, Romain Guy  wrote:
>> > > > > >> You should ALWAYS reuse the convertView, oherwise you're gonna 
>> > > > > >> eat up
>> > > > > >> memory and just slow down your app. And like I said, there is no
>> > > > > >> guarantee on how and when getView() is called so you cannot rely 
>> > > > > >> on it
>> > > > > >> with your anim counter.
>>
>> > > > > >> 2009/4/27 Illidane :
>>
>> > > > > >> > I dont use convertView parametr and return new child-view.
>>
>> > > > > >> > Each cell has an animation. In the getView I generate an array 
>> > > > > >> > of
>> > > > > >> > animations, wich I start when the adapter stops his work ( e.g. 
>> > > > > >> > when
>> > > > > >> > my mAnimCounter == 102 ( but need be max 100, lol ) When I run 
>> > > > > >> > app,
>> > > > > >> > all 100 cells are animated. But when I re-check the field as I 
>> > > > > >> > need
>> > > > > >> > and call mGameGrid.setAdapter(mAdapter), new animations 
>> > > > > >> > working, but
>> > > > > >> > last. Last cell are NOT anim

[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Streets Of Boston

Yikes

Another option would be to start a timer at each getView call (using
postDelayed and removeCallbacks methods; postDelayd to start timer,
removeCallbacks to remove previous timer until the last call to
getView).

When the last timer times-out (the last non-remove postDelayed), the
task (Runnable provided to the postDelayed call) could get the
GridView and loop over its child-views (which are the cells). This
means you will start the animations 'outside' of the getView method,
after the grid-view has finished all its work.

Maybe there is a better way than using a timer to figure out when a
listview or gridview are done laying out their child-views, though


On Apr 28, 11:40 am, Illidane  wrote:
> I have tried to do that - doesn't working for me :(
> Animation is running always without last cell.
> I think so:
> In first case there is a '0' at the end of position values. Without
> your algorithm all 100 animations is running, than without last ( and
> there is no '0' at the end ).
> With you alhorithm animation will start before position will be a '0'
> for the third time, because _visited[0] will be true;
> I think there is some regularity here.
>
> And one more thing... I would like to start animations in some other
> function. Than it's working fine. For example in onCreate method in
> the my grid click listener: after mGameGrid.setAdapter(mAdapter). But
> I need to set timer in 200, or 500 ms for waiting for getView finish
> its work ( but even so, it's not always make it in time and I see only
> half or 2/3 of all animations running). If I call start animation
> after setAdapter without timer - it's doesn't work. Why animation is
> working fine in that case, but don't working if I run it in getView
> method, even with your algorithm?
>
> On 28 апр, 16:55, Streets Of Boston  wrote:
>
>
>
> > Don't rely on the order in which getView is called. It is not a bug.
> > It is a decision of the design of the grid/list view not to be
> > dependent on the order in which getView is called. Why getView with
> > position '0' is called three times... i don't know. *If* this is a
> > bug, it is only a peformance issue. Maybe it has to do with lay-out
> > issues (layout 'weights' are used)? Just don't rely on the order.
>
> > However, maybe you can do this instead. Below is code that does not
> > rely on the number of times getView is called nor the order in which
> > it is called:
>
> > You know that you have 100 cells. Make an array of 100 booleans as an
> > instance variable of your adapter or activity (e.g. boolean[] _visited
> > = new boolean[100]). Initially, set every element in this array to
> > false. When getView is called with a value of position, do this inside
> > of your getView method:
>
> >   ...
> >   ...
> >   _visited[position] = true;
> >   boolean allCellsAreShown = true;
> >   for (int i = 0; i < _visited.length; i++) {
> > if (!_visited[i]) {
> >   allCellsAreShown = false;
> >   break;
> > }
> >   }
> >   if (allCellsAreShown) {
> > ... // start your animation.
> >   }
> >   ...
> >   ...
>
> > (you could optimize the above code a bit... but i think you'd get the
> > idea :=) ).
>
> > On Apr 28, 9:43 am, "yarik...@gmail.com"  wrote:
>
> > > I have exactly same problem. Why do we have 102 values of position
> > > when there is only 100 cells displayed on screen?
> > > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> > > of that? Can someone from google team answer?
> > > That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> > > not answer! How do you generate position?
>
> > > On Apr 27, 9:40 pm, Illidane  wrote:
>
> > > > There is a way to make GridView without Adapter ( e.g. something
> > > > like .addView() method ) ?
>
> > > > On 27 апр, 21:38, Illidane  wrote:
>
> > > > > My GridView shows all 100 cells on the screen ( all visible at one
> > > > > moment )
> > > > > and all the animation works fine, and pretty fast ( on all 100
> > > > > elements ),
> > > > > but than begin problems with last cell.
> > > > > Animation not child-view's. Each cell is a imageView with animation on
> > > > > it.
>
> > > > > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> > > > > > It's not buggy. I use the adapters and grid/list-views in my apps 
> > > > > > and
> > > > > > they work fine. I think they are not designed for your purpose.
>
> > > > > > e.g. If your adapter has 100 elements and the grid/list-view only
> > > > > > shows about 15 at a time on the screen, the getView is called about 
> > > > > > 15
> > > > > > times. Sometimes more times, depending whether a little bit (a few
> > > > > > pixels) of the top or bottom child-view become visible or not. Then,
> > > > > > when you start scrolling, getView gets called again and again when
> > > > > > child-views become visible and others become invisible.
>
> > > > > > Also, seriously consider re-using the convertView for your grid- or
> > > > > > list-view. My experience is that i

[android-developers] WebView in 1.5 loading pages in Browser app instead of in my app

2009-04-28 Thread Kenn Min Chong

Hi there!
   So, I have this app that has a WebView object in it and basically I
used it to display websites within my app. In the previous SDK, this
works fine, the websites would appear from within my app. Now, when I
upgrade to 1.5, new websites are loaded in the Browser application
instead! Is there a way to stop this from happening?

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



[android-developers] Re: “The application xxxxxxxx (process xxxxxx) has stopped unexpectedly. Please try again .”

2009-04-28 Thread Kenn Min Chong

Hey guys!
   So i found the solution to debug this. Apparently ADB has a tool to
show the debug logs of the OS, when I did that I saw the "Out of
memory" error. Apparently, Android limits apps to use only 16megs of
memory before automatically killing it. It'd be nice though if this
error were shown more intuitively on the screen of the devices instead
of needing to find out about this via a desktop based debugger :)

On Apr 23, 1:28 pm, "Fred Grott(shareme)" 
wrote:
> Best bet is to post a log and than we can help you narrow it down
>
> On Apr 22, 7:03 pm, Kenn Min Chong  wrote:
>
> > Hi there!
> >      For some reason I can't explain, when my app runs, I will on
> > occasion get the following error message:
>
> > “The application  (process xx) has stopped unexpectedly.
> > Please try again.”
>
> > When I debug my code, it seems to break at random places that doesn't
> > make sense. On top of that I tried to surround the entire code with a
> > try/catch block just to try to catch the exception, but it doesn't
> > work either. I'm suspecting it's the OS that is producing this error
> > message but I don't know why. As far as my code goes, if there were
> > exceptions caused by it, it would've been caught by the try/catch
> > block.  Can someone shed some light here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] manipulate/generate a drawable

2009-04-28 Thread guruk

hi, is it possible to generate a drawable dynamicaly.
for example i like to place a drawable on a button.
but the design (gfx) is generated dynamicly.
is that possible and how?

thanks
chris

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



[android-developers] Re: Eclipse plugin 0.9

2009-04-28 Thread Tom Gibara
In my experience of Eclipse and how others use it, I'd say it's unusual to
have several workspaces. Most development is done in one workspace with
projects grouped into 'project sets'.

You need particular workspace specific requirements to make it worth
configuring multiple workspaces.

Tom

On Apr 28, 2009 4:52 PM, "Al Sutton"  wrote:


Can someone confirm or let me know if it's a problem with my setup where the
0.9 eclipse plugin will complain about not finding the SDK even if the
workspace has no Android projects in it?

I work on a few projects and many of them don't have Android apps involved,
so it's a little annoying to get the popup on every single workspace.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.




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



[android-developers] Re: Eclipse + cupcake + referenced projects in build path = VerifyError

2009-04-28 Thread Guillaume Perrot

Argh I deleted the first version of my topic but you had the time to
answer it :p
The right topic is located at
http://groups.google.com/group/android-developers/browse_thread/thread/5537ae10e4143240
Sorry for the double post (though the second one has less errors in
the text ;))

On 28 avr, 17:34, Inderjeet Singh  wrote:
> I ran into the same problem this morning and was hating myself for
> being a compulsive early adopter. :)
> Also, the fact that you actually have to create a device before you
> can launch anything.
>
> Anyone else figured out what is going on?
>
> Inder
>
> On Tue, Apr 28, 2009 at 8:02 AM, Guillaume Perrot
>
>  wrote:
>
> > In the previous SDK releases, we have our application cut into 3
> > android projects:
> > * Project REAL (the real android project)
> > * Project LIB1 (a non executable android project, just to make android
> > reusable classes)
> > * Project LIB2 (same as LIB1)
> > LIB1 and LIB2 are android projects rather than J2SE ones because of
> > the API they use, indeed LIB1 and LIB2 use Android classes.
> > Project REAL has LIB1 and LIB2 in its project build path in Eclipse.
>
> > In SDK 1.0 and 1.1, no problem at all when running the project REAL
> > from Eclipse, it mixes the code of the 3 projects and produces one big
> > APK with everything in it.
>
> > But now in SDK 1.5, it installs 3 different APKs on the emulator or on
> > the phone (I tested both), and the project REAL immediately crashes
> > because of a VerifyError: it does not found a class that is in LIB1.
>
> > The size of the produced APK is smaller, indeed, LIB1 and LIB2 classes
> > are not in it...
> > I tried using uses-library in the manifest like google maps library
> > but it complains at installing, we have a "missing shared library"
> > error.
> > I tried adding class folders in build path, it compiles in Eclipse but
> > we still have VerifyError.
> > Same thing if we use external class folders in build path.
>
> > The only thing that worked for me was to add an eclipse folder, which
> > is in fact a symbolic link, and to make it a source folder. But that
> > solution is not convenient for us when because we share the projects
> > in SVN and so the paths are different. Using eclipse path variables
> > can do the trick but we waste some time to configure them so it's not
> > convenient enough.
>
> > Is there a way to restore the old behavior on other android projects
> > in build path ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sdcard in avd SDK 1.5

2009-04-28 Thread nEx.Software

It should automatically use the image created during creation of the
AVD.

On Apr 28, 8:52 am, longhairedsi  wrote:
> Hello,
>
> I've been trying to figure out how to use the sdcard that was
> generated when I created the avd file for the emulator in SDK 1.5 r1.
>
> In previous SDKs I set this in the Eclipse run configurations  -sdcard
> c:\android\sd500m.img
>
> I could then access the sdcard through DDMS etc.
>
> How do i specify the sdcard that was created in the avd?
>
> Cheers
> Si
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Text in of a custom drawable

2009-04-28 Thread guruk

is there a chance to design new drawables dynamicly.

for example right now i have a calendar, each day does have a color
. now i like that its possible that each day does have a drawable
that includes three bars with different colors.

that mean i can create many drawables that fit all possible color
combinations, or i create a new drawable on the fly with the colors i
need

is that possible and how?

chris


On 2 Apr., 03:23, jeffery...@gmail.com wrote:
> You will need to extend the View you are displaying thedrawableand
> override thedrawmethod to add your custom text like this:
>
> @Override
>         public voiddraw(Canvas canvas) {
>                 super.draw(canvas);
>                 canvas.drawText("Title", x,
>                                 y, titlePaint);
>         }
>
> On Apr 1, 3:11 am, Erik H  wrote:
>
>
>
> > Hi,
>
> > I need help to add text in a customdrawable. I'm looking in tha API
> > (android.graphics...) but cannot find any way of doing this.
>
> > What I basically want is adrawablethat contains text that I can
> > change. Is this even possible today?
>
> > It must be adrawableas I use it where adrawableis required.
>
> > Thanks!
>
> > // Erik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Illidane

To Romain Guy:
Ok, I understood that you think that it's NOT a bug and that you
implement it how you want it be.
But I need to say you, that in such situation is very hard, or
sometimes is impossible to write good, stable, beauty, useful and
competitive apps for Android, not only for me, but for all Android
programmers.
And I think you know that.

On 28 апр, 18:53, Romain Guy  wrote:
> I am from the Google team (and I did implement a lot of GridView and
> ListView) and it is NOT a bug. GridView and ListView can call
> getView() out of order and more times than the number of views that
> will fit on screen, depending how the Grid/ListView is measured/laid
> out.
>
> 2009/4/28 yarik...@gmail.com :
>
>
>
>
>
>
>
> > I have exactly same problem. Why do we have 102 values of position
> > when there is only 100 cells displayed on screen?
> > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> > of that? Can someone from google team answer?
> > That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> > not answer! How do you generate position?
>
> > On Apr 27, 9:40 pm, Illidane  wrote:
> >> There is a way to make GridView without Adapter ( e.g. something
> >> like .addView() method ) ?
>
> >> On 27 апр, 21:38, Illidane  wrote:
>
> >> > My GridView shows all 100 cells on the screen ( all visible at one
> >> > moment )
> >> > and all the animation works fine, and pretty fast ( on all 100
> >> > elements ),
> >> > but than begin problems with last cell.
> >> > Animation not child-view's. Each cell is a imageView with animation on
> >> > it.
>
> >> > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> >> > > It's not buggy. I use the adapters and grid/list-views in my apps and
> >> > > they work fine. I think they are not designed for your purpose.
>
> >> > > e.g. If your adapter has 100 elements and the grid/list-view only
> >> > > shows about 15 at a time on the screen, the getView is called about 15
> >> > > times. Sometimes more times, depending whether a little bit (a few
> >> > > pixels) of the top or bottom child-view become visible or not. Then,
> >> > > when you start scrolling, getView gets called again and again when
> >> > > child-views become visible and others become invisible.
>
> >> > > Also, seriously consider re-using the convertView for your grid- or
> >> > > list-view. My experience is that it can really slow down your app if
> >> > > you just return new View instances for each child-view/cell:
> >> > > public ... getView() {
> >> > >   View view = convertView != null ? convertView : createNewView(...);
> >> > >   ...
> >> > >   ...
> >> > >   return view;
>
> >> > > }
>
> >> > > The implementation of the adapter+listviews does not need to rely on
> >> > > the order in which the getView is called. As long as it is called for
> >> > > every child-view that becomes visible.
>
> >> > > Isn't is possible to start a child-view's (cell's) animation when you
> >> > > handle it the getView(...) method?
>
> >> > > If you really want at least 100 child-views/cells to be created (i
> >> > > won't recommend it... it's a LOT), you can override the Adapter's
> >> > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
> >> > > still not sure if getView would get called in the order you want.
>
> >> > > ...
> >> > >   private static int EXPECTED_CELL_COUNT = 100;
>
> >> > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
> >> > >   public int getItemViewType(int pos) { return pos %
> >> > > EXPECTED_CELL_COUNT; }
>
> >> > > On Apr 27, 1:07 pm, Illidane  wrote:
>
> >> > > > And you think it's not a bug? where is guarantee that it will work in
> >> > > > general?
> >> > > > Where adapter takes it's magic number N?
>
> >> > > > On 27 апр, 19:56, Romain Guy  wrote:
>
> >> > > > > There is no guarantee it's going to be called N times either.
>
> >> > > > > 2009/4/27 Illidane :
>
> >> > > > > > Even with convertView problem is still same - last cell is not
> >> > > > > > animating.
> >> > > > > > And... you said WHEN getView()... I think it's no matter, matter 
> >> > > > > > HOW
> >> > > > > > MANY times getView() called.
> >> > > > > > It calls more than 100 times, whats very strange.
> >> > > > > > For the first time it's called 102 times and all animations was
> >> > > > > > working. For the second and next times it was 101, and last 
> >> > > > > > animation
> >> > > > > > was static.
> >> > > > > > I think where is some bug regularity...
>
> >> > > > > > On 27 апр, 19:31, Romain Guy  wrote:
> >> > > > > >> You should ALWAYS reuse the convertView, oherwise you're gonna 
> >> > > > > >> eat up
> >> > > > > >> memory and just slow down your app. And like I said, there is no
> >> > > > > >> guarantee on how and when getView() is called so you cannot 
> >> > > > > >> rely on it
> >> > > > > >> with your anim counter.
>
> >> > > > > >> 2009/4/27 Illidane :
>
> >> > > > > >> > I dont use convertView parametr and return new child-view.
>
> >> > > > > 

[android-developers] Re: Android Functional Testing (testing multiple activities)

2009-04-28 Thread Rick

Android functional testing across multiple activities:

Since no one has really shown how to do this, and Android really only
shows us testing a single activity,
testing more complex applications will need cross-activity testing.
How to do it?

1. Use InstrumentationTestCase
2. Use an ActivityManager to maintain the scope of the application,
allowing you to grab the activity you want.
3. Use Instrumentation to put the application in the desired state
4. Most importantly, make sure to clean up after your test, other wise
it will hang.

All android testing runs through the setUp and TearDown before each
test. So if you have a test class with 5 tests,
it will run through the set up and tear down before each test.

You might be able to get around this by implement the @BeforeClass and
@AfterClass for a global setUp and TearDown
that can be spread across the test suite, I haven't explored that yet.
Hope this helps anyone looking for this.

On Apr 17, 4:58 pm, Richard Cook  wrote:
> So I've learned a bit more about the Instrumentation, but now I am at a
> point where it HANGS if I have more than one test case running.
>
> I'm running a cross-activity functional test case using
> InstrumentationTestCase.
>
> I have to run handles for the ActivityGroup, currentActivity, and the
> activityManager.
> I also instantiate an activity monitor so I know when to wait for other
> activities to finish executing.
>
> The problem now is, I run more than one test, and the instrumentation test
> runner hangs on the second test case in the stack.
>
> Anyone!?
>
> On Fri, Apr 17, 2009 at 10:41 AM, z  wrote:
>
> > +1
>
> > On Apr 16, 8:52 am, Rick  wrote:
> > > I've been exploring the Android test package and I'm very confused on
> > > how to implement functional testing for endpoint-to-endpoint.
>
> > > Consider the example below, I have 4 activities:
> > > 1. A Contact List Activity
> > > 2. A View Contact Activity
> > > 3. An Add/Edit Contact Activity
> > > 4. A Sync Contact List activity
>
> > > I want to automate a few tests that will go through multiple test
> > > cases simulating a user experience:
> > > From launching the application, to selecting 'Add contact;' opening
> > > the add contact activity,
> > > entering data, saving it, going back to the list activity, and
> > > verifying the new contact was saved properly.
>
> > > As I understand it, ActivityInstrumentationTestCase > > Activity> and ActivityUnitTestCase, are only
> > > useful for testing single activity functionality.
>
> > > But what if I need to switch between 2 or more activities inside a
> > > single functional test case?
>
> > > Any help would be greatly appreciated.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread Romain Guy

No, you are just making assumptions about how it should work. Nowhere
does it say that it should work the way you want it to work, that's
not how it works and that's not how it will work.

2009/4/28 Illidane :
>
> To Romain Guy:
> Ok, I understood that you think that it's NOT a bug and that you
> implement it how you want it be.
> But I need to say you, that in such situation is very hard, or
> sometimes is impossible to write good, stable, beauty, useful and
> competitive apps for Android, not only for me, but for all Android
> programmers.
> And I think you know that.
>
> On 28 апр, 18:53, Romain Guy  wrote:
>> I am from the Google team (and I did implement a lot of GridView and
>> ListView) and it is NOT a bug. GridView and ListView can call
>> getView() out of order and more times than the number of views that
>> will fit on screen, depending how the Grid/ListView is measured/laid
>> out.
>>
>> 2009/4/28 yarik...@gmail.com :
>>
>>
>>
>>
>>
>>
>>
>> > I have exactly same problem. Why do we have 102 values of position
>> > when there is only 100 cells displayed on screen?
>> > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
>> > of that? Can someone from google team answer?
>> > That seems to be a bug, very annoying bug. Answer "It's not a bug" is
>> > not answer! How do you generate position?
>>
>> > On Apr 27, 9:40 pm, Illidane  wrote:
>> >> There is a way to make GridView without Adapter ( e.g. something
>> >> like .addView() method ) ?
>>
>> >> On 27 апр, 21:38, Illidane  wrote:
>>
>> >> > My GridView shows all 100 cells on the screen ( all visible at one
>> >> > moment )
>> >> > and all the animation works fine, and pretty fast ( on all 100
>> >> > elements ),
>> >> > but than begin problems with last cell.
>> >> > Animation not child-view's. Each cell is a imageView with animation on
>> >> > it.
>>
>> >> > On 27 апр, 20:43, Streets Of Boston  wrote:
>>
>> >> > > It's not buggy. I use the adapters and grid/list-views in my apps and
>> >> > > they work fine. I think they are not designed for your purpose.
>>
>> >> > > e.g. If your adapter has 100 elements and the grid/list-view only
>> >> > > shows about 15 at a time on the screen, the getView is called about 15
>> >> > > times. Sometimes more times, depending whether a little bit (a few
>> >> > > pixels) of the top or bottom child-view become visible or not. Then,
>> >> > > when you start scrolling, getView gets called again and again when
>> >> > > child-views become visible and others become invisible.
>>
>> >> > > Also, seriously consider re-using the convertView for your grid- or
>> >> > > list-view. My experience is that it can really slow down your app if
>> >> > > you just return new View instances for each child-view/cell:
>> >> > > public ... getView() {
>> >> > >   View view = convertView != null ? convertView : createNewView(...);
>> >> > >   ...
>> >> > >   ...
>> >> > >   return view;
>>
>> >> > > }
>>
>> >> > > The implementation of the adapter+listviews does not need to rely on
>> >> > > the order in which the getView is called. As long as it is called for
>> >> > > every child-view that becomes visible.
>>
>> >> > > Isn't is possible to start a child-view's (cell's) animation when you
>> >> > > handle it the getView(...) method?
>>
>> >> > > If you really want at least 100 child-views/cells to be created (i
>> >> > > won't recommend it... it's a LOT), you can override the Adapter's
>> >> > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
>> >> > > still not sure if getView would get called in the order you want.
>>
>> >> > > ...
>> >> > >   private static int EXPECTED_CELL_COUNT = 100;
>>
>> >> > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
>> >> > >   public int getItemViewType(int pos) { return pos %
>> >> > > EXPECTED_CELL_COUNT; }
>>
>> >> > > On Apr 27, 1:07 pm, Illidane  wrote:
>>
>> >> > > > And you think it's not a bug? where is guarantee that it will work 
>> >> > > > in
>> >> > > > general?
>> >> > > > Where adapter takes it's magic number N?
>>
>> >> > > > On 27 апр, 19:56, Romain Guy  wrote:
>>
>> >> > > > > There is no guarantee it's going to be called N times either.
>>
>> >> > > > > 2009/4/27 Illidane :
>>
>> >> > > > > > Even with convertView problem is still same - last cell is not
>> >> > > > > > animating.
>> >> > > > > > And... you said WHEN getView()... I think it's no matter, 
>> >> > > > > > matter HOW
>> >> > > > > > MANY times getView() called.
>> >> > > > > > It calls more than 100 times, whats very strange.
>> >> > > > > > For the first time it's called 102 times and all animations was
>> >> > > > > > working. For the second and next times it was 101, and last 
>> >> > > > > > animation
>> >> > > > > > was static.
>> >> > > > > > I think where is some bug regularity...
>>
>> >> > > > > > On 27 апр, 19:31, Romain Guy  wrote:
>> >> > > > > >> You should ALWAYS reuse the convertView, oherwise you're gonna 
>> >> > > > > >> eat up
>> >> > > 

[android-developers] Re: Screen Orientation.

2009-04-28 Thread Dianne Hackborn
Yes, for 1.5 we only support rotating to the left (the same as the rotation
on the G1).  And some of the built-in apps turn off rotation.

On Tue, Apr 28, 2009 at 8:33 AM, Troglodad  wrote:

>
> I can get my phone to rotate one way only- If I rotate the phone onto
> the left side, as though I were going to use the keyboard. Upside down
> and right side, nothing.
>
> Also, I notice that only some programs rotate- the main screen doesn't
> rotate, but the browser, messaging and notepad do.
>
>
> >
>


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

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

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



[android-developers] Re: Screen Orientation.

2009-04-28 Thread Dianne Hackborn
I don't know what to say, they certainly do in all the cases I know of.  You
must want to put together short as possible sample code showing the problem
happening; otherwise, with no way to repro (and no code to see exactly what
you are doing), I can't help any more.

On Tue, Apr 28, 2009 at 7:23 AM, jrgraf...@googlemail.com <
jrgraf...@googlemail.com> wrote:

>
> The problem for me though is that the constants returned never change
> after I set a preferred Orientation no matter how I rotate the
> Phone :/
>
> On Apr 28, 4:34 am, Dianne Hackborn  wrote:
> > getResources().getConfiguration().orientation contains the current
> > orientation, as defined by the constants described in the java docs (NOT
> the
> > SCREEN_ORIENTATION_* contantgs).
> >
> > On Mon, Apr 27, 2009 at 4:05 PM, jrgraf...@googlemail.com <
> >
> >
> >
> > jrgraf...@googlemail.com> wrote:
> >
> > > I cant seem to get current orientation via either:
> >
> > > getResources().getConfiguration().orientation
> > > or
> > > (WindowManager) getSystemService(WINDOW_SERVICE).getDefaultDisplay
> > > ().getOrientation();
> >
> > > after setting up a preferred orientation via:
> >
> > > setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
> >
> > > Is there something I am doing wrong here? Is there a different way to
> > > access the current orientation of the phone?
> >
> > > Thanks!
> >
> > > On Mar 26, 9:50 am, Amir Alagic  wrote:
> > > > int orientation = getResources().getConfiguration().orientation
> >
> > > > On Mar 25, 8:12 am, Dianne Hackborn  wrote:
> >
> > > > > Sorry I made a mistake, use getResources().getConfiguration().
> >
> > > > > On Tue, Mar 24, 2009 at 10:43 PM, for android <
> forandr...@gmail.com>
> > > wrote:
> > > > > > Does that mean from the DisplayMetrics we need to check from the
> > > height and
> > > > > > width?
> >
> > > > > > On Wed, Mar 25, 2009 at 10:55 AM, Dianne Hackborn <
> > > hack...@android.com>wrote:
> >
> > > > > >> That returns the orientation mode your activity has requested.
>  The
> > > actual
> > > > > >> current orientation is in getResources().getDisplayMetrics().
> >
> > > > > >> On Tue, Mar 24, 2009 at 10:01 PM, for android <
> forandr...@gmail.com
> > > >wrote:
> >
> > > > > >>> getRequestedOrientation()
> >
> > > > > >>> On Wed, Mar 25, 2009 at 9:34 AM, Suman  >
> > > wrote:
> >
> > > > >  Hi all...
> >
> > > > > Thanks for replies. Can any one tell me by
> which
> > > > >  method i can check the screen orientation? I mean i want to
> check
> > > > >  whether it is land-scap mode or portrait mode. Thanks in
> advance.
> >
> > > > >  Suman.
> >
> > > > > >> --
> > > > > >> Dianne Hackborn
> > > > > >> Android framework engineer
> > > > > >> hack...@android.com
> >
> > > > > >> Note: please don't send private questions to me, as I don't have
> > > time to
> > > > > >> provide private support.  All such questions should be posted on
> > > public
> > > > > >> forums, where I and others can see and answer them.
> >
> > > > > --
> > > > > Dianne Hackborn
> > > > > Android framework engineer
> > > > > hack...@android.com
> >
> > > > > Note: please don't send private questions to me, as I don't have
> time
> > > to
> > > > > provide private support.  All such questions should be posted on
> public
> > > > > forums, where I and others can see and answer them.- Hide quoted
> text -
> >
> > > > > - Show quoted text -
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
> >
>


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

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

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



[android-developers] Re: GridView and BaseAdapter position bug

2009-04-28 Thread yarik...@gmail.com

We have three times same value of pure the magical-generated position
and the official answer "it is NOT a bug". Ok, than I am Al Pacino.

Why not to post algorithm of position generating? That looks fishy...

On Apr 28, 7:44 pm, Romain Guy  wrote:
> No, you are just making assumptions about how it should work. Nowhere
> does it say that it should work the way you want it to work, that's
> not how it works and that's not how it will work.
>
> 2009/4/28 Illidane :
>
>
>
>
>
> > To Romain Guy:
> > Ok, I understood that you think that it's NOT a bug and that you
> > implement it how you want it be.
> > But I need to say you, that in such situation is very hard, or
> > sometimes is impossible to write good, stable, beauty, useful and
> > competitive apps for Android, not only for me, but for all Android
> > programmers.
> > And I think you know that.
>
> > On 28 апр, 18:53, Romain Guy  wrote:
> >> I am from the Google team (and I did implement a lot of GridView and
> >> ListView) and it is NOT a bug. GridView and ListView can call
> >> getView() out of order and more times than the number of views that
> >> will fit on screen, depending how the Grid/ListView is measured/laid
> >> out.
>
> >> 2009/4/28 yarik...@gmail.com :
>
> >> > I have exactly same problem. Why do we have 102 values of position
> >> > when there is only 100 cells displayed on screen?
> >> > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is the cause
> >> > of that? Can someone from google team answer?
> >> > That seems to be a bug, very annoying bug. Answer "It's not a bug" is
> >> > not answer! How do you generate position?
>
> >> > On Apr 27, 9:40 pm, Illidane  wrote:
> >> >> There is a way to make GridView without Adapter ( e.g. something
> >> >> like .addView() method ) ?
>
> >> >> On 27 апр, 21:38, Illidane  wrote:
>
> >> >> > My GridView shows all 100 cells on the screen ( all visible at one
> >> >> > moment )
> >> >> > and all the animation works fine, and pretty fast ( on all 100
> >> >> > elements ),
> >> >> > but than begin problems with last cell.
> >> >> > Animation not child-view's. Each cell is a imageView with animation on
> >> >> > it.
>
> >> >> > On 27 апр, 20:43, Streets Of Boston  wrote:
>
> >> >> > > It's not buggy. I use the adapters and grid/list-views in my apps 
> >> >> > > and
> >> >> > > they work fine. I think they are not designed for your purpose.
>
> >> >> > > e.g. If your adapter has 100 elements and the grid/list-view only
> >> >> > > shows about 15 at a time on the screen, the getView is called about 
> >> >> > > 15
> >> >> > > times. Sometimes more times, depending whether a little bit (a few
> >> >> > > pixels) of the top or bottom child-view become visible or not. Then,
> >> >> > > when you start scrolling, getView gets called again and again when
> >> >> > > child-views become visible and others become invisible.
>
> >> >> > > Also, seriously consider re-using the convertView for your grid- or
> >> >> > > list-view. My experience is that it can really slow down your app if
> >> >> > > you just return new View instances for each child-view/cell:
> >> >> > > public ... getView() {
> >> >> > >   View view = convertView != null ? convertView : 
> >> >> > > createNewView(...);
> >> >> > >   ...
> >> >> > >   ...
> >> >> > >   return view;
>
> >> >> > > }
>
> >> >> > > The implementation of the adapter+listviews does not need to rely on
> >> >> > > the order in which the getView is called. As long as it is called 
> >> >> > > for
> >> >> > > every child-view that becomes visible.
>
> >> >> > > Isn't is possible to start a child-view's (cell's) animation when 
> >> >> > > you
> >> >> > > handle it the getView(...) method?
>
> >> >> > > If you really want at least 100 child-views/cells to be created (i
> >> >> > > won't recommend it... it's a LOT), you can override the Adapter's
> >> >> > > getViewTypeCount() and getItemViewType(int pos). Even with this, I'm
> >> >> > > still not sure if getView would get called in the order you want.
>
> >> >> > > ...
> >> >> > >   private static int EXPECTED_CELL_COUNT = 100;
>
> >> >> > >   public int getViewTypeCount() { return EXPECTED_CELL_COUNT; }
> >> >> > >   public int getItemViewType(int pos) { return pos %
> >> >> > > EXPECTED_CELL_COUNT; }
>
> >> >> > > On Apr 27, 1:07 pm, Illidane  wrote:
>
> >> >> > > > And you think it's not a bug? where is guarantee that it will 
> >> >> > > > work in
> >> >> > > > general?
> >> >> > > > Where adapter takes it's magic number N?
>
> >> >> > > > On 27 апр, 19:56, Romain Guy  wrote:
>
> >> >> > > > > There is no guarantee it's going to be called N times either.
>
> >> >> > > > > 2009/4/27 Illidane :
>
> >> >> > > > > > Even with convertView problem is still same - last cell is not
> >> >> > > > > > animating.
> >> >> > > > > > And... you said WHEN getView()... I think it's no matter, 
> >> >> > > > > > matter HOW
> >> >> > > > > > MANY times getView() called.
> >> >> > > > > > It calls more than 100 times, whats very

[android-developers] Re: Text in of a custom drawable

2009-04-28 Thread Dianne Hackborn
Subclass from Drawable, implement your drawing, instantiate it, and give it
to the view you want to have use it.

On Tue, Apr 28, 2009 at 9:30 AM, guruk  wrote:

>
> is there a chance to design new drawables dynamicly.
>
> for example right now i have a calendar, each day does have a color
> . now i like that its possible that each day does have a drawable
> that includes three bars with different colors.
>
> that mean i can create many drawables that fit all possible color
> combinations, or i create a new drawable on the fly with the colors i
> need
>
> is that possible and how?
>
> chris
>
>
> On 2 Apr., 03:23, jeffery...@gmail.com wrote:
> > You will need to extend the View you are displaying thedrawableand
> > override thedrawmethod to add your custom text like this:
> >
> > @Override
> > public voiddraw(Canvas canvas) {
> > super.draw(canvas);
> > canvas.drawText("Title", x,
> > y, titlePaint);
> > }
> >
> > On Apr 1, 3:11 am, Erik H  wrote:
> >
> >
> >
> > > Hi,
> >
> > > I need help to add text in a customdrawable. I'm looking in tha API
> > > (android.graphics...) but cannot find any way of doing this.
> >
> > > What I basically want is adrawablethat contains text that I can
> > > change. Is this even possible today?
> >
> > > It must be adrawableas I use it where adrawableis required.
> >
> > > Thanks!
> >
> > > // Erik
> >
>


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

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

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



[android-developers] Re: Eclipse plugin 0.9

2009-04-28 Thread Al Sutton
I've got some Android apps, Some GWT + App Engine work, some Struts2 +
Hibernate work, and a couple of versions of the same project (one dev, one
release), each of which gets it's own workspace.
 
I find using separate workspaces tends to lower memory usage and it's tidier
if you're trying to work on a multiple webapps.
 
Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.



 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Tom Gibara
Sent: 28 April 2009 17:14
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Eclipse plugin 0.9



In my experience of Eclipse and how others use it, I'd say it's unusual to
have several workspaces. Most development is done in one workspace with
projects grouped into 'project sets'.

You need particular workspace specific requirements to make it worth
configuring multiple workspaces.

Tom


On Apr 28, 2009 4:52 PM, "Al Sutton"  wrote:


Can someone confirm or let me know if it's a problem with my setup where the
0.9 eclipse plugin will complain about not finding the SDK even if the
workspace has no Android projects in it?

I work on a few projects and many of them don't have Android apps involved,
so it's a little annoying to get the popup on every single workspace.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.










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



  1   2   3   >