[android-developers] Re: 1.5 compiled image?

2009-04-03 Thread Al Sutton
What OS are you planning to run the SDK on?
 
Building a Linux SDK from source isn't too difficult. As yet I haven't found
any instructions on how to build the windows one.
 
Al.

---

* Written an Android App? - List it at  http://andappstore.com/
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 Ivan Soto
Sent: 02 April 2009 21:53
To: android-developers@googlegroups.com
Subject: [android-developers] 1.5 compiled image?


Is there any 1.5 image going around for the emulator? I would like to try my
apps with onscreen keyboard.
Maybe someone is actually making nightly builds but I can't find any.

Thanks.
PS: Not sure if it's appropriate to ask in this list.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com





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



[android-developers] Re: Retrieving street info as in Google maps application

2009-04-03 Thread Pratap

anyone with any idea on the above issue?

On Mar 31, 9:35 am, Pratap ajit@gmail.com wrote:
 Hi
 I am developing a simple maps application that displays map instreet
 mode.
 I want to displaystreetname and a snapshot when a particularstreet
 is selected.
 Is it possible to get thestreetsnapshot as is displayed by the
 native maps application usingandroidAPIs.

 Also on native maps app when we select thestreeta 3D view of thestreetis 
 shown.
 How can I add this 3Dstreetview to my app.

 Kindly provide your suggestions.
--~--~-~--~~~---~--~~
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: any way to debug the service in system_server?

2009-04-03 Thread Dave Sparks

This is not the appropriate forum for this question. I suggest you try
in android-platform.

On Apr 2, 10:57 pm, Chen Yang sunsety...@gmail.com wrote:
 Resent, it seems that the thread to android-discuss is lost.

 -- Forwarded message --
 From: Chen Yang sunsety...@gmail.com
 Date: Fri, Apr 3, 2009 at 11:44 AM
 Subject: any way to debug the service in system_server?
 To: android-disc...@googlegroups.com

 I don't know whether this is the right forum for this thread. I am
 interested to know how to debug those services in system server, is
 there some known good approaches? Thanks.
 --
  Chen
--~--~-~--~~~---~--~~
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] no activitycreator on cupcake branch

2009-04-03 Thread allstars

hi
originally activitycreator is located in mydroid/developement/tools/

but i found on cupcake branch it is not there
so i would like to ask where will be activitycreator reside on
cupcake?
or is there another tools for non-Eclipse developers??

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: ANR in Album with 100% CPU usage

2009-04-03 Thread Dave Sparks

Yes, ANR's occur because the task doesn't respond quickly enough to
user input. This can be caused by a background thread hogging the CPU.

I assume you are referring to the Pictures app (which will be called
Gallery in Cupcake). We have made some improvements in Cupcake will
continue to work on improving performance. It's not an easy problem,
given the amount of data involved in a large set of thumbnails.

On Apr 2, 10:19 pm, Hank And hank.and.gr...@gmail.com wrote:
 Hi all,

 I encounter an ANR in Album. I saw from the report that the CPU usage
 is nearly 100%, in which mediaserver occupied 80+%. It looks like it
 was decoding thumbnails. My questions are:

 1. Is it possible for ANRs to happen because the CPU is really busy?
 2. Do we have plan for Album to have a more efficient way to decode
 thumbnails?

 Thanks.

 Hank
--~--~-~--~~~---~--~~
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: Why does not SoundRecoder work on G1

2009-04-03 Thread Dave Sparks

You can access it via the Messaging (SMS/MMS) application by clicking
on attach and selecting record audio. I believe there's also an app in
market that exposes a launcher icon for it.

On Apr 2, 3:36 am, david david...@gmail.com wrote:
 hi everyone,

 I can see 'Sound Recorder' under Setting/Manage Applications. But I
 can not find any entry to run it.  Please help me.

 david
--~--~-~--~~~---~--~~
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: is video recording available in V1.1?

2009-04-03 Thread Dave Sparks

AMR recording does work. Try the SoundRecorder application, which can
be accessed by using the attach function in the Messaging app.

On Apr 2, 1:01 am, ambrosehua huang.p...@zte.com.cn wrote:
 It seems that Android doesn't support AMR recording currently, which
 is actually different from audio recording
 On 4月2日, 下午3时16分, david david...@gmail.com wrote:

  Hi zeeshan,

  I also tried audio recording of AMR on G1. But I'm failed. Could you
  please share your way with me? Thanks in advance.

  david

  On Mar 26, 2:46 am, zeeshan genx...@gmail.com wrote:

   Hi Experts,

   i am looking for video recording example, it suppose to be in api-
   sample but not available
   i am wondering if 1.1 release still missing this feature?

   if it does support then in which format and where is the example

   also i am trying to figure out mp3 encoding long ago but still no
   solution
   i have recorded an audio ()which is in AMR by default, how can i
   convert it in mp3 (any external package i can use?)
--~--~-~--~~~---~--~~
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 compiled image?

2009-04-03 Thread Ivan Soto
I'm just looking for the image file. I just want to test on 1.5.
In february someone compiled cupcake and distributed the image to replace on
the emulator.
the zip contained:
ramdisk.img
system.img
userdata.img

I was looking for the same but updated. I really don't want to get into
compiling cupcake by myself.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:

  What OS are you planning to run the SDK on?

 Building a Linux SDK from source isn't too difficult. As yet I haven't
 found any instructions on how to build the windows one.

 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 *Ivan Soto
 *Sent:* 02 April 2009 21:53
 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] 1.5 compiled image?

  Is there any 1.5 image going around for the emulator? I would like to try
 my apps with onscreen keyboard.
 Maybe someone is actually making nightly builds but I can't find any.

 Thanks.
 PS: Not sure if it's appropriate to ask in this list.

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com

 


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



[android-developers] Re: how to get the first frame of a video file ?

2009-04-03 Thread Dave Sparks

It's part of the system, not a separate class file you can import.

On Apr 2, 12:12 am, Wei twc0...@gmail.com wrote:
 Hi Dave,

 Currently, I need use android.media.MediaMetadataRetriever.
 I can find MediaMetadataRetriever.java in source code but there is no
 MediaMetadataRetriever.class build to out folder.
 Where can I get the class file.
 I need to import the android.media.MediaMetadataRetriever in my test
 AP.
 Thanks~~

 -wei

 On 3月8日, 上午2時29分, Dave Sparks davidspa...@android.com wrote:

  No, we're just adding support for extracting a static thumbnail.

  What is your use case? Where does the video stream come from?

  On Mar 5, 2:06 pm, elcadar mogrif...@gmail.com wrote:

   Will you be able to extract arbitrary frames from a video stream (not
   necessarily a file)? Essentially pull a frame every few seconds from
   outbound video stream and show a little image on screen?

   On Feb 11, 11:14 pm, Dave Sparks davidspa...@android.com wrote:

There is no support for thumbnail extraction in SDK 1.0. It's coming
in Cupcake as an adjunct to video record.

On Feb 11, 7:30 am, Freepine freep...@gmail.com wrote:

 Opencore has aframeandmetadatautility, and there is also an API as
 android.media.MediaMetadataRetriever.captureFrame()
 in Java layer, but it might not be available in public SDK.

 On Wed, Feb 11, 2009 at 8:49 PM, trust_chen chen 
 trustc...@gmail.comwrote:

  how to get the firstframeof a video file ?
  Are there such APIs in OPENCORE?
   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: Why does not SoundRecoder work on G1

2009-04-03 Thread david 1
yes, I got it! many many thanks to you.

david

2009/4/3 Dave Sparks davidspa...@android.com


 You can access it via the Messaging (SMS/MMS) application by clicking
 on attach and selecting record audio. I believe there's also an app in
 market that exposes a launcher icon for it.

 On Apr 2, 3:36 am, david david...@gmail.com wrote:
  hi everyone,
 
  I can see 'Sound Recorder' under Setting/Manage Applications. But I
  can not find any entry to run it.  Please help me.
 
  david
 


--~--~-~--~~~---~--~~
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 compiled image?

2009-04-03 Thread Al Sutton
I can give you those from my build of the SDK from last night if you want. I
can't guarantee how well they'll work with an earlier SDKs emulator, but if
you promise to post your results to the list I'll send you a download URL
(once I've uploaded them)
 
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 Ivan Soto
Sent: 03 April 2009 07:33
To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


I'm just looking for the image file. I just want to test on 1.5. 

In february someone compiled cupcake and distributed the image to replace on
the emulator.
the zip contained:
ramdisk.img
system.img
userdata.img

I was looking for the same but updated. I really don't want to get into
compiling cupcake by myself.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:


What OS are you planning to run the SDK on?
 
Building a Linux SDK from source isn't too difficult. As yet I haven't found
any instructions on how to build the windows one.
 
Al.

---

* Written an Android App? - List it at  http://andappstore.com/
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 Ivan Soto
Sent: 02 April 2009 21:53
To: android-developers@googlegroups.com
Subject: [android-developers] 1.5 compiled image?


Is there any 1.5 image going around for the emulator? I would like to try my
apps with onscreen keyboard.
Maybe someone is actually making nightly builds but I can't find any.

Thanks.
PS: Not sure if it's appropriate to ask in this list.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com









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



[android-developers] Re: play video error

2009-04-03 Thread Dave Sparks

It's pretty obvious that the path to your video file is located on
your Windows workstation. You have to remember the emulator is running
Linux in an emulation of an ARM processor. It doesn't have access to
the files on your workstation. You need to copy the video file to the
SD card emulation while the emulator is running using adb push.

On Apr 2, 12:05 am, Nithin nithi...@gmail.com wrote:
 Hi to all

              Can any one tell me how to play video in emulator... I
 tried but its give error
 Code is as below..

 package com.example;
 import android.app.Activity;
 import android.graphics.PixelFormat;
 import android.net.Uri;
 import android.os.Bundle;
 import android.util.Log;
 import android.widget.MediaController;
 import android.widget.Toast;
 import android.widget.VideoView;

 public class VideoViewDemo extends Activity {

     /**
      * TODO: Set the path variable to a streaming video URL or a local
 media
      * file path.
      */
     private String path = C:\Documents and Settings\nithin\My
 Documents\Downloads\disney_256v_32a.mp4;
     private VideoView mVideoView;

     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
         setContentView(R.layout.videoview);
         mVideoView = (VideoView) findViewById(R.id.surface_view);

         if (path == ) {
             // Tell the user to provide a media file URL/path.
             Toast.makeText(
                     VideoViewDemo.this,
                     Please edit VideoViewDemo Activity, and set path
                             +  variable to your media file URL/path,
                     Toast.LENGTH_LONG).show();

         } else {

             /*
              * Alternatively,for streaming media you can use
              * mVideoView.setVideoURI(Uri.parse(URLstring));
              */
             mVideoView.setVideoPath(path);
             mVideoView.setMediaController(new MediaController(this));
             mVideoView.requestFocus();

         }
     }

 }

 Thank You in advance
 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: 1.5 compiled image?

2009-04-03 Thread Ivan Soto
That would be great. So far the previous images were working fine, again,
I'm just curious about the performance and how well the interface works with
the on screen keyboard.
I will post results as long as I find them.

Thanks in advance. :)

Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Fri, Apr 3, 2009 at 12:38 AM, Al Sutton a...@funkyandroid.com wrote:

  I can give you those from my build of the SDK from last night if you
 want. I can't guarantee how well they'll work with an earlier SDKs emulator,
 but if you promise to post your results to the list I'll send you a download
 URL (once I've uploaded them)

 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 *Ivan Soto
 *Sent:* 03 April 2009 07:33
 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] Re: 1.5 compiled image?

 I'm just looking for the image file. I just want to test on 1.5.
 In february someone compiled cupcake and distributed the image to replace
 on the emulator.
 the zip contained:
 ramdisk.img
 system.img
 userdata.img

 I was looking for the same but updated. I really don't want to get into
 compiling cupcake by myself.

 Thanks!

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com



 On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:

  What OS are you planning to run the SDK on?

 Building a Linux SDK from source isn't too difficult. As yet I haven't
 found any instructions on how to build the windows one.

 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 *Ivan Soto
 *Sent:* 02 April 2009 21:53
 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] 1.5 compiled image?

   Is there any 1.5 image going around for the emulator? I would like to
 try my apps with onscreen keyboard.
 Maybe someone is actually making nightly builds but I can't find any.

 Thanks.
 PS: Not sure if it's appropriate to ask in this list.

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com



 


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



[android-developers] Re: alternative to sms manager

2009-04-03 Thread jayesh

Hi Sree,

SMS client will take that SMS, but you can just delete that SMS from
SMS client, and allow your application to catch that sms and put that
in your application,

I know this is bit round of work, but i dont have any other option for
this,

Other thing you can implement is that you can have broadcast receiver
in your application for delete functinality from SMS client,

Hope you got the clue from this,

Keep d spirit up
Jayesh

On Apr 2, 5:47 pm, sree sreehari.vad...@googlemail.com wrote:
 Hi

 I want to send a message to only specific application in other device
 but i dont want SMS client to pick that.
 How is it possible?

 Thanks
 Sree
--~--~-~--~~~---~--~~
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 compiled image?

2009-04-03 Thread Al Sutton
I'll upload them to a server and send you the URL .
 
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 Ivan Soto
Sent: 03 April 2009 07:43
To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


That would be great. So far the previous images were working fine, again,
I'm just curious about the performance and how well the interface works with
the on screen keyboard. 

I will post results as long as I find them.

Thanks in advance. :)

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:38 AM, Al Sutton a...@funkyandroid.com wrote:


I can give you those from my build of the SDK from last night if you want. I
can't guarantee how well they'll work with an earlier SDKs emulator, but if
you promise to post your results to the list I'll send you a download URL
(once I've uploaded them)
 
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 Ivan Soto

Sent: 03 April 2009 07:33 

To: android-developers@googlegroups.com

Subject: [android-developers] Re: 1.5 compiled image?


I'm just looking for the image file. I just want to test on 1.5. 

In february someone compiled cupcake and distributed the image to replace on
the emulator.
the zip contained:
ramdisk.img
system.img
userdata.img

I was looking for the same but updated. I really don't want to get into
compiling cupcake by myself.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:


What OS are you planning to run the SDK on?
 
Building a Linux SDK from source isn't too difficult. As yet I haven't found
any instructions on how to build the windows one.
 
Al.

---

* Written an Android App? - List it at  http://andappstore.com/
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 Ivan Soto
Sent: 02 April 2009 21:53
To: android-developers@googlegroups.com
Subject: [android-developers] 1.5 compiled image?


Is there any 1.5 image going around for the emulator? I would like to try my
apps with onscreen keyboard.
Maybe someone is actually making nightly builds but I can't find any.

Thanks.
PS: Not sure if it's appropriate to ask in this list.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com











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



[android-developers] How to hide an Activity

2009-04-03 Thread Jiang
Hello guys.
Two activities exist simultaneously, when some event occurs, I want to make one 
activity showing and another hiding without close. 

In other words, I want to switch between two activities without closing, I 
tried to hide activity but no such interface is provided, how can I implement 
this feature? 


Thanks.
-Jiang



  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: is video recording available in V1.1?

2009-04-03 Thread david 1
Yes, by your way, I just experienced it already. Thanks a lot.

And another question, the default format being recorded is AMR. Is it
possible to replace it with another one, e.g. MP3 or QCELP? Frankly
speaking, I want to let OpenCore support recording qcelp which is just one
type of audio format.
Could you please give me some clues about it, or what should I prepare or
pay attention to? A summarizing info is also appreciated.  Thanks in
advanced.

david

2009/4/3 Dave Sparks davidspa...@android.com


 AMR recording does work. Try the SoundRecorder application, which can
 be accessed by using the attach function in the Messaging app.

 On Apr 2, 1:01 am, ambrosehua huang.p...@zte.com.cn wrote:
  It seems that Android doesn't support AMR recording currently, which
  is actually different from audio recording
  On 4月2日, 下午3时16分, david david...@gmail.com wrote:
 
   Hi zeeshan,
 
   I also tried audio recording of AMR on G1. But I'm failed. Could you
   please share your way with me? Thanks in advance.
 
   david
 
   On Mar 26, 2:46 am, zeeshan genx...@gmail.com wrote:
 
Hi Experts,
 
i am looking for video recording example, it suppose to be in api-
sample but not available
i am wondering if 1.1 release still missing this feature?
 
if it does support then in which format and where is the example
 
also i am trying to figure out mp3 encoding long ago but still no
solution
i have recorded an audio ()which is in AMR by default, how can i
convert it in mp3 (any external package i can use?)
 


--~--~-~--~~~---~--~~
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 use TextAppearence in Code without styleable?

2009-04-03 Thread Iroid

Hello All,
I am trying to migrate from SDK 1.0 to SDK 1.1
for this i have to remove all the references of R.Styleable.  from my
code.
While working on this - I am facing two problems:
Problem 1:
I have created one attrs.xml and declaring attributes there which
intern referring to android attributes. as mentioned in below sample:
 declare-styleable name=Gallery1
attr name=android:galleryItemBackground /
 /declare-styleable
But I do not know how to do it for arrays like TextAppearence which
contains array of attributes :(
Problem 2:
I have to use these resources in different application through:
appContext = context.createPackageContext(package_name,
Context.CONTEXT_IGNORE_SECURITY);
appContext.getResources().
this is again a problem as class Resources does not provide any
method
to retrieve array by passing the name.

I am new to Android UI, please help as not able to proceed.

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



[android-developers] Re: Why does not SoundRecoder work on G1

2009-04-03 Thread david 1
As it is known, the default format to be recorded is AMR. Is it to possible
to replace it with another one, e.g. mp3 or qcelp? Frankly speaking, I want
to let OpenCore support recording qcelp which is just one type of audio
format.
Could you please give me some clues about it, or what should I prepare or
pay attention to? A summarizing info is also appreciated.  Many thanks in
advance.

I've issue this question at
https://mail.google.com/mail/?hl=enzx=1mf4sjv3oovloshva=1#starred/1203efc288afc0b5.
I'm sorry if it trouble you again. Please reply it just here. Thanks again.

david

2009/4/3 Dave Sparks davidspa...@android.com


 You can access it via the Messaging (SMS/MMS) application by clicking
 on attach and selecting record audio. I believe there's also an app in
 market that exposes a launcher icon for it.

 On Apr 2, 3:36 am, david david...@gmail.com wrote:
  hi everyone,
 
  I can see 'Sound Recorder' under Setting/Manage Applications. But I
  can not find any entry to run it.  Please help me.
 
  david
 


--~--~-~--~~~---~--~~
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: Recording Audio

2009-04-03 Thread david 1
hi Ben, by using you code, I encountered the problem, “The application
audiorecorder(process com.david.android.audiorecorder) has stopped
unexpectedly. Please try again”.

My audiorecoder class looks like as:

import android.app.Activity;
import android.os.Bundle;
//importing yours
…

public class audiorecorder extends Activity {
//then following your codes
…
}

Below is the Logcat info:

D/AndroidRuntime( 815):  AndroidRuntime START 
D/AndroidRuntime( 815): CheckJNI is ON
D/AndroidRuntime( 815): — registering native functions —
I/jdwp ( 815): received file descriptor 25 from ADB
I/ActivityManager( 56): Starting activity: Intent { flags=0×1000
comp={com.david.android.audiorecorder/com.david.android.audiorecorder.audiorecorder}
}
I/ActivityManager( 56): Start proc com.david.android.audiorecorder for
activity com.david.android.audiorecorder/.audiorecorder: pid=824 uid=10040
gids={}
D/AndroidRuntime( 815): Shutting down VM
D/dalvikvm( 815): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 815): DestroyJavaVM shutting VM down
D/dalvikvm( 815): HeapWorker thread shutting down
D/dalvikvm( 815): HeapWorker thread has shut down
D/jdwp ( 815): JDWP shutting down net…
D/jdwp ( 815): +++ peer disconnected
I/dalvikvm( 815): Debugger has detached; object registry had 1 entries
D/dalvikvm( 815): VM cleaning up
D/dalvikvm( 815): LinearAlloc 0×0 used 594756 of 4194304 (14%)
I/jdwp ( 824): received file descriptor 10 from ADB
D/dalvikvm( 824): newInstance failed: no ()
D/AndroidRuntime( 824): Shutting down VM
W/dalvikvm( 824): threadid=3: thread exiting with uncaught exception
(group=0×4000fe68)
E/AndroidRuntime( 824): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 824): java.lang.RuntimeException: Unable to instantiate
activity
ComponentInfo{com.david.android.audiorecorder/com.david.android.audiorecorder.audiorecorder}:
java.lang.InstantiationException:
com.david.android.audiorecorder.audiorecorder
E/AndroidRuntime( 824): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2082)
E/AndroidRuntime( 824): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2172)
E/AndroidRuntime( 824): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
E/AndroidRuntime( 824): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1586)
E/AndroidRuntime( 824): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 824): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 824): at
android.app.ActivityThread.main(ActivityThread.java:3790)
E/AndroidRuntime( 824): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 824): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 824): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
E/AndroidRuntime( 824): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:503)
E/AndroidRuntime( 824): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 824): Caused by: java.lang.InstantiationException:
com.david.android.audiorecorder.audiorecorder
E/AndroidRuntime( 824): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 824): at java.lang.Class.newInstance(Class.java:1458)
E/AndroidRuntime( 824): at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime( 824): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
E/AndroidRuntime( 824): … 11 more
I/Process ( 56): Sending signal. PID: 824 SIG: 3
I/dalvikvm( 824): threadid=7: reacting to signal 3
I/dalvikvm( 824): Wrote stack trace to ‘/data/anr/traces.txt’
W/InputManagerService( 56): Starting input on non-focused client
android.view.inputmethod.inputmethodmanage...@43704540 (uid=1000 pid=56)
W/InputManagerService( 56): Ignoring focus gain of:
android.view.inputmethod.inputmethodmanage...@43704540
W/ActivityManager( 56): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 56): Activity idle timeout for HistoryRecord{43852e68
{com.david.android.audiorecorder/com.david.android.audiorecorder.audiorecorder}}
D/dalvikvm( 100): GC freed 1763 objects / 93784 bytes in 135ms
I/Process ( 824): Sending signal. PID: 824 SIG: 9
I/ActivityManager( 56): Process com.david.android.audiorecorder (pid 824)
has died.
D/InputManagerService( 56): hide the small icon for the input method
V/ActivityThread( 100): Resuming ActivityRecord{436cc620
token=android.os.binderpr...@436cc0b0{com.android.launcher/com.android.launcher.Launcher}}
with isForward=false

I’m sorry if this mess-like info toubles again because I issued it at
https://mail.google.com/mail/?hl=enzx=1mf4sjv3oovloshva=1#starred/11fd8b68c28f154b.
Could your please help me figure out what’s the real reason causing this
problem? Thanks a lot.

david


2009/3/12 benmccann benjamin.j.mcc...@gmail.com


 Finally got it figured out:
 http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/

 On Mar 9, 

[android-developers] Cupcake availability?

2009-04-03 Thread arnouf

Hi all,

Do we have more information about the availability of the Android SDK
cupcake version?

A first phone running on Cupcake should be available this month in
France and it should be great to have a SDK exactly the same :)

Rgds
--~--~-~--~~~---~--~~
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] Definite need for a Cupcake SDK release details.

2009-04-03 Thread Al Sutton

I've just run up cupcake emulator images in the 1.1 SDK emulator under
windows and seen something that makes me very nervous about cupcake.

Under 1.0, 1.1, and on the G1 the password entry page of one of my companies
apps looks as shown in the far left hand image at;

http://www.funkyexpenses.com/

Under Cupcake it looks like;

http://www.funkyexpenses.com/password-cupcake.png

Which is very different and would make it hard for a user to use.

To answer the obvious questions;

1. It has a virtual keypad because users asked for it. When cupcake comes
they may not want it any more, but for now they do.

2. I know that cupcake is a work in progress, but we're in the month when
Cupcake is suppose to be shipping on devices, so clearly broken backwards
compatibility could be an issue (yes, I know Vodafone have told some people
it'll be 1st of May, but that still means it'll get out to the distributors
this month).

3. The dialogue is created from a series of Buttons in a horizontal
LinearLayout all in a vertical Linear layout. This may not be the best way
to do it, but it works on 1.0 so I would expect it to work on cupcake.

So now, more than ever, I strongly believe we need an SDK a few weeks ahead
of the consumer device release so we can check to see if things like this
are just anomalies in the public branch and are fixed in the full release,
or if there may be some reworking needed of our apps.

Al.

P.S. for those that are interested, the 1.5 images on the 1.0/1.1 emulator
currently don't have working network access.

---

* 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: Cupcake availability?

2009-04-03 Thread Al Sutton

At the moment it would appear that you need to build your own Linux cupcake
SDK and Windows cupcake SDKs aren't available and there aren't any
instructions on how to make one.

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 arnouf
Sent: 03 April 2009 08:38
To: Android Developers
Subject: [android-developers] Cupcake availability?


Hi all,

Do we have more information about the availability of the Android SDK
cupcake version?

A first phone running on Cupcake should be available this month in France
and it should be great to have a SDK exactly the same :)

Rgds



--~--~-~--~~~---~--~~
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: Definite need for a Cupcake SDK release details.

2009-04-03 Thread Romain Guy

The layout is actually working.

However, Cupcake has new assets for buttons (and other widgets) and it
happens that the minimum width of the buttons has changed. I don't
know how you set up your layout but it looks like you were relying on
that minimum size to get all the buttons aligned (which would be bad
since such a layout would break anyway on devices with different
resolutions and/or densities, but that's another topic.)

On Fri, Apr 3, 2009 at 12:50 AM, Al Sutton a...@funkyandroid.com wrote:

 I've just run up cupcake emulator images in the 1.1 SDK emulator under
 windows and seen something that makes me very nervous about cupcake.

 Under 1.0, 1.1, and on the G1 the password entry page of one of my companies
 apps looks as shown in the far left hand image at;

 http://www.funkyexpenses.com/

 Under Cupcake it looks like;

 http://www.funkyexpenses.com/password-cupcake.png

 Which is very different and would make it hard for a user to use.

 To answer the obvious questions;

 1. It has a virtual keypad because users asked for it. When cupcake comes
 they may not want it any more, but for now they do.

 2. I know that cupcake is a work in progress, but we're in the month when
 Cupcake is suppose to be shipping on devices, so clearly broken backwards
 compatibility could be an issue (yes, I know Vodafone have told some people
 it'll be 1st of May, but that still means it'll get out to the distributors
 this month).

 3. The dialogue is created from a series of Buttons in a horizontal
 LinearLayout all in a vertical Linear layout. This may not be the best way
 to do it, but it works on 1.0 so I would expect it to work on cupcake.

 So now, more than ever, I strongly believe we need an SDK a few weeks ahead
 of the consumer device release so we can check to see if things like this
 are just anomalies in the public branch and are fixed in the full release,
 or if there may be some reworking needed of our apps.

 Al.

 P.S. for those that are interested, the 1.5 images on the 1.0/1.1 emulator
 currently don't have working network access.

 ---

 * 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.



 




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

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

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



[android-developers] Re: SQLite functions - how to use them?

2009-04-03 Thread sirius

Thanks all of you! That was really helpful!

Took me some time though to find out how to run the SQL statements
from inside of Java, but this is how I did it:

SQLiteStatement r = db.compileStatement(SELECT count(*) FROM  +
TABLE_NAME);
long result = r.simpleQueryForLong();
--~--~-~--~~~---~--~~
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: Definite need for a Cupcake SDK release details.

2009-04-03 Thread Al Sutton

Romain,

I accept that it may not have been the best way of doing it, but my main
point is that many developers have absolutely no way of checking for
problems like this.

Now I am fortunate in that my company has a Linux machine that I can
download and build the SDK on, but I suspect there are many developers who
are either coding on Windows and don't have a spare machine to install Linux
on and build a cupcake SDK, or may not have the resources to download the
sources from git and run a full build.

Even I can't fully test my apps because the Linux box is a headless server,
and running the cupcake emulator images in the 1.1 SDK emulator installed on
the Windows desktops we have here does not bring networking up.

So please, please, please, can we have either a windows SDK, a method of
building a windows SDK, or something that will let us test our apps in
cupcake.

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 Romain Guy
Sent: 03 April 2009 08:58
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Definite need for a Cupcake SDK  release
details.


The layout is actually working.

However, Cupcake has new assets for buttons (and other widgets) and it
happens that the minimum width of the buttons has changed. I don't know how
you set up your layout but it looks like you were relying on that minimum
size to get all the buttons aligned (which would be bad since such a layout
would break anyway on devices with different resolutions and/or densities,
but that's another topic.)

On Fri, Apr 3, 2009 at 12:50 AM, Al Sutton a...@funkyandroid.com wrote:

 I've just run up cupcake emulator images in the 1.1 SDK emulator under 
 windows and seen something that makes me very nervous about cupcake.

 Under 1.0, 1.1, and on the G1 the password entry page of one of my 
 companies apps looks as shown in the far left hand image at;

 http://www.funkyexpenses.com/

 Under Cupcake it looks like;

 http://www.funkyexpenses.com/password-cupcake.png

 Which is very different and would make it hard for a user to use.

 To answer the obvious questions;

 1. It has a virtual keypad because users asked for it. When cupcake 
 comes they may not want it any more, but for now they do.

 2. I know that cupcake is a work in progress, but we're in the month 
 when Cupcake is suppose to be shipping on devices, so clearly broken 
 backwards compatibility could be an issue (yes, I know Vodafone have 
 told some people it'll be 1st of May, but that still means it'll get 
 out to the distributors this month).

 3. The dialogue is created from a series of Buttons in a horizontal 
 LinearLayout all in a vertical Linear layout. This may not be the best 
 way to do it, but it works on 1.0 so I would expect it to work on cupcake.

 So now, more than ever, I strongly believe we need an SDK a few weeks 
 ahead of the consumer device release so we can check to see if things 
 like this are just anomalies in the public branch and are fixed in the 
 full release, or if there may be some reworking needed of our apps.

 Al.

 P.S. for those that are interested, the 1.5 images on the 1.0/1.1 
 emulator currently don't have working network access.

 ---

 * 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.



 




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

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




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



[android-developers] Re: create an image on the fly and assign it to a button

2009-04-03 Thread Peli

I guess what you are looking for is a stateful drawable.

Here is a sample code:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/drawable/btn_check.xml;hb=master

The drawable is an xml file, which says which png file should be used
depending on whether the button is pressed or not, selected, ...

Probably someone else knows a better tutorial for stateful drawables?

Peli
www.openintents.org

On Apr 2, 11:01 pm, guruk ilovesi...@gmail.com wrote:
 a complete redesign... :) for sure always a nice idea.. just not
 practical now.

 #1 what you mean with view#setbackgroundcolor().. than I can just
 change to on color...
 thats how i already do.. or how do you mean... small example somewhere
 would be helpful.

 #2 come one.. i dont like to shoot with canons on birds .. there have
 to be something more
 simple

 #3 ... thats what i am thinking about... to create a set of
 backgrounds that include all options..
 hmmm.. but for that i thought i find a more pro solution #1 sounds
 best till now if someone
 show me how to add a view on a button.

 still any small example is most welcome.. even if its lets say in the
 api demo or any other
 source...

 whats about the idea from Dianne.. with the Bitmapdrawable.. i was
 reading something they
 are also stretchable.

 also... thanks.. just for any support you already gave its a good
 start :)

 greets
 chris

 On Apr 2, 11:22 pm, Mark Murphy mmur...@commonsware.com wrote:

   so any other ideas?

  Idea #1: use View#setBackgroundColor()

  Idea #2: switch to Canvas and 2D graphics, or OpenGL, or something with
  greater flexibility, instead of trying to work within the View hierarchy

  Idea #3: redesign your application to only need a handful of colors, and
  hand-create backgrounds for those, embedded as nine-patch drawables in
  your app

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android 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: Looking for a few co developers

2009-04-03 Thread Peli

For what you have in mind, one probably would start from the available
open source Android applications, like the SMS application, to get a
quick start, and modify those.

If you are thinking of providing intents, probably you could present
your idea in our developer's group as well: We have already a couple
of applications that communicate via open intents, and we are always
interested in expanding the range of applications that use or provide
intents.

Here is our group:
http://groups.google.com/group/openintents
http://code.google.com/p/openintents/
www.openintents.org

Peli
www.openintents.org


On Apr 2, 11:23 pm, Seer gilligan.ch...@gmail.com wrote:
 Hi all,
 I am looking for some fellow developers to build a few applications
 that work together to allow the android phone to take advantage of
 cheap telephony services provided over the internet. These are sms,
 voip, calling cards and similar such services.

 I have been investigating this quite a bit and developing an app to
 work with PennyTel but i have discovered an issue with the Android
 OS.  Android is not designed to let you replace low level systems in
 your app and there for there is no way to capture out going sms etc.
 This means that to write an app that sends all out going sms via
 pennytel is impossible and that the only way around this is to write
 your own sms client like ChompSMS and i am sure this will apply to
 other parts of the phone as well.

 What i am looking to do is make a reusable system that uses intents to
 do things.  A complete sms application that uses an intent to send the
 sms so that more sms providers can be added later, a dialer and
 outgoing call system that will fire an event for another app to make
 the call etc.

 What I want is sever apps that use intents not just to open their app
 but also to choose the outgoing their service uses. personally i want
 to write one of the outgoing paths and i am looking for some
 developers who would be interested in writing the more front end apps
 like the dialer and sms applications.

 If anyone is interested let me know as it is just too much work for
 one person and i am sure your apps will be used by many people as more
 and more people could right services they could be hooked into.

 Regards,

 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: Definite need for a Cupcake SDK release details.

2009-04-03 Thread Al Sutton

I appreciate the responses you've given and understand you're giving it your
best efforts, but from this side of the fence we've see no movement and no
solid commitment. Surely it's not too much to ask for a nightly build of the
SDK and/or emulator images to be posted somewhere?, I'd do it myself if I
thought that my bandwidth bill wouldn't hit the roof.

Al.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
Sent: 03 April 2009 09:17
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Definite need for a Cupcake SDK  release
details.


I did not say otherwise but the best I can do right now is guide you and
help you solve your issue.

We are aware of what you're saying and we understand. Repeating it over and
over will not, unfortunately, make things happen differently.
Believe it or not, we heard you the first time. (And we were even smart
enough to think about it ourselves ;-))

I cannot, at the moment, give you more information about the SDK but we're
working hard on having one available as soon as possible.

On Fri, Apr 3, 2009 at 1:12 AM, Al Sutton a...@funkyandroid.com wrote:

 Romain,

 I accept that it may not have been the best way of doing it, but my 
 main point is that many developers have absolutely no way of checking 
 for problems like this.

 Now I am fortunate in that my company has a Linux machine that I can 
 download and build the SDK on, but I suspect there are many developers 
 who are either coding on Windows and don't have a spare machine to 
 install Linux on and build a cupcake SDK, or may not have the 
 resources to download the sources from git and run a full build.

 Even I can't fully test my apps because the Linux box is a headless 
 server, and running the cupcake emulator images in the 1.1 SDK 
 emulator installed on the Windows desktops we have here does not bring
networking up.

 So please, please, please, can we have either a windows SDK, a method 
 of building a windows SDK, or something that will let us test our apps 
 in cupcake.

 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 Romain Guy
 Sent: 03 April 2009 08:58
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Definite need for a Cupcake SDK  
 release details.


 The layout is actually working.

 However, Cupcake has new assets for buttons (and other widgets) and it 
 happens that the minimum width of the buttons has changed. I don't 
 know how you set up your layout but it looks like you were relying on 
 that minimum size to get all the buttons aligned (which would be bad 
 since such a layout would break anyway on devices with different 
 resolutions and/or densities, but that's another topic.)

 On Fri, Apr 3, 2009 at 12:50 AM, Al Sutton a...@funkyandroid.com wrote:

 I've just run up cupcake emulator images in the 1.1 SDK emulator 
 under windows and seen something that makes me very nervous about
cupcake.

 Under 1.0, 1.1, and on the G1 the password entry page of one of my 
 companies apps looks as shown in the far left hand image at;

 http://www.funkyexpenses.com/

 Under Cupcake it looks like;

 http://www.funkyexpenses.com/password-cupcake.png

 Which is very different and would make it hard for a user to use.

 To answer the obvious questions;

 1. It has a virtual keypad because users asked for it. When cupcake 
 comes they may not want it any more, but for now they do.

 2. I know that cupcake is a work in progress, but we're in the month 
 when Cupcake is suppose to be shipping on devices, so clearly broken 
 backwards compatibility could be an issue (yes, I know Vodafone have 
 told some people it'll be 1st of May, but that still means it'll get 
 out to the distributors this month).

 3. The dialogue is created from a series of Buttons in a horizontal 
 LinearLayout all in a vertical Linear layout. This may not be the 
 best way to do it, but it works on 1.0 so I would expect it to work on
cupcake.

 So now, more than ever, I strongly believe we need an SDK a few weeks 
 ahead of the consumer device release so we can check to see if things 
 like this are just anomalies in the public branch and are fixed in 
 the full release, or if there may be some reworking needed of our apps.

 Al.

 P.S. for those that are interested, the 1.5 images on the 1.0/1.1 
 emulator currently don't have working network access.

 ---

 * Written an Android App? - List it at 

[android-developers] Re: Definite need for a Cupcake SDK release details.

2009-04-03 Thread Mariano Kamp
Hey Al,
  I actually think the keyboard layout has a nice curve to it ;-) You should
sell it as a feature.

Cheers,
Mariano

On Fri, Apr 3, 2009 at 9:58 AM, Romain Guy romain...@google.com wrote:


 The layout is actually working.

 However, Cupcake has new assets for buttons (and other widgets) and it
 happens that the minimum width of the buttons has changed. I don't
 know how you set up your layout but it looks like you were relying on
 that minimum size to get all the buttons aligned (which would be bad
 since such a layout would break anyway on devices with different
 resolutions and/or densities, but that's another topic.)

 On Fri, Apr 3, 2009 at 12:50 AM, Al Sutton a...@funkyandroid.com wrote:
 
  I've just run up cupcake emulator images in the 1.1 SDK emulator under
  windows and seen something that makes me very nervous about cupcake.
 
  Under 1.0, 1.1, and on the G1 the password entry page of one of my
 companies
  apps looks as shown in the far left hand image at;
 
  http://www.funkyexpenses.com/
 
  Under Cupcake it looks like;
 
  http://www.funkyexpenses.com/password-cupcake.png
 
  Which is very different and would make it hard for a user to use.
 
  To answer the obvious questions;
 
  1. It has a virtual keypad because users asked for it. When cupcake comes
  they may not want it any more, but for now they do.
 
  2. I know that cupcake is a work in progress, but we're in the month when
  Cupcake is suppose to be shipping on devices, so clearly broken backwards
  compatibility could be an issue (yes, I know Vodafone have told some
 people
  it'll be 1st of May, but that still means it'll get out to the
 distributors
  this month).
 
  3. The dialogue is created from a series of Buttons in a horizontal
  LinearLayout all in a vertical Linear layout. This may not be the best
 way
  to do it, but it works on 1.0 so I would expect it to work on cupcake.
 
  So now, more than ever, I strongly believe we need an SDK a few weeks
 ahead
  of the consumer device release so we can check to see if things like this
  are just anomalies in the public branch and are fixed in the full
 release,
  or if there may be some reworking needed of our apps.
 
  Al.
 
  P.S. for those that are interested, the 1.5 images on the 1.0/1.1
 emulator
  currently don't have working network access.
 
  ---
 
  * 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.
 
 
 
  
 



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

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

 


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



[android-developers] I want run my application in background, with Service component

2009-04-03 Thread jj

Hello
I want run my application in background, with  Service
component,
If the application is running in background then there should be icon
of application, so when user click on icon the application should come
in fore ground.
   Is this possible in Android, anybody having suggestions plz
welcome.
   There is provision of Notification Manager for icon, but it is not
reacting to user events. Is there any other way to this.

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: Android Physics Engine

2009-04-03 Thread Mariano Kamp
Anton, thanks. Very interesting.
On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:


Check out
 http://android-developers.blogspot.com/2009/02/track-memory-allocations.html

Romain Guy points out in this post that the android garbage
 collector cannot optimize small short lived objects.  These are
 exactly the sort of objects that could be created in a physics engine
 when it needs to generate dynamic collision constraints.  A good
 solution in this case is to use a pool of constraint objects because
 they are all going to be the same size/object.  The best solution in
 my mind would be for the compiler to do escape analysis on the objects
 and stack allocate them when it sees that they will never escape the
 function.  I have been told that the Java byte code can't reference an
 object on the stack.  It's possible that the Dalvik byte code can, I
 don't know.

I don't have a reference for this, but I assume that Dalvik's
 inability to optimize small short lived object comes from the fact
 that it uses a mark and sweep GC.  On all of my profiling, I see the
 GC take at least 100ms to run.  For a game that means you miss from
 three to 10 frames of animation and it makes for a pretty noticeable
 hick up.  And I don't think it's my application that is causing the
 garbage collector to fire.  Unless the OpenGL ES calls do some memory
 allocation, which is entirely possible.  I realize that any background
 task could move to the run queue and take some time away from my
 engine, it just happens to be the garbage collector most of the
 time.  :)

So the result is that the Garbage collector is problematic for me
 in two ways.  First, it's not optimized to deal with the sort of small
 objects that tend to make for good encapsulations of mathematical
 types (like Fixed point number classes or Vector or Matrix classes).
 And secondly it takes a long time to run when it does garbage collect,
 resulting in dropped frames.

-Anton

 On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
  It's maybe a bit off topic, but how do you know that Android's gc is
  rudimentary? Have you got a link handy?
  I only found this:
 http://developer.android.com/guide/practices/design/performance.html
 
  On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com wrote:
 
  Shaun, thanks for checking it out.  Yah, I agree that the real
   complexity of a physics engine comes from joints and contact
   constraints.  The constraints in my demo are simple minimum distance
   constraints.  I have a 2D rigid body physics engine that I'm thinking
   more and more about porting over to Android as well.  This demo was
   more of a calibration for myself to see how much computation I can do,
   and what optimizations lead to the largest improvements.  I'll
   probably turn it into a fun toy for the Market and then look into
   rewriting my rigid body engine for Android.
 
  Reading through Simpull I noticed that you allocate a new Vector3f
   in your Verlet update routine.  I think that will be a killer on the
   Android platform because of it's rudimentary garbage collector and
   limited RAM.  My solution was to allocate an array of fixed point
   numbers, four per ball.  Effectively a vector pool that didn't require
   any management because the number of balls never changed.
 
   On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
I took a look at Anton's demo on a G1 device, and I was glad to see
the integration of accelerometer as it really added value.  I assume
the calculations for collision detection and response are fairly
basic, which allows for that performance.
 
Simpull will also provide good performance for a scene of that nature
(all verlet, no joints).  At least I believe it will.  The point
 where
simpull becomes slow is when a more complex scene is in play with 10s
of objects with many joints connecting some of them.  Since the
 engine
is all verlet and no rigid body dynamics, joints are one way to
acheive a similar result, but with a very bad performance hit due to
all the new temporary objects and new calculations.
 
I would be super impressed to see a demo like Anton's with rigid body
dynamics involved with at least some rectangles, if not other
 polygons
and perhaps a joint or two.  That is where the performance degrades
quickly in my experience.
 
On Apr 1, 2:45 pm, mscwd01 mscw...@gmail.com wrote:
 
 Thanks Lajos for pointing APE out, I hadn't heard of it until now.
 
 Unfortunately your link to your Android port is broken, can you
 mend
 it as I dont fancy spending another hour porting another library to
 Android :D
 
 Thanks
 
 On Mar 31, 9:50 pm, lkelemen tridc...@gmail.com wrote:
 
  Hello everyone,
 
  I was also disappointed with jbox2d's performance so I checked
 APE
  (Actionscript Physics Engine) fromhttp://www.cove.org/ape/.
  It was converted to 

[android-developers] Re: Definite need for a Cupcake SDK release details.

2009-04-03 Thread Al Sutton
It's only when you scale the image down to the size of the G1 screen do you
see that although it may look nice it's really not usable so it'd guarantee
a few unpleasant comments :).
 
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 Mariano Kamp
Sent: 03 April 2009 10:01
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Definite need for a Cupcake SDK  release
details.


Hey Al, 

  I actually think the keyboard layout has a nice curve to it ;-) You should
sell it as a feature.

Cheers,
Mariano

On Fri, Apr 3, 2009 at 9:58 AM, Romain Guy romain...@google.com wrote:



The layout is actually working.

However, Cupcake has new assets for buttons (and other widgets) and it
happens that the minimum width of the buttons has changed. I don't
know how you set up your layout but it looks like you were relying on
that minimum size to get all the buttons aligned (which would be bad
since such a layout would break anyway on devices with different
resolutions and/or densities, but that's another topic.)


On Fri, Apr 3, 2009 at 12:50 AM, Al Sutton a...@funkyandroid.com wrote:

 I've just run up cupcake emulator images in the 1.1 SDK emulator under
 windows and seen something that makes me very nervous about cupcake.

 Under 1.0, 1.1, and on the G1 the password entry page of one of my
companies
 apps looks as shown in the far left hand image at;

 http://www.funkyexpenses.com/

 Under Cupcake it looks like;

 http://www.funkyexpenses.com/password-cupcake.png

 Which is very different and would make it hard for a user to use.

 To answer the obvious questions;

 1. It has a virtual keypad because users asked for it. When cupcake comes
 they may not want it any more, but for now they do.

 2. I know that cupcake is a work in progress, but we're in the month when
 Cupcake is suppose to be shipping on devices, so clearly broken backwards
 compatibility could be an issue (yes, I know Vodafone have told some
people
 it'll be 1st of May, but that still means it'll get out to the
distributors
 this month).

 3. The dialogue is created from a series of Buttons in a horizontal
 LinearLayout all in a vertical Linear layout. This may not be the best way
 to do it, but it works on 1.0 so I would expect it to work on cupcake.

 So now, more than ever, I strongly believe we need an SDK a few weeks
ahead
 of the consumer device release so we can check to see if things like this
 are just anomalies in the public branch and are fixed in the full release,
 or if there may be some reworking needed of our apps.

 Al.

 P.S. for those that are interested, the 1.5 images on the 1.0/1.1 emulator
 currently don't have working network access.

 ---

 * 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.



 




--

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

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









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



[android-developers] What uniquely identifies an application?

2009-04-03 Thread jgf1979

I have developed two games, but when i try and install the second it
replaces the first.  In other words, Android belives the two games to
be the same application.

I have tried to find out this information, but my question is: what
uniquely identifies an Android application?  What is Android looking
at to distinguish one app from another?
--~--~-~--~~~---~--~~
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 Physics Engine

2009-04-03 Thread Romain Guy

We're aware of the shortcomings of the current garbage collector and
believe me, it's one of the things we'd really love to see improved as
soon as possible :)

On Fri, Apr 3, 2009 at 2:04 AM, Mariano Kamp mariano.k...@gmail.com wrote:
 Anton, thanks. Very interesting.
 On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:

    Check out
 http://android-developers.blogspot.com/2009/02/track-memory-allocations.html

    Romain Guy points out in this post that the android garbage
 collector cannot optimize small short lived objects.  These are
 exactly the sort of objects that could be created in a physics engine
 when it needs to generate dynamic collision constraints.  A good
 solution in this case is to use a pool of constraint objects because
 they are all going to be the same size/object.  The best solution in
 my mind would be for the compiler to do escape analysis on the objects
 and stack allocate them when it sees that they will never escape the
 function.  I have been told that the Java byte code can't reference an
 object on the stack.  It's possible that the Dalvik byte code can, I
 don't know.

    I don't have a reference for this, but I assume that Dalvik's
 inability to optimize small short lived object comes from the fact
 that it uses a mark and sweep GC.  On all of my profiling, I see the
 GC take at least 100ms to run.  For a game that means you miss from
 three to 10 frames of animation and it makes for a pretty noticeable
 hick up.  And I don't think it's my application that is causing the
 garbage collector to fire.  Unless the OpenGL ES calls do some memory
 allocation, which is entirely possible.  I realize that any background
 task could move to the run queue and take some time away from my
 engine, it just happens to be the garbage collector most of the
 time.  :)

    So the result is that the Garbage collector is problematic for me
 in two ways.  First, it's not optimized to deal with the sort of small
 objects that tend to make for good encapsulations of mathematical
 types (like Fixed point number classes or Vector or Matrix classes).
 And secondly it takes a long time to run when it does garbage collect,
 resulting in dropped frames.

    -Anton

 On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
  It's maybe a bit off topic, but how do you know that Android's gc is
  rudimentary? Have you got a link handy?
  I only found
  this:http://developer.android.com/guide/practices/design/performance.html
 
  On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com wrote:
 
      Shaun, thanks for checking it out.  Yah, I agree that the real
   complexity of a physics engine comes from joints and contact
   constraints.  The constraints in my demo are simple minimum distance
   constraints.  I have a 2D rigid body physics engine that I'm thinking
   more and more about porting over to Android as well.  This demo was
   more of a calibration for myself to see how much computation I can do,
   and what optimizations lead to the largest improvements.  I'll
   probably turn it into a fun toy for the Market and then look into
   rewriting my rigid body engine for Android.
 
      Reading through Simpull I noticed that you allocate a new Vector3f
   in your Verlet update routine.  I think that will be a killer on the
   Android platform because of it's rudimentary garbage collector and
   limited RAM.  My solution was to allocate an array of fixed point
   numbers, four per ball.  Effectively a vector pool that didn't require
   any management because the number of balls never changed.
 
   On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
I took a look at Anton's demo on a G1 device, and I was glad to see
the integration of accelerometer as it really added value.  I assume
the calculations for collision detection and response are fairly
basic, which allows for that performance.
 
Simpull will also provide good performance for a scene of that
nature
(all verlet, no joints).  At least I believe it will.  The point
where
simpull becomes slow is when a more complex scene is in play with
10s
of objects with many joints connecting some of them.  Since the
engine
is all verlet and no rigid body dynamics, joints are one way to
acheive a similar result, but with a very bad performance hit due to
all the new temporary objects and new calculations.
 
I would be super impressed to see a demo like Anton's with rigid
body
dynamics involved with at least some rectangles, if not other
polygons
and perhaps a joint or two.  That is where the performance degrades
quickly in my experience.
 
On Apr 1, 2:45 pm, mscwd01 mscw...@gmail.com wrote:
 
 Thanks Lajos for pointing APE out, I hadn't heard of it until now.
 
 Unfortunately your link to your Android port is broken, can you
 mend
 it as I dont fancy spending another hour porting another library
 to
 Android :D
 

[android-developers] Re: Android Touch Inputs via adb

2009-04-03 Thread frank

Any input?

On Apr 2, 4:52 pm, frank frank.yens...@gmail.com wrote:
 Ok so I have figured out that MotionEvents are used for what I need.

 MotionEvent:  Object used to report movement (mouse, pen, finger,
 trackball) events

 Sooo, is there anyway to issue these events through ADB???

 Please let me knows!!!

 On Apr 2, 4:30 pm, frank frank.yens...@gmail.com wrote:

  Hello,

  Is there any way to issue touch events via adb.  For example issue a
  touch event at coordinate (0,0).  I know you can issues keyevents and
  string inputs via adb shell input.

  Please let me know.

  Thanks,
  Frank
--~--~-~--~~~---~--~~
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] Which one scales with the screen... Dip, sp, px.....?

2009-04-03 Thread Al Sutton

Given the recent discovery with the cupcake emulator I'm trying to re-work
the layout file so it's cupcake friendly and future proofed, but have hit a
problem.

What I want is for 6 buttons to take up a total of three quarters of the
screen width, but I can't seem to find the measurement unit which correlates
to this. All I've found is;

px  : Not screen resolution independent, so something that works on a
320x480 screen won't take 3/4s of the screen on different resolution
display.

dip : Scales with pixel density and not screen resolution, so the object
won't scale up as the physical screen size gets bigger.
Pt, in  mm : Don't scale with screen size so a 1 unit button is the same
size on a 3 or 30 inch screen.

sp : Based on font size and there's no guaranteed correlation between font
width and screen width. 


The closest I've got is the following;

TableLayoutandroid:layout_gravity=center_horizontal
android:layout_height=wrap_content
android:layout_width=fill_parent
TableRow
Button android:id=@+id/button1
android:layout_width=fill_parent 
android:layout_height=wrap_content/
Button android:id=@+id/button2
android:layout_width=fill_parent 
android:layout_height=wrap_content/
Button android:id=@+id/button3
android:layout_width=fill_parent 
android:layout_height=wrap_content/
Button android:id=@+id/button4
android:layout_width=fill_parent 
android:layout_height=wrap_content/
Button android:id=@+id/button5
android:layout_width=fill_parent 
android:layout_height=wrap_content/
Button android:id=@+id/button6
android:layout_width=fill_parent 
android:layout_height=wrap_content/  
/TableRow
/TableLayout

But this results in buttons with uneven widths which is not what I'm after.


Does anyone have a solution?

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: WebView with Gears:

2009-04-03 Thread anderson

i have a question about how to setup gear ?

Browser - setting - enable gear

i cant input any url to setup gear ~

Both 1.0 and cupcake emulator have the same problem ?

anyone meet the same problem ?

On 2月13日, 上午6時18分, Mike Reed r...@google.com wrote:
 /data/data/com.android.browser/app_plugins

 On Thu, Feb 12, 2009 at 5:09 PM, Kumaravel Kandasami

 kumaravel.kandas...@gmail.com wrote:
  Any idea on where thebrowserplugins are stored in the device?

  I looked into the data/data/com.android.browser/lib, it is empty... (used
  DDMS FileExplorer).

--~--~-~--~~~---~--~~
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] Determining the firmware version

2009-04-03 Thread Al Sutton

Is there any way to determine the version of Android that an app is running
on?

The reason being my latest idea was to turn off my on-screen keypad when
running on cupcake. The problem is the firmware version shown on the about
screen comes from android.os.Build.VERSION which appears to be a private
API.

Does anyone know anywhere else it can be obtained from in an approved
manner?

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: Android Physics Engine

2009-04-03 Thread Mariano Kamp
Romain,

  I am sure you are, but as with the Cupcake issue from the other thread
with Al, it is not transparent at all. The road map (
http://source.android.com/roadmap) doesn't contain much and doesn't seem up
to date.

  And don't get me started on the lack of transparency and predictability
regarding *all* things Android Market.

  Don't get me wrong though. This is not meant in any way as a personal
attack against you or in me laying the blame onto you. My point is that the
communications sucks and that your, Dianne's and JBQ's life would be easier
as well when someone offical from Google would put more effort into proper
communications.

Cheers,
Mariano

On Fri, Apr 3, 2009 at 10:29 AM, Romain Guy romain...@google.com wrote:


 We're aware of the shortcomings of the current garbage collector and
 believe me, it's one of the things we'd really love to see improved as
 soon as possible :)

 On Fri, Apr 3, 2009 at 2:04 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
  Anton, thanks. Very interesting.
  On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:
 
 Check out
 
 http://android-developers.blogspot.com/2009/02/track-memory-allocations.html
 
 Romain Guy points out in this post that the android garbage
  collector cannot optimize small short lived objects.  These are
  exactly the sort of objects that could be created in a physics engine
  when it needs to generate dynamic collision constraints.  A good
  solution in this case is to use a pool of constraint objects because
  they are all going to be the same size/object.  The best solution in
  my mind would be for the compiler to do escape analysis on the objects
  and stack allocate them when it sees that they will never escape the
  function.  I have been told that the Java byte code can't reference an
  object on the stack.  It's possible that the Dalvik byte code can, I
  don't know.
 
 I don't have a reference for this, but I assume that Dalvik's
  inability to optimize small short lived object comes from the fact
  that it uses a mark and sweep GC.  On all of my profiling, I see the
  GC take at least 100ms to run.  For a game that means you miss from
  three to 10 frames of animation and it makes for a pretty noticeable
  hick up.  And I don't think it's my application that is causing the
  garbage collector to fire.  Unless the OpenGL ES calls do some memory
  allocation, which is entirely possible.  I realize that any background
  task could move to the run queue and take some time away from my
  engine, it just happens to be the garbage collector most of the
  time.  :)
 
 So the result is that the Garbage collector is problematic for me
  in two ways.  First, it's not optimized to deal with the sort of small
  objects that tend to make for good encapsulations of mathematical
  types (like Fixed point number classes or Vector or Matrix classes).
  And secondly it takes a long time to run when it does garbage collect,
  resulting in dropped frames.
 
 -Anton
 
  On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
   It's maybe a bit off topic, but how do you know that Android's gc is
   rudimentary? Have you got a link handy?
   I only found
   this:
 http://developer.android.com/guide/practices/design/performance.html
  
   On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com
 wrote:
  
   Shaun, thanks for checking it out.  Yah, I agree that the real
complexity of a physics engine comes from joints and contact
constraints.  The constraints in my demo are simple minimum distance
constraints.  I have a 2D rigid body physics engine that I'm
 thinking
more and more about porting over to Android as well.  This demo was
more of a calibration for myself to see how much computation I can
 do,
and what optimizations lead to the largest improvements.  I'll
probably turn it into a fun toy for the Market and then look into
rewriting my rigid body engine for Android.
  
   Reading through Simpull I noticed that you allocate a new
 Vector3f
in your Verlet update routine.  I think that will be a killer on the
Android platform because of it's rudimentary garbage collector and
limited RAM.  My solution was to allocate an array of fixed point
numbers, four per ball.  Effectively a vector pool that didn't
 require
any management because the number of balls never changed.
  
On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
 I took a look at Anton's demo on a G1 device, and I was glad to
 see
 the integration of accelerometer as it really added value.  I
 assume
 the calculations for collision detection and response are fairly
 basic, which allows for that performance.
  
 Simpull will also provide good performance for a scene of that
 nature
 (all verlet, no joints).  At least I believe it will.  The point
 where
 simpull becomes slow is when a more complex scene is in play with
 10s
 of 

[android-developers] Are ArrayList / Hashtable's bad for gc on Android?

2009-04-03 Thread admin.androidsl...@googlemail.com

I notice in the source code they are not used in critical loops, e.g.
in View.java :
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewGroup.java;h=e686d1c20bd21eaa050ff3bf9187b549ee7b1355;hb=HEAD

I can see this kind of code which would be much easier implemented as
an ArrayList :

1867 private void addInArray(View child, int index) {
1868 View[] children = mChildren;
1869 final int count = mChildrenCount;
1870 final int size = children.length;
1871 if (index == count) {
1872 if (size == count) {
1873 mChildren = new View[size +
ARRAY_CAPACITY_INCREMENT];
1874 System.arraycopy(children, 0, mChildren, 0,
size);
1875 children = mChildren;
1876 }
1877 children[mChildrenCount++] = child;
1878 } else if (index  count) {
1879 if (size == count) {
1880 mChildren = new View[size +
ARRAY_CAPACITY_INCREMENT];
1881 System.arraycopy(children, 0, mChildren, 0,
index);
1882 System.arraycopy(children, index, mChildren,
index + 1, count - index);
1883 children = mChildren;
1884 } else {
1885 System.arraycopy(children, index, children, index
+ 1, count - index);
1886 }
1887 children[index] = child;
1888 mChildrenCount++;
1889 } else {
1890 throw new IndexOutOfBoundsException(index= + index
+  count= + count);
1891 }
1892 }
--~--~-~--~~~---~--~~
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] Some question about market rate

2009-04-03 Thread EvgenyV

Hi all,

I can't explaing why with the increasing number of downloads and
increasing positive feedbacks the number of uninstalls is growing as
well.

Does anybody know what is the avarage value of free applications
uninstall?


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: Determining the firmware version

2009-04-03 Thread Stoyan Damov

What??? android.os.Build is not part of the public API???
Why can I see it here then?

http://developer.android.com/reference/android/os/Build.VERSION.html

On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton a...@funkyandroid.com wrote:

 Is there any way to determine the version of Android that an app is running
 on?

 The reason being my latest idea was to turn off my on-screen keypad when
 running on cupcake. The problem is the firmware version shown on the about
 screen comes from android.os.Build.VERSION which appears to be a private
 API.

 Does anyone know anywhere else it can be obtained from in an approved
 manner?

 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] Image download issue

2009-04-03 Thread Muthu Kumar K.

Hi All,
I am trying to download the image from the server. Here i am getting
the problem, some times the image is not getting download it is
showing empty. In server i kept the bitmap image. I am using the
following code to download the image.

  private Bitmap downloadImageFile(String fileUrl) {
URL myFileUrl = null;
try {
myFileUrl = new URL(fileUrl);
} catch (MalformedURLException e) {
e.printStackTrace();
}
try {
HttpURLConnection conn = (HttpURLConnection)
myFileUrl.openConnection();
conn.setDoInput(true);
conn.connect();
int length = conn.getContentLength();
InputStream is = conn.getInputStream();
bmImg = BitmapFactory.decodeStream(is); // some times 
im getting
this as null
} catch (IOException e) {
e.printStackTrace();
bmImg = null;
}
return bmImg;
}


Please give me your suggestions.

Thanks in Advance,
Muthu Kumar K.
--~--~-~--~~~---~--~~
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: Determining the firmware version

2009-04-03 Thread Al Sutton

Try using it in eclipse. Using the 1.1 SDK I get the following error;

android.os.Build.VERSION cannot be resolved

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 Stoyan Damov
Sent: 03 April 2009 11:59
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Determining the firmware version


What??? android.os.Build is not part of the public API???
Why can I see it here then?

http://developer.android.com/reference/android/os/Build.VERSION.html

On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton a...@funkyandroid.com wrote:

 Is there any way to determine the version of Android that an app is 
 running on?

 The reason being my latest idea was to turn off my on-screen keypad 
 when running on cupcake. The problem is the firmware version shown on 
 the about screen comes from android.os.Build.VERSION which appears to 
 be a private API.

 Does anyone know anywhere else it can be obtained from in an approved 
 manner?

 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: Determining the firmware version

2009-04-03 Thread Stoyan Damov

My code uses Build.VERSION.RELEASE, Build.VERSION.INCREMENTAL and
Build.VERSION.SDK and compiles just fine w/ the 1.1. SDK

Are you compiling with a cupcake SDK or something?

Cheers

On Fri, Apr 3, 2009 at 2:15 PM, Al Sutton a...@funkyandroid.com wrote:

 Try using it in eclipse. Using the 1.1 SDK I get the following error;

 android.os.Build.VERSION cannot be resolved

 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 Stoyan Damov
 Sent: 03 April 2009 11:59
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Determining the firmware version


 What??? android.os.Build is not part of the public API???
 Why can I see it here then?

 http://developer.android.com/reference/android/os/Build.VERSION.html

 On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton a...@funkyandroid.com wrote:

 Is there any way to determine the version of Android that an app is
 running on?

 The reason being my latest idea was to turn off my on-screen keypad
 when running on cupcake. The problem is the firmware version shown on
 the about screen comes from android.os.Build.VERSION which appears to
 be a private API.

 Does anyone know anywhere else it can be obtained from in an approved
 manner?

 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: Are ArrayList / Hashtable's bad for gc on Android?

2009-04-03 Thread Stoyan Damov

Using hand-crafted code, you can control how much your backing array
grows -- I suspect ARRAY_CAPACITY_INCREMENT is quite a big number.

Cheers

On Fri, Apr 3, 2009 at 1:44 PM, admin.androidsl...@googlemail.com
admin.androidsl...@googlemail.com wrote:

 I notice in the source code they are not used in critical loops, e.g.
 in View.java :
 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewGroup.java;h=e686d1c20bd21eaa050ff3bf9187b549ee7b1355;hb=HEAD

 I can see this kind of code which would be much easier implemented as
 an ArrayList :

 1867     private void addInArray(View child, int index) {
 1868         View[] children = mChildren;
 1869         final int count = mChildrenCount;
 1870         final int size = children.length;
 1871         if (index == count) {
 1872             if (size == count) {
 1873                 mChildren = new View[size +
 ARRAY_CAPACITY_INCREMENT];
 1874                 System.arraycopy(children, 0, mChildren, 0,
 size);
 1875                 children = mChildren;
 1876             }
 1877             children[mChildrenCount++] = child;
 1878         } else if (index  count) {
 1879             if (size == count) {
 1880                 mChildren = new View[size +
 ARRAY_CAPACITY_INCREMENT];
 1881                 System.arraycopy(children, 0, mChildren, 0,
 index);
 1882                 System.arraycopy(children, index, mChildren,
 index + 1, count - index);
 1883                 children = mChildren;
 1884             } else {
 1885                 System.arraycopy(children, index, children, index
 + 1, count - index);
 1886             }
 1887             children[index] = child;
 1888             mChildrenCount++;
 1889         } else {
 1890             throw new IndexOutOfBoundsException(index= + index
 +  count= + count);
 1891         }
 1892     }
 


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

2009-04-03 Thread Stoyan Damov

+ googol

On Fri, Apr 3, 2009 at 1:43 PM, Mariano Kamp mariano.k...@gmail.com wrote:
 Romain,

   I am sure you are, but as with the Cupcake issue from the other thread
 with Al, it is not transparent at all. The road map
 (http://source.android.com/roadmap) doesn't contain much and doesn't seem up
 to date.

   And don't get me started on the lack of transparency and predictability
 regarding *all* things Android Market.

   Don't get me wrong though. This is not meant in any way as a personal
 attack against you or in me laying the blame onto you. My point is that the
 communications sucks and that your, Dianne's and JBQ's life would be easier
 as well when someone offical from Google would put more effort into proper
 communications.

 Cheers,
 Mariano

 On Fri, Apr 3, 2009 at 10:29 AM, Romain Guy romain...@google.com wrote:

 We're aware of the shortcomings of the current garbage collector and
 believe me, it's one of the things we'd really love to see improved as
 soon as possible :)

 On Fri, Apr 3, 2009 at 2:04 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
  Anton, thanks. Very interesting.
  On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:
 
     Check out
 
  http://android-developers.blogspot.com/2009/02/track-memory-allocations.html
 
     Romain Guy points out in this post that the android garbage
  collector cannot optimize small short lived objects.  These are
  exactly the sort of objects that could be created in a physics engine
  when it needs to generate dynamic collision constraints.  A good
  solution in this case is to use a pool of constraint objects because
  they are all going to be the same size/object.  The best solution in
  my mind would be for the compiler to do escape analysis on the objects
  and stack allocate them when it sees that they will never escape the
  function.  I have been told that the Java byte code can't reference an
  object on the stack.  It's possible that the Dalvik byte code can, I
  don't know.
 
     I don't have a reference for this, but I assume that Dalvik's
  inability to optimize small short lived object comes from the fact
  that it uses a mark and sweep GC.  On all of my profiling, I see the
  GC take at least 100ms to run.  For a game that means you miss from
  three to 10 frames of animation and it makes for a pretty noticeable
  hick up.  And I don't think it's my application that is causing the
  garbage collector to fire.  Unless the OpenGL ES calls do some memory
  allocation, which is entirely possible.  I realize that any background
  task could move to the run queue and take some time away from my
  engine, it just happens to be the garbage collector most of the
  time.  :)
 
     So the result is that the Garbage collector is problematic for me
  in two ways.  First, it's not optimized to deal with the sort of small
  objects that tend to make for good encapsulations of mathematical
  types (like Fixed point number classes or Vector or Matrix classes).
  And secondly it takes a long time to run when it does garbage collect,
  resulting in dropped frames.
 
     -Anton
 
  On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
   It's maybe a bit off topic, but how do you know that Android's gc is
   rudimentary? Have you got a link handy?
   I only found
  
   this:http://developer.android.com/guide/practices/design/performance.html
  
   On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com
   wrote:
  
   Shaun, thanks for checking it out.  Yah, I agree that the real
complexity of a physics engine comes from joints and contact
constraints.  The constraints in my demo are simple minimum
distance
constraints.  I have a 2D rigid body physics engine that I'm
thinking
more and more about porting over to Android as well.  This demo was
more of a calibration for myself to see how much computation I can
do,
and what optimizations lead to the largest improvements.  I'll
probably turn it into a fun toy for the Market and then look into
rewriting my rigid body engine for Android.
  
   Reading through Simpull I noticed that you allocate a new
Vector3f
in your Verlet update routine.  I think that will be a killer on
the
Android platform because of it's rudimentary garbage collector and
limited RAM.  My solution was to allocate an array of fixed point
numbers, four per ball.  Effectively a vector pool that didn't
require
any management because the number of balls never changed.
  
On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
 I took a look at Anton's demo on a G1 device, and I was glad to
 see
 the integration of accelerometer as it really added value.  I
 assume
 the calculations for collision detection and response are fairly
 basic, which allows for that performance.
  
 Simpull will also provide good performance for a scene of that
 nature
 (all verlet, no joints).  At least I 

[android-developers] Re: What uniquely identifies an application?

2009-04-03 Thread Mark Murphy

jgf1979 wrote:
 I have developed two games, but when i try and install the second it
 replaces the first.  In other words, Android belives the two games to
 be the same application.
 
 I have tried to find out this information, but my question is: what
 uniquely identifies an Android application?  What is Android looking
 at to distinguish one app from another?

The Java package is the unique identifier, at least in terms of the
effect you are experiencing.

This is the value specified as the package attribute in the root
manifest tag in your AndroidManifest.xml file.

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

Android App Developer Books: http://commonsware.com/books.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: Determining the firmware version

2009-04-03 Thread Stoyan Damov

Yes, Eclipse sucks.

BTW, does anyone now know hard or easy it is to write plugins for
Eclipse, especially plugins which generate code, or parse and/or
modify code in code windows?
I'd like to create a plugin which when given an activity class, and a
layout, used as a view in the activity would generate typed members
for all widgets and will write the code to find them, e.g. if there's
a layout and 2 buttons w/ resource ids R.id.button1 and R.id.button2
in a nested layout w/ id R.id.buttonPanel, the plugin would generate
the following code:

private LinearLayout mButtonPanel;
private Button mButton1;
private Button mButton2;

and in onCreate it would insert:

mButtonPanel = (LinearLayout)findViewById(R.id.buttonPanel);
mButton1 = (Button)mButtonPanel.findViewById(R.id.button1);
mButton2 = (Button)mButtonPanel.findViewById(R.id.button2);

This will avoid some hair-pulling errors I occasionally make (and
probably other guys too).
If writing plugins is not easy, I'll just create a stand-alone app
which parses the layout file and creates 2 snippets of code ready to
be pasted.

Cheers

On Fri, Apr 3, 2009 at 2:51 PM, Al Sutton a...@funkyandroid.com wrote:

 D'oh.

 Build.VERSION doesn't resolve, but Build.VERSION.RELEASE does.

 Thanks for the pointer.

 Al.


 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Stoyan Damov
 Sent: 03 April 2009 12:31
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Determining the firmware version


 My code uses Build.VERSION.RELEASE, Build.VERSION.INCREMENTAL and
 Build.VERSION.SDK and compiles just fine w/ the 1.1. SDK

 Are you compiling with a cupcake SDK or something?

 Cheers

 On Fri, Apr 3, 2009 at 2:15 PM, Al Sutton a...@funkyandroid.com wrote:

 Try using it in eclipse. Using the 1.1 SDK I get the following error;

 android.os.Build.VERSION cannot be resolved

 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 Stoyan Damov
 Sent: 03 April 2009 11:59
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Determining the firmware version


 What??? android.os.Build is not part of the public API???
 Why can I see it here then?

 http://developer.android.com/reference/android/os/Build.VERSION.html

 On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton a...@funkyandroid.com wrote:

 Is there any way to determine the version of Android that an app is
 running on?

 The reason being my latest idea was to turn off my on-screen keypad
 when running on cupcake. The problem is the firmware version shown on
 the about screen comes from android.os.Build.VERSION which appears to
 be a private API.

 Does anyone know anywhere else it can be obtained from in an approved
 manner?

 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] Displaying result in tabular form

2009-04-03 Thread Zhubham

Hi,

I had stored some data in the SQLite database. I can view it in
tabular format using the SQLite database reader.. Now is there a way
(set of commands) by which i can view the result in emulator in a
similar format??

Thanks in advance.

Best Regards,
Zhubham
--~--~-~--~~~---~--~~
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: Determining the firmware version

2009-04-03 Thread Al Sutton

The tutorial at
http://www.ibm.com/developerworks/opensource/library/os-ecplug/ makes it
seem reasonably easy.

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 Stoyan Damov
Sent: 03 April 2009 13:04
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Determining the firmware version


Yes, Eclipse sucks.

BTW, does anyone now know hard or easy it is to write plugins for Eclipse,
especially plugins which generate code, or parse and/or modify code in code
windows?
I'd like to create a plugin which when given an activity class, and a
layout, used as a view in the activity would generate typed members for all
widgets and will write the code to find them, e.g. if there's a layout and 2
buttons w/ resource ids R.id.button1 and R.id.button2 in a nested layout w/
id R.id.buttonPanel, the plugin would generate the following code:

private LinearLayout mButtonPanel;
private Button mButton1;
private Button mButton2;

and in onCreate it would insert:

mButtonPanel = (LinearLayout)findViewById(R.id.buttonPanel);
mButton1 = (Button)mButtonPanel.findViewById(R.id.button1);
mButton2 = (Button)mButtonPanel.findViewById(R.id.button2);

This will avoid some hair-pulling errors I occasionally make (and probably
other guys too).
If writing plugins is not easy, I'll just create a stand-alone app which
parses the layout file and creates 2 snippets of code ready to be pasted.

Cheers

On Fri, Apr 3, 2009 at 2:51 PM, Al Sutton a...@funkyandroid.com wrote:

 D'oh.

 Build.VERSION doesn't resolve, but Build.VERSION.RELEASE does.

 Thanks for the pointer.

 Al.


 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Stoyan Damov
 Sent: 03 April 2009 12:31
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Determining the firmware version


 My code uses Build.VERSION.RELEASE, Build.VERSION.INCREMENTAL and 
 Build.VERSION.SDK and compiles just fine w/ the 1.1. SDK

 Are you compiling with a cupcake SDK or something?

 Cheers

 On Fri, Apr 3, 2009 at 2:15 PM, Al Sutton a...@funkyandroid.com wrote:

 Try using it in eclipse. Using the 1.1 SDK I get the following error;

 android.os.Build.VERSION cannot be resolved

 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 Stoyan 
 Damov
 Sent: 03 April 2009 11:59
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Determining the firmware version


 What??? android.os.Build is not part of the public API???
 Why can I see it here then?

 http://developer.android.com/reference/android/os/Build.VERSION.html

 On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton a...@funkyandroid.com wrote:

 Is there any way to determine the version of Android that an app is 
 running on?

 The reason being my latest idea was to turn off my on-screen keypad 
 when running on cupcake. The problem is the firmware version shown 
 on the about screen comes from android.os.Build.VERSION which 
 appears to be a private API.

 Does anyone know anywhere else it can be obtained from in an 
 approved manner?

 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] How can i make any string/integer factory configurable

2009-04-03 Thread Zhubham

Hi,

How can i make any string/integer factory configurable in android??

eg. Alert dialog displays a text which is directly picked from a
(central repository) file. Now we change the text in this file and
make a rom image (but DO NOT compile the whole code) and flash it on
the phone. Now the alert dialog would display the new text. This is
what we call central repository data retrieval in symbian. How is
this
achievable in Android??

Please help me on this.

Thanks.

Best Regards,
Zhubham.
--~--~-~--~~~---~--~~
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: Switching from Landscape to Portrait orientation

2009-04-03 Thread Mark Murphy

Zhubham wrote:
 Hi,
 
 I want to display a table which would fit better in portrait view than
 in the landscape view. How do i instruct the emulator to change the
 orientation??

Try calling setRequestedOrientation() in your activity.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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] Switching from Landscape to Portrait orientation

2009-04-03 Thread Zhubham

Hi,

I want to display a table which would fit better in portrait view than
in the landscape view. How do i instruct the emulator to change the
orientation??

Please help me with this.

Thanks.

Best Regards,
Zhubham
--~--~-~--~~~---~--~~
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 uniquely identifies an application?

2009-04-03 Thread Stoyan Damov

I have a question - can I have 2 apps, where the 1st app is in the
package com.company.games.Game1 and the other in
com.company.games.Game2

i.e. I guess the common prefix com.company.games is not a problem,
right (just like com. is not a problem for most of the apps)?

On Fri, Apr 3, 2009 at 2:57 PM, Mark Murphy mmur...@commonsware.com wrote:

 jgf1979 wrote:
 I have developed two games, but when i try and install the second it
 replaces the first.  In other words, Android belives the two games to
 be the same application.

 I have tried to find out this information, but my question is: what
 uniquely identifies an Android application?  What is Android looking
 at to distinguish one app from another?

 The Java package is the unique identifier, at least in terms of the
 effect you are experiencing.

 This is the value specified as the package attribute in the root
 manifest tag in your AndroidManifest.xml file.

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

 Android App Developer Books: http://commonsware.com/books.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] onDraw after all child views

2009-04-03 Thread Zack

Hi, I have a composite view which is extended from LinearLayout and
contains a TableLayout which contains many ImageViews.

I would like to overlay some effects on the resulting image that is
produced by my custom view. It would seem that my CustomView's onDraw
is only being called after before all of it's children's onDraw
methods which basically is burying the changes I want to make.

Makes sense, but does anyone know halfway decent way to do what I'm
asking? 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: How to scale a view without scaling its children ?

2009-04-03 Thread Ovuca

Here's a short exemple :

The XML file :

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent


ScrollView xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/formScrollView
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#FF00FF
android:scrollbars=none
android:layout_weight=1


LinearLayout
android:id=@+id/contentLayout
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
android:padding=6px
android:background=@drawable/pj_bkg

TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=fdsfsd
/
Button
android:id=@+id/myButton
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=click me !
/
/LinearLayout
/ScrollView
/LinearLayout

when the button is clicked, i apply this animation to my linearlayout:

set xmlns:android=http://schemas.android.com/apk/res/android;
android:interpolator=@android:anim/accelerate_interpolator
android:fillAfter=true 

scale
 android:fromXScale=1.0 android:toXScale=1.0
 android:fromYScale=1.0 android:toYScale=1.5
 android:pivotX=0% android:pivotY=0%
 android:duration=700/
/set

The LinearLayout is scaled and the button is scaled too. Is there a
way to avoid the button and the textview to be resized.
Or is there a way to play an animation which resize the height of my
LinearLayout without modifying its content ?

On 2 avr, 23:13, droozen droozenr...@gmail.com wrote:
 Would you post your xml for your layout? If the children of avieware
 using the android:layout_height or android:layout_width property, for
 example, in a way that is tied to the parent (such as,
 android:layout_height=fill_parent) then I imagine changing the size
 of the parent should, as defined in the xml, change the size of the
 children. If this is how your xml is set up and you don't want this
 behavior, you should probably change the xml for the children.

 On Apr 2, 3:50 pm, Ovuca bruno.lev...@gmail.com wrote:

  Hi,

  I need to resize the height of a layout so i tried to apply ascale
  animation. Theviewis resized but its children are resized too. Is
  there a way to resize the layout without resizing its children?


--~--~-~--~~~---~--~~
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: Need for backup functionality

2009-04-03 Thread MrChaz

I went with plan B and simple copied the database file

it lives in  data/data/package name/databases/database name if i
remember rightly.

On Apr 2, 9:23 pm, droozen droozenr...@gmail.com wrote:
 So I've come to a need to backup data in my application, so a user can
 safely restore the important data. I had an idea about how to go about
 this, but relatively it's a lot of work just to test if it would work,
 so it'd be nice to get a thumbs up or thumbs down to my plan from
 someone who has tried it, or an alternate way to do it.

 I was thinking that I could compose an email that the user could send
 to himself with a link in it like: 
 content://mycontentprovider/databackup/the
 data, possibly in a delimited format (comma-separated)

 And when the user would click the link it would pull up my content
 provider that would take all the data from the link and restore it
 into my database.

 Alternate idea: save the database file to another machine or email,
 but I wouldn't know how to go about doing this. Can I make my
 application attach the database to an email that could be imported? Is
 it easy to make the user hook up a USB cord to a computer for them to
 manually backup and reload the database file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What uniquely identifies an application?

2009-04-03 Thread Mark Murphy

Stoyan Damov wrote:
 I have a question - can I have 2 apps, where the 1st app is in the
 package com.company.games.Game1 and the other in
 com.company.games.Game2

I'm not sure what Game1 and Game2 are.

If they are part of the package, then yes, that should work, give or
take any case-related issues. I normally see these things as lowercase,
so I don't know if the mixed case might cause problems.

 i.e. I guess the common prefix com.company.games is not a problem,
 right (just like com. is not a problem for most of the apps)?

Let's suppose you have a manifest that starts out like:

manifest xmlns:android=http://schemas.android.com/apk/res/android;
package=com.company.games
android:versionCode=1
android:versionName=1.0

I cannot have two applications with that same package attribute. If I
try to have more than one with that package, the most-recently-installed
application wins.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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 uniquely identifies an application?

2009-04-03 Thread Stoyan Damov

Sorry, I meant to put them in lowercase, e.g. com.company.games.game1
and com.company.games.game2.
I have another question though. What if I already have already
published a game with the package com.company and I now I want to
publish another with the package com.company.games.game2?
Will there be any problems?

Thanks

On Fri, Apr 3, 2009 at 4:11 PM, Mark Murphy mmur...@commonsware.com wrote:

 Stoyan Damov wrote:
 I have a question - can I have 2 apps, where the 1st app is in the
 package com.company.games.Game1 and the other in
 com.company.games.Game2

 I'm not sure what Game1 and Game2 are.

 If they are part of the package, then yes, that should work, give or
 take any case-related issues. I normally see these things as lowercase,
 so I don't know if the mixed case might cause problems.

 i.e. I guess the common prefix com.company.games is not a problem,
 right (just like com. is not a problem for most of the apps)?

 Let's suppose you have a manifest that starts out like:

 manifest xmlns:android=http://schemas.android.com/apk/res/android;
        package=com.company.games
        android:versionCode=1
        android:versionName=1.0

 I cannot have two applications with that same package attribute. If I
 try to have more than one with that package, the most-recently-installed
 application wins.

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

 Warescription: Three Android Books, Plus Updates, $35/Year

 


--~--~-~--~~~---~--~~
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 uniquely identifies an application?

2009-04-03 Thread Mark Murphy

Stoyan Damov wrote:
 Sorry, I meant to put them in lowercase, e.g. com.company.games.game1
 and com.company.games.game2.
 I have another question though. What if I already have already
 published a game with the package com.company and I now I want to
 publish another with the package com.company.games.game2?
 Will there be any problems?

I have not tried that pattern, but I think it will be OK.

Part of why the package dictates uniqueness is the
/data/data/your.package.here system for local file stores. Your pattern
(com.company and com.company.games.game2) will not collide in the
/data/data/ directory structure, which is why I think it will work.

However, your kilometerage may vary.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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 uniquely identifies an application?

2009-04-03 Thread Alexey

I have kind of same problem to solve
I have same code base from which i have to build to different apps
using two different resources folders and may be some extensions in
terms of extra activities etc...

so let say all my base code is in
com.acme.product.base
And I have packages like
com.acme.product.ui1
com.acme.product.ui2

Activities in base have references to R. which will be put under one
of UI packages by specifying package name in the manifest .
So to make it build , i understand, that i'll need an ant script which
will put correct include to com.acme.product.ui1.R or
com.acme.product.ui2.R base to all java files during build time .
First question  how i do this ( i'm not really savvy in ant scripts so
direction will be appreciated ) Second - is the ant script a right
solution in this case or there is another way .

I've seen some company ( i think Paragon ) doing that kind of builds
for the dictionaries and looking of the best way how i can get this to
work .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 uniquely identifies an application?

2009-04-03 Thread Stoyan Damov

On Fri, Apr 3, 2009 at 4:51 PM, Mark Murphy mmur...@commonsware.com wrote:
 However, your kilometerage may vary.

LOL! :)

--~--~-~--~~~---~--~~
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.clearHistory()

2009-04-03 Thread nEx.Software

Outstanding. Thanks for the information. I really appreciate it.

Justin

On Apr 2, 4:28 am, StefanK skyntc...@gmail.com wrote:
 I recently had the same issue. What I found is that you have to clear
 history AFTER the (first) page loads. It appears that the history
 clears everything before the current page so if your browser is at
 page A, you clear history and navigate to page B your history will
 be A B, not just B, but if you clear history when B finishes
 loading you will have only B.
 In my case I end up using onPageFinished  method of the
 WebViwClient, but in this case you have to know what your start page
 is and clear the history only after it otherwise you will be clearing
 the history after every page navigated after the first.

 Stefan

 On Mar 31, 6:05 pm, nEx.Software justin.shapc...@gmail.com wrote:

  I call WebView.clearHistory(), but I am still able to go back after
  doing so. I want to reuse a WebView, but I don't want the back button
  to allow the user to go back further than the current session of
  using the WebView. Anybody know what is the best way to handle this? I
  thought for sure that clearHistory() would do 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: OpenGL What Cube Face Is Facing Me

2009-04-03 Thread William

//i rotate the cube using the following
//xRot,yRot are inc or decremented to change angles
gl.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
gl.glRotatef(yRot, 0.0f, 1.0f, 0.0f);

So yes i have access to yRot and xRot but they numbers range from -900
to +900.  I figure I can used them somehow to tell what is rotated but
I am unsure how.  i just pass them in and it magically rotates for
me.  so i am unsure how to tell from the numbers what angle the cube
is at.

can I take a trig function to them or what?  or do i take the xRot %
360 and the remainder is what degree I am at.  Or is xRot in radians
so I must convert it.



On Apr 3, 12:41 am, Marco Nelissen marc...@android.com wrote:
 Since you're rotating and drawing the cube, shouldn't you have that
 information in your app already?

 On Thu, Apr 2, 2009 at 7:30 PM, William william.caine...@gmail.com wrote:

  Hi Folks,

  I am drawing and rotating a cube.  Is there a programmatic way to tell
  what side of the cube is facing me?

  For example if I randomly spin the cube when done spinning. I want to
  know which face(s) I am looking at.  10% of face 1, 90% of face 2.


--~--~-~--~~~---~--~~
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 compiled image?

2009-04-03 Thread Al Sutton
I got the onscreen keyboard whenever I clicked in an EditText (I had to
click it even if it had the default focus). It then wouldn't go away until I
clicked the back key (even if I moved off to a button).
 
Networking does seem to be non-working in the 1.1 emulator with the 1.5
images though.
 
 
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 Ivan Soto
Sent: 03 April 2009 15:29
To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


Thanks again for the images.
For some reason I can't make Internet work on the emulator. On screen
keyboard didn't work either. I tried to hold menu button but nothing
happened.

The UI is looking great. I like that the applications drawer now has
something like a carbon fiber background. I hope it fixes the lag like with
the transparent background.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:45 AM, Al Sutton a...@funkyandroid.com wrote:


I'll upload them to a server and send you the URL .
 
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 Ivan Soto

Sent: 03 April 2009 07:43 

To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


That would be great. So far the previous images were working fine, again,
I'm just curious about the performance and how well the interface works with
the on screen keyboard. 

I will post results as long as I find them.

Thanks in advance. :)

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:38 AM, Al Sutton a...@funkyandroid.com wrote:


I can give you those from my build of the SDK from last night if you want. I
can't guarantee how well they'll work with an earlier SDKs emulator, but if
you promise to post your results to the list I'll send you a download URL
(once I've uploaded them)
 
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 Ivan Soto

Sent: 03 April 2009 07:33 

To: android-developers@googlegroups.com

Subject: [android-developers] Re: 1.5 compiled image?


I'm just looking for the image file. I just want to test on 1.5. 

In february someone compiled cupcake and distributed the image to replace on
the emulator.
the zip contained:
ramdisk.img
system.img
userdata.img

I was looking for the same but updated. I really don't want to get into
compiling cupcake by myself.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:


What OS are you planning to run the SDK on?
 
Building a Linux SDK from source isn't too difficult. As yet I haven't found
any instructions on how to build the windows one.
 
Al.

---

* Written an Android App? - List it at  http://andappstore.com/
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 Ivan Soto
Sent: 02 April 2009 21:53
To: android-developers@googlegroups.com
Subject: [android-developers] 1.5 compiled image?


Is there any 1.5 image going around for the emulator? I would like to try my
apps with onscreen keyboard.
Maybe someone is actually making nightly builds but I can't find any.

Thanks.
PS: Not sure if it's appropriate to ask in this list.

Ivan 

[android-developers] Re: WebView bug with pageDown() ?

2009-04-03 Thread pperotti

I did that also but if you invoke view.pageDown(true) inside
onPageFinished(Webview view, STring url ) it produces the same
behavior as explained before. The only way this method seems to work
(producing a very poor user-experience)  is by just invoking inside
the onPageFinished something like the following:

In the activity using a WebView object named webView:

class ViewUpdater implements Runnable {
public void run() {
webView.pageDown(true);
}
}

and a class extending the WebViewClient ...

void onPageFInished(WebView view, String url) {
view.postDelayed(new ViewUpdater(), 150);
//The following does not work either.
//view.post(new ViewUpdater());
}

But this produces that after reloading data with webview.loadData(),
the contents and the scrollbar are shown on top and just after 150
millisecs everything is scrolled down to the bottom which actually
produce a poor user experience.

Should I open a bug on this ?

Regards, Pablo

On 2 abr, 21:06, Mark Murphy mmur...@commonsware.com wrote:
 pperotti wrote:
  Is there any way to be notified when a page has been completely loaded
  using web view?

 Attach a WebViewClient to your WebView, and override onPageFinished() in
 the WebViewClient.

 --
 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] adb push wtf

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

C:\android-sdk-windows-1.1_r1\toolsadb push C:\src\test \data
failed to copy 'C:\src\test' to '\data': Read-only file system

wtf??
--~--~-~--~~~---~--~~
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: adb push wtf

2009-04-03 Thread Mark Murphy

yarik...@gmail.com wrote:
 C:\android-sdk-windows-1.1_r1\toolsadb push C:\src\test \data
 failed to copy 'C:\src\test' to '\data': Read-only file system
 
 wtf??

1. Android runs Linux and therefore uses slashes (/) not backslashes (\)
on paths.

2. You should not be attempting to put files in /data in Android. In
particular, on the device, you do not have permissions to put files
there. Please store files in the app-local file store
(/data/data/your.package.here/files) or on the SD card, noting that you
need to set up an SD card image for use with the emulator if you have
not done so already.

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

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android 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: adb push wtf

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


thanks a lot!
--~--~-~--~~~---~--~~
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: Telephony question

2009-04-03 Thread Evgeny V
It just works. I just have to press the answer button :)

On Fri, Apr 3, 2009 at 5:56 PM, EvgenyV evgen...@gmail.com wrote:


 Hi all,

 I'm tring to catch events from phone calls. For some reason the event
 state changed happens only when the main activity is started. After
 that I'm trying to simulate the call using eclipse DDMS tool but
 unsucessfully.
 Should I listen in background thread instead?

 What is wron with following code?

 public class main extends Activity {

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

TelephonyManager myPhoneManager =
(TelephonyManager)getSystemService
 (Context.TELEPHONY_SERVICE);

PhoneStateListener myPhoneListener = new PhoneStateListener()
{
public void onCallStateChanged(int state, String
 phoneNumber)
{
TextView tv = (TextView)findViewById
 (R.id.phone_interaction);
tv.setText(String.valueOf(Calendar.getInstance
 ().getTimeInMillis()));
}
};

myPhoneManager.listen(myPhoneListener,
 PhoneStateListener.LISTEN_CALL_STATE);
}
 }

 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: Android Physics Engine

2009-04-03 Thread mscwd01

I have thrown together a quick example of the APE Physics engine
(www.cove.org/ape/) running on Android.

As you can see, simulating 30 or so circles results in a solid 15fps,
which looks acceptable.

The bad news, which I didn't realise before porting it to Android, is
APE's lack of simulating rotation of bodies. I.e. if you simulate
boxes their x,y positions are calculated but they never rotate. I'm
pretty sure I haven't overlooked this feature but i'd be surprised if
it wasn't part of the APE engine, maybe someone else could confirm
this?

Anyway, APE is a lot nicer to use than JBox2D and is on a par with
Phys2D for ease of use. I just wish Phys2D performed well on Android
then all my problems would be solved!

With all the attention this topic has brought I hope we can find a
solution in the not-to-distant future...

Here's the Eclipse Project: http://www.filedropper.com/apedroid
When running 20 initial circles are created, you can create more by
clicking the down button.
Also you will find lots of commented out code, you can experiment with
this if you wish...



On Apr 3, 12:35 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
 + googol

 On Fri, Apr 3, 2009 at 1:43 PM, Mariano Kamp mariano.k...@gmail.com wrote:
  Romain,

    I am sure you are, but as with the Cupcake issue from the other thread
  with Al, it is not transparent at all. The road map
  (http://source.android.com/roadmap) doesn't contain much and doesn't seem up
  to date.

    And don't get me started on the lack of transparency and predictability
  regarding *all* things Android Market.

    Don't get me wrong though. This is not meant in any way as a personal
  attack against you or in me laying the blame onto you. My point is that the
  communications sucks and that your, Dianne's and JBQ's life would be easier
  as well when someone offical from Google would put more effort into proper
  communications.

  Cheers,
  Mariano

  On Fri, Apr 3, 2009 at 10:29 AM, Romain Guy romain...@google.com wrote:

  We're aware of the shortcomings of the current garbage collector and
  believe me, it's one of the things we'd really love to see improved as
  soon as possible :)

  On Fri, Apr 3, 2009 at 2:04 AM, Mariano Kamp mariano.k...@gmail.com
  wrote:
   Anton, thanks. Very interesting.
   On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:

      Check out

  http://android-developers.blogspot.com/2009/02/track-memory-allocatio...

      Romain Guy points out in this post that the android garbage
   collector cannot optimize small short lived objects.  These are
   exactly the sort of objects that could be created in a physics engine
   when it needs to generate dynamic collision constraints.  A good
   solution in this case is to use a pool of constraint objects because
   they are all going to be the same size/object.  The best solution in
   my mind would be for the compiler to do escape analysis on the objects
   and stack allocate them when it sees that they will never escape the
   function.  I have been told that the Java byte code can't reference an
   object on the stack.  It's possible that the Dalvik byte code can, I
   don't know.

      I don't have a reference for this, but I assume that Dalvik's
   inability to optimize small short lived object comes from the fact
   that it uses a mark and sweep GC.  On all of my profiling, I see the
   GC take at least 100ms to run.  For a game that means you miss from
   three to 10 frames of animation and it makes for a pretty noticeable
   hick up.  And I don't think it's my application that is causing the
   garbage collector to fire.  Unless the OpenGL ES calls do some memory
   allocation, which is entirely possible.  I realize that any background
   task could move to the run queue and take some time away from my
   engine, it just happens to be the garbage collector most of the
   time.  :)

      So the result is that the Garbage collector is problematic for me
   in two ways.  First, it's not optimized to deal with the sort of small
   objects that tend to make for good encapsulations of mathematical
   types (like Fixed point number classes or Vector or Matrix classes).
   And secondly it takes a long time to run when it does garbage collect,
   resulting in dropped frames.

      -Anton

   On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
It's maybe a bit off topic, but how do you know that Android's gc is
rudimentary? Have you got a link handy?
I only found

this:http://developer.android.com/guide/practices/design/performance.html

On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com
wrote:

    Shaun, thanks for checking it out.  Yah, I agree that the real
 complexity of a physics engine comes from joints and contact
 constraints.  The constraints in my demo are simple minimum
 distance
 constraints.  I have a 2D rigid body physics engine that I'm
 thinking
 more and more about porting over 

[android-developers] Re: OpenGL What Cube Face Is Facing Me

2009-04-03 Thread Marco Nelissen

On Fri, Apr 3, 2009 at 7:24 AM, William william.caine...@gmail.com wrote:

 //i rotate the cube using the following
 //xRot,yRot are inc or decremented to change angles
 gl.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
 gl.glRotatef(yRot, 0.0f, 1.0f, 0.0f);

 So yes i have access to yRot and xRot but they numbers range from -900
 to +900.  I figure I can used them somehow to tell what is rotated but
 I am unsure how.  i just pass them in and it magically rotates for
 me.  so i am unsure how to tell from the numbers what angle the cube
 is at.

 can I take a trig function to them or what?  or do i take the xRot %
 360 and the remainder is what degree I am at.  Or is xRot in radians
 so I must convert it.

The angles are in degrees.

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

2009-04-03 Thread Stoyan Damov

On Fri, Apr 3, 2009 at 6:24 PM, mscwd01 mscw...@gmail.com wrote:

 I have thrown together a quick example of the APE Physics engine
 (www.cove.org/ape/) running on Android.

 As you can see, simulating 30 or so circles results in a solid 15fps,
 which looks acceptable.


:( 15 fps? IMO it's not that acceptable for action/arcade games
especially ones with fast-moving objects, but I have to try it before
I can be sure.

Cheers

--~--~-~--~~~---~--~~
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 compiled image?

2009-04-03 Thread Ivan Soto
Is it possible to get the 1.5 emulator?

Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Fri, Apr 3, 2009 at 8:32 AM, Al Sutton a...@funkyandroid.com wrote:

  I got the onscreen keyboard whenever I clicked in an EditText (I had to
 click it even if it had the default focus). It then wouldn't go away until I
 clicked the back key (even if I moved off to a button).

 Networking does seem to be non-working in the 1.1 emulator with the 1.5
 images though.


 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 *Ivan Soto
 *Sent:* 03 April 2009 15:29

 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] Re: 1.5 compiled image?

  Thanks again for the images.
 For some reason I can't make Internet work on the emulator. On screen
 keyboard didn't work either. I tried to hold menu button but nothing
 happened.

 The UI is looking great. I like that the applications drawer now has
 something like a carbon fiber background. I hope it fixes the lag like with
 the transparent background.

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com



 On Fri, Apr 3, 2009 at 12:45 AM, Al Sutton a...@funkyandroid.com wrote:

  I'll upload them to a server and send you the URL .

 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 *Ivan Soto
 *Sent:* 03 April 2009 07:43

 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] Re: 1.5 compiled image?

   That would be great. So far the previous images were working fine,
 again, I'm just curious about the performance and how well the interface
 works with the on screen keyboard.
 I will post results as long as I find them.

 Thanks in advance. :)

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com



 On Fri, Apr 3, 2009 at 12:38 AM, Al Sutton a...@funkyandroid.com wrote:

  I can give you those from my build of the SDK from last night if you
 want. I can't guarantee how well they'll work with an earlier SDKs emulator,
 but if you promise to post your results to the list I'll send you a download
 URL (once I've uploaded them)

 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 *Ivan Soto
 *Sent:* 03 April 2009 07:33
 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] Re: 1.5 compiled image?

   I'm just looking for the image file. I just want to test on 1.5.
 In february someone compiled cupcake and distributed the image to replace
 on the emulator.
 the zip contained:
 ramdisk.img
 system.img
 userdata.img

 I was looking for the same but updated. I really don't want to get into
 compiling cupcake by myself.

 Thanks!

 Ivan Soto Fernandez
 Web Developer
 http://ivansotof.com



 On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:

  What OS are you planning to run the SDK on?

 Building a Linux SDK from source isn't too difficult. As yet I haven't
 found any instructions on how to build the windows one.

 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 *Ivan Soto
 *Sent:* 02 April 

[android-developers] Re: OpenGL What Cube Face Is Facing Me

2009-04-03 Thread Streets Of Boston

- Get your objects coordinates in the model view (you should have
those :))
- Get the current model view matrix (see MatrixTrackingGL class in
your APIDemo's source code for OpenGL)
- Take a look the gluUnProject/gluProject methods and use them to
figure out what part of the LCD-screen your 3D objects are occupying.

On Apr 3, 10:24 am, William william.caine...@gmail.com wrote:
 //i rotate the cube using the following
 //xRot,yRot are inc or decremented to change angles
 gl.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
 gl.glRotatef(yRot, 0.0f, 1.0f, 0.0f);

 So yes i have access to yRot and xRot but they numbers range from -900
 to +900.  I figure I can used them somehow to tell what is rotated but
 I am unsure how.  i just pass them in and it magically rotates for
 me.  so i am unsure how to tell from the numbers what angle the cube
 is at.

 can I take a trig function to them or what?  or do i take the xRot %
 360 and the remainder is what degree I am at.  Or is xRot in radians
 so I must convert it.

 On Apr 3, 12:41 am, Marco Nelissen marc...@android.com wrote:



  Since you're rotating and drawing the cube, shouldn't you have that
  information in your app already?

  On Thu, Apr 2, 2009 at 7:30 PM, William william.caine...@gmail.com wrote:

   Hi Folks,

   I am drawing and rotating a cube.  Is there a programmatic way to tell
   what side of the cube is facing me?

   For example if I randomly spin the cube when done spinning. I want to
   know which face(s) I am looking at.  10% of face 1, 90% of face 2.- 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: Are ArrayList / Hashtable's bad for gc on Android?

2009-04-03 Thread Romain Guy

It's actually not a large number, Views usually don't have many children.

This implementation has nothing to do with the GC. The goal is to
avoid going through method calls to manipulate the group's children.

On Fri, Apr 3, 2009 at 4:32 AM, Stoyan Damov stoyan.da...@gmail.com wrote:

 Using hand-crafted code, you can control how much your backing array
 grows -- I suspect ARRAY_CAPACITY_INCREMENT is quite a big number.

 Cheers

 On Fri, Apr 3, 2009 at 1:44 PM, admin.androidsl...@googlemail.com
 admin.androidsl...@googlemail.com wrote:

 I notice in the source code they are not used in critical loops, e.g.
 in View.java :
 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewGroup.java;h=e686d1c20bd21eaa050ff3bf9187b549ee7b1355;hb=HEAD

 I can see this kind of code which would be much easier implemented as
 an ArrayList :

 1867     private void addInArray(View child, int index) {
 1868         View[] children = mChildren;
 1869         final int count = mChildrenCount;
 1870         final int size = children.length;
 1871         if (index == count) {
 1872             if (size == count) {
 1873                 mChildren = new View[size +
 ARRAY_CAPACITY_INCREMENT];
 1874                 System.arraycopy(children, 0, mChildren, 0,
 size);
 1875                 children = mChildren;
 1876             }
 1877             children[mChildrenCount++] = child;
 1878         } else if (index  count) {
 1879             if (size == count) {
 1880                 mChildren = new View[size +
 ARRAY_CAPACITY_INCREMENT];
 1881                 System.arraycopy(children, 0, mChildren, 0,
 index);
 1882                 System.arraycopy(children, index, mChildren,
 index + 1, count - index);
 1883                 children = mChildren;
 1884             } else {
 1885                 System.arraycopy(children, index, children, index
 + 1, count - index);
 1886             }
 1887             children[index] = child;
 1888             mChildrenCount++;
 1889         } else {
 1890             throw new IndexOutOfBoundsException(index= + index
 +  count= + count);
 1891         }
 1892     }
 


 




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

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

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



[android-developers] Re: Which one scales with the screen... Dip, sp, px.....?

2009-04-03 Thread Romain Guy

Simply use the layout_weight on the children of a TableRow or
LinearLayout. Give them all a width of 0dip and the same layout_weight
(1 for instance.) That's all.

On Fri, Apr 3, 2009 at 2:43 AM, Al Sutton a...@funkyandroid.com wrote:

 Given the recent discovery with the cupcake emulator I'm trying to re-work
 the layout file so it's cupcake friendly and future proofed, but have hit a
 problem.

 What I want is for 6 buttons to take up a total of three quarters of the
 screen width, but I can't seem to find the measurement unit which correlates
 to this. All I've found is;

 px  : Not screen resolution independent, so something that works on a
 320x480 screen won't take 3/4s of the screen on different resolution
 display.

 dip : Scales with pixel density and not screen resolution, so the object
 won't scale up as the physical screen size gets bigger.
 Pt, in  mm : Don't scale with screen size so a 1 unit button is the same
 size on a 3 or 30 inch screen.

 sp : Based on font size and there's no guaranteed correlation between font
 width and screen width.


 The closest I've got is the following;

 TableLayout    android:layout_gravity=center_horizontal
                        android:layout_height=wrap_content
                        android:layout_width=fill_parent
 TableRow
        Button android:id=@+id/button1
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button2
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button3
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button4
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button5
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button6
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
 /TableRow
 /TableLayout

 But this results in buttons with uneven widths which is not what I'm after.


 Does anyone have a solution?

 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.



 




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

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

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



[android-developers] Re: 1.5 compiled image?

2009-04-03 Thread Al Sutton
I've only got a linux-x86 package, would that do?
 
By the way there seem to have been some changes to the emulator and some new
parameters added, so it's not as easy as getting the 1.1/1.0 emulator
working.
 
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 Ivan Soto
Sent: 03 April 2009 16:53
To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


Is it possible to get the 1.5 emulator?

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 8:32 AM, Al Sutton a...@funkyandroid.com wrote:


I got the onscreen keyboard whenever I clicked in an EditText (I had to
click it even if it had the default focus). It then wouldn't go away until I
clicked the back key (even if I moved off to a button).
 
Networking does seem to be non-working in the 1.1 emulator with the 1.5
images though.
 
 
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 Ivan Soto

Sent: 03 April 2009 15:29 

To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


Thanks again for the images.
For some reason I can't make Internet work on the emulator. On screen
keyboard didn't work either. I tried to hold menu button but nothing
happened.

The UI is looking great. I like that the applications drawer now has
something like a carbon fiber background. I hope it fixes the lag like with
the transparent background.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:45 AM, Al Sutton a...@funkyandroid.com wrote:


I'll upload them to a server and send you the URL .
 
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 Ivan Soto

Sent: 03 April 2009 07:43 

To: android-developers@googlegroups.com
Subject: [android-developers] Re: 1.5 compiled image?


That would be great. So far the previous images were working fine, again,
I'm just curious about the performance and how well the interface works with
the on screen keyboard. 

I will post results as long as I find them.

Thanks in advance. :)

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:38 AM, Al Sutton a...@funkyandroid.com wrote:


I can give you those from my build of the SDK from last night if you want. I
can't guarantee how well they'll work with an earlier SDKs emulator, but if
you promise to post your results to the list I'll send you a download URL
(once I've uploaded them)
 
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 Ivan Soto

Sent: 03 April 2009 07:33 

To: android-developers@googlegroups.com

Subject: [android-developers] Re: 1.5 compiled image?


I'm just looking for the image file. I just want to test on 1.5. 

In february someone compiled cupcake and distributed the image to replace on
the emulator.
the zip contained:
ramdisk.img
system.img
userdata.img

I was looking for the same but updated. I really don't want to get into
compiling cupcake by myself.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.com




On Fri, Apr 3, 2009 at 12:02 AM, Al Sutton a...@funkyandroid.com wrote:


What OS are you planning to run the SDK on?
 
Building 

[android-developers] Re: Which one scales with the screen... Dip, sp, px.....?

2009-04-03 Thread Al Sutton

Thanks.

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 Romain Guy
Sent: 03 April 2009 16:58
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Which one scales with the screen... Dip,
sp, px.?


Simply use the layout_weight on the children of a TableRow or LinearLayout.
Give them all a width of 0dip and the same layout_weight
(1 for instance.) That's all.

On Fri, Apr 3, 2009 at 2:43 AM, Al Sutton a...@funkyandroid.com wrote:

 Given the recent discovery with the cupcake emulator I'm trying to 
 re-work the layout file so it's cupcake friendly and future proofed, 
 but have hit a problem.

 What I want is for 6 buttons to take up a total of three quarters of 
 the screen width, but I can't seem to find the measurement unit which 
 correlates to this. All I've found is;

 px  : Not screen resolution independent, so something that works on a 
 320x480 screen won't take 3/4s of the screen on different resolution 
 display.

 dip : Scales with pixel density and not screen resolution, so the 
 object won't scale up as the physical screen size gets bigger.
 Pt, in  mm : Don't scale with screen size so a 1 unit button is the 
 same size on a 3 or 30 inch screen.

 sp : Based on font size and there's no guaranteed correlation between 
 font width and screen width.


 The closest I've got is the following;

 TableLayout    android:layout_gravity=center_horizontal
                        android:layout_height=wrap_content
                        android:layout_width=fill_parent
 TableRow
        Button android:id=@+id/button1
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button2
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button3
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button4
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button5
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
        Button android:id=@+id/button6
            android:layout_width=fill_parent
            android:layout_height=wrap_content/
 /TableRow
 /TableLayout

 But this results in buttons with uneven widths which is not what I'm
after.


 Does anyone have a solution?

 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.



 




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

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




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



[android-developers] Re: Android Physics Engine

2009-04-03 Thread mscwd01

I was saying in terms of the other physics engines we have tested,
15fps for 30+ objects is a lot more acceptable than 1-2fps! But yes of
course if you were to create a game which relied heavily on a physics
engine it would be less than ideal ;)

On Apr 3, 4:31 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
 On Fri, Apr 3, 2009 at 6:24 PM, mscwd01 mscw...@gmail.com wrote:

  I have thrown together a quick example of the APE Physics engine
  (www.cove.org/ape/) running on Android.

  As you can see, simulating 30 or so circles results in a solid 15fps,
  which looks acceptable.

 :( 15 fps? IMO it's not that acceptable for action/arcade games
 especially ones with fast-moving objects, but I have to try it before
 I can be sure.

 Cheers
--~--~-~--~~~---~--~~
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 Physics Engine

2009-04-03 Thread Anton

:) That's great to hear.  I know how these things go, so I assumed
that it was being worked on.  I also understand the complexities of
bringing out an NDK.  But personally, that's high on my list of
desired features.  Even one that can't link against any external
libraries would be a good start as it would allow for solid physics
engines and scene graph engines to be constructed.  Not to mention the
benefit of C/C++'s lower level type system, which would allow for the
construction of fast, memory efficient math classes.  :)

Thanks for your efforts and support,
Anton

On Apr 3, 2:29 am, Romain Guy romain...@google.com wrote:
 We're aware of the shortcomings of the current garbage collector and
 believe me, it's one of the things we'd really love to see improved as
 soon as possible :)

 On Fri, Apr 3, 2009 at 2:04 AM, Mariano Kamp mariano.k...@gmail.com wrote:
  Anton, thanks. Very interesting.
  On Fri, Apr 3, 2009 at 2:24 AM, Anton socialhac...@gmail.com wrote:

     Check out
 http://android-developers.blogspot.com/2009/02/track-memory-allocatio...

     Romain Guy points out in this post that the android garbage
  collector cannot optimize small short lived objects.  These are
  exactly the sort of objects that could be created in a physics engine
  when it needs to generate dynamic collision constraints.  A good
  solution in this case is to use a pool of constraint objects because
  they are all going to be the same size/object.  The best solution in
  my mind would be for the compiler to do escape analysis on the objects
  and stack allocate them when it sees that they will never escape the
  function.  I have been told that the Java byte code can't reference an
  object on the stack.  It's possible that the Dalvik byte code can, I
  don't know.

     I don't have a reference for this, but I assume that Dalvik's
  inability to optimize small short lived object comes from the fact
  that it uses a mark and sweep GC.  On all of my profiling, I see the
  GC take at least 100ms to run.  For a game that means you miss from
  three to 10 frames of animation and it makes for a pretty noticeable
  hick up.  And I don't think it's my application that is causing the
  garbage collector to fire.  Unless the OpenGL ES calls do some memory
  allocation, which is entirely possible.  I realize that any background
  task could move to the run queue and take some time away from my
  engine, it just happens to be the garbage collector most of the
  time.  :)

     So the result is that the Garbage collector is problematic for me
  in two ways.  First, it's not optimized to deal with the sort of small
  objects that tend to make for good encapsulations of mathematical
  types (like Fixed point number classes or Vector or Matrix classes).
  And secondly it takes a long time to run when it does garbage collect,
  resulting in dropped frames.

     -Anton

  On Apr 2, 3:32 pm, Mariano Kamp mariano.k...@gmail.com wrote:
   It's maybe a bit off topic, but how do you know that Android's gc is
   rudimentary? Have you got a link handy?
   I only found
   this:http://developer.android.com/guide/practices/design/performance.html

   On Thu, Apr 2, 2009 at 11:59 PM, Anton socialhac...@gmail.com wrote:

   Shaun, thanks for checking it out.  Yah, I agree that the real
complexity of a physics engine comes from joints and contact
constraints.  The constraints in my demo are simple minimum distance
constraints.  I have a 2D rigid body physics engine that I'm thinking
more and more about porting over to Android as well.  This demo was
more of a calibration for myself to see how much computation I can do,
and what optimizations lead to the largest improvements.  I'll
probably turn it into a fun toy for the Market and then look into
rewriting my rigid body engine for Android.

   Reading through Simpull I noticed that you allocate a new Vector3f
in your Verlet update routine.  I think that will be a killer on the
Android platform because of it's rudimentary garbage collector and
limited RAM.  My solution was to allocate an array of fixed point
numbers, four per ball.  Effectively a vector pool that didn't require
any management because the number of balls never changed.

On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
 I took a look at Anton's demo on a G1 device, and I was glad to see
 the integration of accelerometer as it really added value.  I assume
 the calculations for collision detection and response are fairly
 basic, which allows for that performance.

 Simpull will also provide good performance for a scene of that
 nature
 (all verlet, no joints).  At least I believe it will.  The point
 where
 simpull becomes slow is when a more complex scene is in play with
 10s
 of objects with many joints connecting some of them.  Since the
 engine
 is all verlet and no rigid body dynamics, joints 

[android-developers] ScrollView and Programmatically Scrolling

2009-04-03 Thread droozen

So, I have a ScrollView with a single TextView inside it. Upon initial
startup I set the text of the text view to an internally stored string
and try:

ScrollView myScroll = (ScrollView) findViewById(R.id.my_scroll_id);
myScroll.fullScroll(ScrollView.FOCUS_DOWN);

No scrolling happens. (The string is long. I want to show the end of
it. Instead, at this point, view remains at the top.)

Now I append a few more lines to the text, set the TextView's text to
the new text, and perform the same fullScroll(ScrollView.FOCUS_DOWN)
function. It now scrolls, but to the end. For example, if the last
part of the text is:

5
+
5
=
10

After programmatically scrolling down I see:

5
+

I have to manually scroll to see the end.

Am I doing something wrong? How can I reliably get the scroll to show
the end of the 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] onDraw calling frequency

2009-04-03 Thread Bob

Hi,
I have a log of logic in my onDraw but the result (ie screen output)
changes infequently.  Do I need to worry about wasting CPU cycles and
battery with repeated identical calculations or will onDraw only be
called when necessary?

Thanks,
Bob
--~--~-~--~~~---~--~~
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: onDraw calling frequency

2009-04-03 Thread Romain Guy

onDraw() should normally not contain any logic code. This method is
executed as needed by the system when it needs to refresh the screen.

On Fri, Apr 3, 2009 at 10:12 AM, Bob bshumsk...@yahoo.com wrote:

 Hi,
 I have a log of logic in my onDraw but the result (ie screen output)
 changes infequently.  Do I need to worry about wasting CPU cycles and
 battery with repeated identical calculations or will onDraw only be
 called when necessary?

 Thanks,
 Bob
 




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

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

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



[android-developers] Re: Need for backup functionality

2009-04-03 Thread droozen

And how'd you perform the copy? Is there a way to let the user choose
where to copy to? Or how the user can copy it back to the device?

On Apr 3, 8:11 am, MrChaz mrchazmob...@googlemail.com wrote:
 I went with plan B and simple copied the database file

 it lives in  data/data/package name/databases/database name if i
 remember rightly.

 On Apr 2, 9:23 pm, droozen droozenr...@gmail.com wrote:

  So I've come to a need to backup data in my application, so a user can
  safely restore the important data. I had an idea about how to go about
  this, but relatively it's a lot of work just to test if it would work,
  so it'd be nice to get a thumbs up or thumbs down to my plan from
  someone who has tried it, or an alternate way to do it.

  I was thinking that I could compose an email that the user could send
  to himself with a link in it like: 
  content://mycontentprovider/databackup/the
  data, possibly in a delimited format (comma-separated)

  And when the user would click the link it would pull up my content
  provider that would take all the data from the link and restore it
  into my database.

  Alternate idea: save the database file to another machine or email,
  but I wouldn't know how to go about doing this. Can I make my
  application attach the database to an email that could be imported? Is
  it easy to make the user hook up a USB cord to a computer for them to
  manually backup and reload the database file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ANDROID_PROPERTY_WORKSPACE

2009-04-03 Thread davidc...@gmail.com

I tried to add the new property file (same as build.prop format) such
as music.prop to the /sys directory. I studied the code in the
System_property.c as following function, my questions are as following

1. What is __system_property_area__? I saw this is init by
ANDROID_PROPERTY_WORKSPACE.
2. Can I add new prop file? if yes, which directory?


const prop_info *__system_property_find(const char *name)
{
prop_area *pa = __system_property_area__;
unsigned count = pa-count;
unsigned *toc = pa-toc;
unsigned len = strlen(name);
prop_info *pi;

while(count--) {
unsigned entry = *toc++;
if(TOC_NAME_LEN(entry) != len) continue;

pi = TOC_TO_INFO(pa, entry);
if(memcmp(name, pi-name, len)) continue;

return pi;
}

return 0;
}

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



[android-developers] Webview timeout

2009-04-03 Thread davidandroid2...@yahoo.com

Is there a way to set the timeout value in WebView? I want the WebView
to be timeouted within 10 seconds if the url is too slow to response.
Havn't able to find any api to support that.

Thanks,
David

--~--~-~--~~~---~--~~
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] Displaying a Class Variable on Screen

2009-04-03 Thread TrojanSnake12

Basically, what I want to do is have the Preview screen showing the
what the camera is currently pointing at, but I would also like to
display the changing X, Y, Z orientation of the phone.  Currently I am
able to get a handle to the orientation array and its values and store
it in a Global class variable (I think code should work), but I dont
know how to display changing values on screen.  I'm pretty unfamiliar
with UI's, but I want the equivalent of:

-
||
||
||
|Camera Preview |
||
||
||
||
||
||
||
||
| X Coord:  + Global.getX();|
| Y Coord:  + Global.getY();   |
| Z Coord:  + Global.getZ();|
--

Here is my code as it stands right now for setting my Global.X,
Global.Y, Global.Z variables:

public class MyCamera extends Activity{
private Preview preview;
public void capture() {
preview.capture();
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
preview = new Preview(this);
Global.setPreview(preview);
setContentView(preview);

SensorManager sens = (SensorManager) getSystemService
(Context.SENSOR_SERVICE);
MySensorListener sensListener = new MySensorListener();
sens.registerListener(sensListener, 1); // no idea what the 
second
value is supposed to be, something
//
about a bitmask, help on that would be good too.

}

private class MySensorListener implements SensorListener
{

@Override
public void onAccuracyChanged(int sensor, int accuracy) {
// TODO Auto-generated method stub

}

@Override
public void onSensorChanged(int sensor, float[] values) {
if(sensor == 1)
{
Global.setOrientation(values[0], values[1], 
values[2]);
}
}

}

Any help in displaying those numbers at the bottom of the screen would
be a great help.

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



[android-developers] ContentProvider instance

2009-04-03 Thread davidandroid2...@yahoo.com

I have multiple applications which use the same ContentProvider code
for internal WebView to access local files (application private).
Because the ContentProvider has the same code base (package name,
content uri), this will cause problem when deployed 2 or more of my
application in the same device? How do I make the contentProvider only
accessible by its application and prefer a solution without code
changes.

Thanks,
David

--~--~-~--~~~---~--~~
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 file not recognized as such in eclipse

2009-04-03 Thread TrojanSnake12

Yes, the extra info would help.

On Apr 2, 3:11 pm, dan raaka danra...@gmail.com wrote:
 posting xml file contents helps to see if there are any errors

 On Thu, Apr 2, 2009 at 2:58 PM, Sheepz eladk...@gmail.com wrote:

  Hi all, pretty simple question:
  I've created a new xml file in my layouts directory using eclipse's
  new-xml file wizard and i want to be able to use the built in
  layout editor, however, this file is not recognized as an android
  layout file by the editor, but rather as an ordinary file.
  everything compiles and runs okay, but i wanted to know how to do it
  better next time...
  Thanks
  Sh...

--~--~-~--~~~---~--~~
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] scale a view

2009-04-03 Thread Ovuca

Hello,

I'd like to scale a view but when i do it, all the childrens of my
view are scaled too. Is there a way to resize it without resizing its
children ?

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



[android-developers] Re: How to compile android app with static library?could somebody give me a example?thanks

2009-04-03 Thread davidandroid2...@yahoo.com

You can include the the library jar file in your Android Eclipe
project's library.

On 4月1日, 下午11时52分, 打工者 huang.qing...@zte.com.cn wrote:
 How to compile android app with static library?could somebody give me
 a example?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] Why there are 2 instance of same Activityes?

2009-04-03 Thread davidandroid2...@yahoo.com

My application has 2 activities. The main activity will create the
child activity through startActivityForResult((...). When the child
activity needs to exit, it calls setResult(..) and finish(). Child
activity will start and exit multiple time upon user selection. The
activity are start and exit as expected and onAcitivtyResult(..) also
got invoked.

However, I found a problem with child activity, when the child
activity was created the second time ( Main activity called
startActivityForResult(...) upon some user event ), a new instance of
child activity was created, but the displayed is the FIRST instance
child activity!!!  ( so any state in second instance of child activity
was not accessible ). The onKey(...) was always go to first instance
of child activity. Make things more interesting, the getInstanceCount
() returns 3.

I have checked the code and no where holds the first instance of child
activity which should be garbage collected after finish(). Can someone
help out why this happens and how to fix?

Thanks,
David

--~--~-~--~~~---~--~~
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 Emulator do not mount SD card image

2009-04-03 Thread Alexander

Hello Android team,

Any updates on this issue? Unfortunately remount doesn't help.

My command to launch emulator under Ubuntu:
${ANDROID_ROOT}/out/host/linux-x86/bin/emulator -sysdir $
{ANDROID_ROOT}/out/target/product/generic -kernel ${ANDROID_ROOT}/
prebuilt/android-arm/kernel/kernel-qemu -data ${ANDROID_ROOT}/out/
target/product/generic/userdata.img -skindir ${ANDROID_ROOT}/
development/emulator/skins -skin HVGA-P -sdcard ${ANDROID_ROOT}/
sdcard.img

Actually /sdcard is mounted even if I don't use parameter -sdcard in
the command. Anyway in both cases /sdcard is mounted without writable
access:
d- system   system2009-04-03 06:10 sdcard

Music application doesn't see sdcard at all.

Could you please let me know, maybe my launch command is wrong or
perhaps, this is known issue and now under investigation/fixing.

Thanks,
   Alexander

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



[android-developers] Re: I want run my application in background, with Service component

2009-04-03 Thread Todd Sjolander

Using a Notification is one way to go about it.  The Notification can
be linked to an Activity, which gets launched if the user clicks on
the Notification.  Here's some code, which I think I pulled from some
tutorial someplace:

CharSequence text = getText(R.string.remote_service_started);

// Set the icon, scrolling text and timestamp
Notification notification = new Notification(R.drawable.icon,
text,
System.currentTimeMillis());

// The PendingIntent to launch our activity if the user
selects this notification
PendingIntent contentIntent = PendingIntent.getActivity(this,
0,
new Intent(this, MyActivity.class), 0);

// Set the info for the views that show in the notification
panel.
notification.setLatestEventInfo(this, getText
(R.string.remote_service_label),
   text, contentIntent);

// Send the notification.
// We use a string id because it is a unique number.  We use
it later to cancel.
mNM.notify(R.string.remote_service_started, notification);

Good luck!

On Apr 3, 5:03 am, jj jagtap...@gmail.com wrote:
 Hello
     I want run my application in background, with  Service
 component,
 If the application is running in background then there should be icon
 of application, so when user click on icon the application should come
 in fore ground.
    Is this possible in Android, anybody having suggestions plz
 welcome.
    There is provision of Notification Manager for icon, but it is not
 reacting to user events. Is there any other way to this.

 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] Custom theme issues

2009-04-03 Thread Janek Priimann

Is it possible to change color of ListPreference items (bunch of radio
buttons) and button style (ok / cancel) used in an alert dialog?

style name=DialogPreference parent=android:Preference.DialogPreference
item name=android:textColor@color/dark/item
/style

...

style name=Theme parent=android:Theme
item name=android:alertDialogStyle@style/AlertDialog/item
item name=android:buttonStyle@style/Button/item
item name=android:dialogPreferenceStyle@style/DialogPreference/item
item name=android:textColor@color/light/item
/style

Theme works fine, buttons and alert dialogs look custom, but not in
a ListPreference dialog. Major problem at the moment is that we have
white text (because of @color/light) on white background in alert
dialogs.

Janek

--~--~-~--~~~---~--~~
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: Accelerometer/Orientation sensor problem

2009-04-03 Thread chow

I have noticed that the speaker output does effect the magnetic
compass reading a bit. Not too surprising, since the speaker uses an
electromagnet. This is probably what is causing the sensor to jitter
around. As for the accelerometers, I would guess that the movement of
the speaker cone itself is what is causing the fluctuations there.
Perhaps its not a problem, but more of a filtering issue, have your
tried any simple averaging on the sensor output?

chow

On Mar 31, 11:55 am, Liz lizzie...@gmail.com wrote:
 On my T-Mobile G1 (firmware 1.1, build PLAT-RC33), developing in
 SDK1.1r1,  I am experiencing a problem where playing sounds causes the
 output of the accelerometer and orientation sensors to fluctuate
 wildly.     The degree of fluctuation is directly proportional to the
 volume of the sound being played.

 I am using SensorManager per the documentation and examples :

 =  From my implementation of SensorListener
 public void init() {
     SensorManager sm = (SensorManager) cx..getSystemService
 (Context.SENSOR_SERVICE);
     boolean success = sm.registerListener(this,
          SensorManager.SENSOR_ORIENTATION,
          SensorManager.SENSOR_DELAY_GAME);
     // success is true, i.e. no problems acquiring the sensor

 }

 public void onSensorChanged(int sensor, float[] values) {
     if (sensor == SensorManager.SENSOR_ORIENTATION) {
          // print/draw/do something with the sensor output in values[]
     }}

 ==

 I have tried playing sounds with both SoundPool and MediaPlayer, with
 identical results.   When a sample is played at max volume the
 Orientation sensor outputs will bounce around as much as +-/30
 degrees.   All axes are affected.

 I have tested and confirmed this behaviour for SENSOR_ACCELEROMETER,
 SENSOR_ORIENTATION, and SENSOR_ORIENTATION_RAW.  Other sensors may
 also be impacted, but I haven't tested them.

 I have also tested with all of the available sensor sampling rates --
 SENSOR_DELAY_FASTEST through SENSOR_DELAY_UI.   All result in the same
 behavior.

 On a random guess I tried muting the microphone with
 AudioManager.setMicrophoneMute(true) -- same results.

 I thought to try testing this in the Android emulator to see if it
 might be hardware-related, but unfortunately there is currently no
 accelerometer/orientation sensor support in the emulator.

 Is this a known problem?  Or am I doing something wrong here?

 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] which layout is good for Quiz application

2009-04-03 Thread Makrand

Hello
I am a android beginner, now i am going to design a Quiz application
for android I am very confuse about which layout i should use for
Quiz. My requirement is when user touch the answer , the next question
will appear on same screen and at the end of quiz the web view will be
generated as a result page.

Right now i don't have in depth knowledge of Layouts and switching the
view when user clicks on Answers.

Please help me at least suggest me Which layout i use. all types of
suggestions are welcome:)

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



  1   2   >