[android-developers] Editing XML files using DOM in Android

2009-03-11 Thread rajesh

Hi all ,
I am developing an application where i need to update a value in an
XML file according to the value entered by the user  and send this
updated file to some server.I am using DOM to do this ..but the
problem is that the function setNodeValue does not seem to
work When i print the value after changing the content it gives
the same value as before ...

Code:

 NodeList list = null;
DocumentBuilderFactory dbf = 
DocumentBuilderFactory.newInstance();


//xmlFile = fileName;
try
{
DocumentBuilder db = dbf.newDocumentBuilder();
InputStream istream = null;
   istream=(this.mCtx).getResources().openRawResource
(R.raw.currencyconverter);
xmlDoc2 = db.parse(istream);

Element docEle = xmlDoc2.getDocumentElement();
list = docEle.getElementsByTagName("Variable");
 for (int j = 0; j < list.getLength(); j++)
{
Node child = list.item(j);
if (child.getNodeType() == Node.ELEMENT_NODE) {
   Element element=(Element)child;
   setTextValue(element,"contentvalue","1000");
System.out.println("This is the text value"+getTextValue
(element,"contentvalue"));


}
}

}

catch (Exception e)
{
e.printStackTrace();

}
This is the setTextValue method :

 private static void setTextValue(Element ele,String tagName,String
Value)
 {


try {
 NodeList nl = ele.getElementsByTagName(tagName);
 if (nl != null && nl.getLength() > 0)
 {

  Element el = (Element) nl.item(0);

 if (el.getFirstChild() != null)
 {
 el.getFirstChild().setNodeValue(Value);
  // This is the statement which does not
seem to work

 }

 }
}
catch (Exception e)
{

 e.printStackTrace();

}

 }



Please help i am not able to understand what is happening .
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: startActivityForResult problems

2009-03-11 Thread Geos

I found the problem.
It's a singleInstance application launchMode.

On Mar 11, 10:20 pm, Geos  wrote:
> Hello All
>
> I've use startActivityForResult as it described in many examples but
> it return 0 result code after start new Activity.
>
> In main Activity I use such code for sub activity invocation
>
>                 Intent iShowVideo = new Intent(EventHandling.this, 
> ShowVideo.class);
>                 startActivityForResult(iShowVideo, 
> this.REQUEST_CODE_SHOW_VIDEO);
>
> And such code for getting results.
>
>         @Override
>         protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
>                 // TODO Auto-generated method stub
>                 //super.onActivityResult(requestCode, resultCode, data);
>                 if(requestCode == REQUEST_CODE_SHOW_VIDEO){
>                         if(resultCode == RESULT_CANCELED){
>                                 Toast toast = Toast.makeText(this, 
> "onActivityResultCancel: " +
> String.valueOf(resultCode), Toast.LENGTH_LONG);
>                                 toast.show();
>                         }else{
>                                 Toast toast = Toast.makeText(this, 
> "onActivityResult: " +
> String.valueOf(resultCode), Toast.LENGTH_LONG);
>                                 toast.show();
>                         }
>                 }
>         }
>
> Here is a part code from ShowVideo activity
>         @Override
>         protected void onCreate(Bundle savedInstanceState) {
>                 // TODO Auto-generated method stub
>                 super.onCreate(savedInstanceState);
>
>                 setContentView(R.layout.showvideo);
>                 //showDialog(DIALOG_YES_NO_MESSAGE);
>
>         Button button = (Button)findViewById(R.id.btnOK);
>         button.setOnClickListener(mOkListener);
>         button = (Button)findViewById(R.id.btnCancel);
>         button.setOnClickListener(mCancelListener);
>
>         //setResult(RESULT_OK, (new Intent()).setAction("Test!"));
>         }
>
>     private OnClickListener mOkListener = new OnClickListener()
>     {
>         public void onClick(View v)
>         {
>             // To send a result, simply call setResult() before your
>             // activity is finished.
>             setResult(RESULT_OK, (new Intent()).setAction("Corky!"));
>             finish();
>         }
>     };
>
> This code should work according many examples. And it should return
> RESULT_OK after btnOK clicked but after I click this button it only
> closes ShowVideo  Activity.
>
> Please 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] Re: Recording Audio

2009-03-11 Thread benmccann

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

On Mar 9, 11:37 am, benmccann  wrote:
> I'm still feeling directionless when it comes to what
> MediaRecorder.setOutputFile(String path) is expecting.  Is it a
> relative path?  Is it a fully qualified path?  Must the directory we
> are recording in already exist, or will MediaRecorder create it for us
> if it does not exist?  What happens if we specify a file path which
> already exists - will it override the existing file or will it bomb
> out?
>
> On Mar 7, 10:30 pm, benmccann  wrote:
>
> > jdl, I'd be happy to post my code, but I still don't have a working
> > example.  I upgraded to the 1.1 SDK today in hopes that it fixed a bug
> > and things would work for me, but it seems the media APIs are still
> > hopelessly broken.  All I ever get is the meaningless message "start
> > failed".  It looks like perhaps the cause is a buffer overflow in the
> > native code:
>
> > 03-07 21:19:42.059: DEBUG/AudioHardware(25): AudioStreamInGeneric::set
> > (0xac50, 7, 1, 1, 8000)
> > 03-07 21:19:42.069: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x40308020, 320) from fd 7
> > 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x40308160, 320) from fd 7
> > 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x403082a0, 320) from fd 7
> > 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x403083e0, 320) from fd 7
> > 03-07 21:19:42.088: WARN/AudioFlinger(25): AudioRecordThread: buffer
> > overflow
> > 03-07 21:19:42.098: DEBUG/AndroidRuntime(185): Shutting down VM
> > 03-07 21:19:42.098: WARN/dalvikvm(185): threadid=3: thread exiting
> > with uncaught exception (group=0x4000fe68)
> > 03-07 21:19:42.098: ERROR/AndroidRuntime(185): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x40308020, 320) from fd 7
> > 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
> > (0x40308160, 320) from fd 7
> > 03-07 21:19:42.128: ERROR/AndroidRuntime(185):
> > java.lang.RuntimeException: start failed.
> > 03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
> > android.media.MediaRecorder.start(Native Method)
> > 03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
> > com.benmccann.android.hello.AudioRecorder.start(AudioRecorder.java:59)
> > 03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
> > com.benmccann.android.hello.HelloAndroid$1.onClick(HelloAndroid.java:
> > 31)
>
> > On Mar 6, 1:38 pm, benmccann  wrote:
>
> > > Bugs already 
> > > exist:http://code.google.com/p/android/issues/detail?id=450&q=media%20docum..
>
> > > On Mar 5, 9:23 pm, Dave Sparks  wrote:
>
> > > > Log a bug athttp://b.android.com.
>
> > > > On Mar 5, 2:17 pm, jdl  wrote:
>
> > > > > Diane or Dave,
>
> > > > > How do we go about requesting that someone from the Android project
> > > > > update the Audio/Video 
> > > > > tutorial,http://developer.android.com/guide/topics/media/index.html,
> > > > > so that it works with the current version of the API?
>
> > > > > Thanks,
> > > > > AN
>
> > > > > On Feb 28, 2:45 pm, Dianne Hackborn  wrote:
>
> > > > > > You use Context to get at your private data files:
>
> > > > > >http://developer.android.com/guide/topics/data/data-storage.html
>
> > > > > >http://developer.android.com/reference/android/content/Context.html#g...)
>
> > > > > > On Thu, Feb 26, 2009 at 2:40 PM, benmccann 
> > > > > > wrote:
>
> > > > > > > >> each application has its own private data directory /
> > > > > > > >> data/app-private/app-package. I believe your working directory 
> > > > > > > >> is set
> > > > > > > >> to this directory by default
>
> > > > > > > Cool.  So it sounds like I should just be able to use a relative 
> > > > > > > path
> > > > > > > from the current location then.  Unfortunately, I'm getting the
> > > > > > > following exception (with no clues as to why start is failing):
>
> > > > > > > 02-26 14:34:55.132: ERROR/AndroidRuntime(164):
> > > > > > > java.lang.RuntimeException: start failed.
> > > > > > > 02-26 14:34:55.132: ERROR/AndroidRuntime(164):     at
> > > > > > > android.media.MediaRecorder.start(Native Method)
>
> > > > > > > Here's my code:
>
> > > > > > >    final MediaRecorder recorder = new MediaRecorder();
> > > > > > >    recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
> > > > > > >    recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
> > > > > > >    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
> > > > > > >    recorder.setOutputFile("test.3gpp");
> > > > > > >    recorder.prepare();
> > > > > > >    recorder.start();
>
> > > > > > > On Feb 26, 12:14 am, Dave Sparks  wrote:
> > > > > > > > You can get the path to external storage (e.g. SD card) with
> > > > > > > > Environment.getExternalStorageDirectory(). This is world read/
> > > > > > > > writable.
>

[android-developers] Re: SSL client authentication

2009-03-11 Thread telematics

Never mind. I figured it out by my own - add the following to the
manifest.



On Mar 11, 4:40 pm, telematics  wrote:
> I am new on SSL programming. The Android app I am developing needs to
> open an SSL socket to a secure server which requires the client
> authentication. When running on the Emulator and trying to talk to a
> Server running on the host PC, the following Android code snippet
> always gives me a SocketException at the line, SSLSocket c =
> (SSLSocket) f.createSocket(hostName, ) :
>
>     private void openSslClient(String hostName)
>     {
>         try
>         {
>             KeyStore keyStore = KeyStore.getInstance
> (KeyStore.getDefaultType());
>             InputStream fis = this.getAssets().open("client.bks");
>             keyStore.load(fis, "clientjks".toCharArray());
>
>             KeyManagerFactory kmf = KeyManagerFactory.getInstance
> ("X509");
>
>             kmf.init(keyStore, "clientkey".toCharArray());
>
>             TrustManagerFactory tmf = TrustManagerFactory.getInstance
> ("X509");
>
>             tmf.init(keyStore);
>
>             SSLContext sc = SSLContext.getInstance("TLS");
>             sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(),
>                     new SecureRandom());
>
>             SSLSocketFactory f = sc.getSocketFactory();
>             SSLSocket c = (SSLSocket) f.createSocket(hostName, );
>             c.startHandshake();
>             w = new BufferedWriter(new OutputStreamWriter
> (c.getOutputStream()));
>             r = new BufferedReader(new InputStreamReader
> (c.getInputStream()));
>         } catch (Exception e)
>         {
>             Log.e(LOG_TAG, "openSslClient failed", e);
>         }
>     }
>
> The stack trace looks like below:
> 03-11 21:24:00.585: ERROR/OSNetworkSystem(1093): unknown socket error
> -1
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093): openSslClient
> failed
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):
> java.net.SocketException: unknown error
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl
> (Native Method)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> org.apache.harmony.luni.platform.OSNetworkSystem.createSocket
> (OSNetworkSystem.java:79)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> org.apache.harmony.luni.net.PlainSocketImpl2.create
> (PlainSocketImpl2.java:59)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> java.net.Socket.startupSocket(Socket.java:668)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> java.net.Socket.(Socket.java:142)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> javax.net.ssl.SSLSocket.(SSLSocket.java:42)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.
> (OpenSSLSocketImpl.java:179)
> 03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
> org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl.createSocket
> (OpenSSLSocketFactoryImpl.java:65)
>
> The server test program I am using is a modified version of
> SslReverseEchoer available on Dr. Herong Yang's website. It looks like
> below:
>
>         public static void main(String[] args) {
>                 if (args.length < 3) {
>                         System.out.println("Usage:");
>                         System.out
>                                         .println("   java 
> SslReverseEchoerRevised ksName ksPass ctPass
> ipAddr");
>                         return;
>                 }
>                 String ksName = args[0];
>                 char[] ksPass = args[1].toCharArray();
>                 char[] ctPass = args[2].toCharArray();
>                 String ipAddr = args[3];
>                 try {
>                         KeyStore ks = KeyStore.getInstance("BKS");
>                         ks.load(new FileInputStream(ksName), ksPass);
>                         KeyManagerFactory kmf = 
> KeyManagerFactory.getInstance("SunX509");
>                         kmf.init(ks, ctPass);
>                         TrustManagerFactory tmf = 
> TrustManagerFactory.getInstance("X509");
>                         tmf.init(ks);
>                         SSLContext sc = SSLContext.getInstance("TLS");
>                         sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), 
> null);
>                         SSLServerSocketFactory ssf = 
> sc.getServerSocketFactory();
>                         SSLServerSocket s = (SSLServerSocket) 
> ssf.createServerSocket(,
>                                         1, InetAddress.getByName(ipAddr));
>                         s.setNeedClientAuth(true);
>                         printServerSocketInfo(s);
>                         SSLSocket c = (SSLSocket) s.accept();
>                         printSocketInfo(c);
>                         BufferedWriter w = new BufferedWriter(new 
> OutputStreamWriter(c
>                            

[android-developers] Re: Using custom jar files in Android app?

2009-03-11 Thread dillirao malipeddi
you can create your own jar file by select
right click on project of which you want to make jar and select export

choose jar  under java and select the .java files you want to make a jar and

it will create jar for you and you can use that as 3rd party jar

On Thu, Mar 12, 2009 at 10:20 AM, Shadakshari Hiremath wrote:

>
> Hi Dirk,
>
> Thanks for your response. One more question.
> Is it possible to build a jar file from source in eclipse for some
> core modules? If yes then how? If not then is it possible by writting
> a make file? Please provide a sample.
>
> BR
> Shaddu
>
> On 12/03/2009, indiabolbol.com  wrote:
> >
> > create a folder called lib and put 3rd party jar in there. Then add a
> > reference to the jar in Eclipse as any other java app.
> >
> > On Mar 6, 1:22 pm, Dirk Jäckel  wrote:
> >> Hi!
> >>
> >> I use thrid-party jars with my application. All it takes is the
> >> dx-compiler transforming the classfiles to dex-files. It might also be
> >> neccessary to have a uses-library statement in your manifest.
> >> Like: 
> >>
> >> Its explained for eclipse here:
> >>
> >> http://groups.google.com/group/android-developers/browse_thread/threa.
> ..
> >>
> >> It is _not_ necessary to compile (.java -> .class) the jars with the
> >> android sdk.
> >>
> >> Dirk
> > >
> >
>
> >
>


-- 
Dilli Rao. M

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Using custom jar files in Android app?

2009-03-11 Thread Shadakshari Hiremath

Hi Dirk,

Thanks for your response. One more question.
Is it possible to build a jar file from source in eclipse for some
core modules? If yes then how? If not then is it possible by writting
a make file? Please provide a sample.

BR
Shaddu

On 12/03/2009, indiabolbol.com  wrote:
>
> create a folder called lib and put 3rd party jar in there. Then add a
> reference to the jar in Eclipse as any other java app.
>
> On Mar 6, 1:22 pm, Dirk Jäckel  wrote:
>> Hi!
>>
>> I use thrid-party jars with my application. All it takes is the
>> dx-compiler transforming the classfiles to dex-files. It might also be
>> neccessary to have a uses-library statement in your manifest.
>> Like: 
>>
>> Its explained for eclipse here:
>>
>> http://groups.google.com/group/android-developers/browse_thread/threa...
>>
>> It is _not_ necessary to compile (.java -> .class) the jars with the
>> android sdk.
>>
>> Dirk
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Problems with support from T-mobile/General Question

2009-03-11 Thread Dave Sparks

I can't comment on T-Mobile's obligations to you - that is determined
by the terms of the agreement you signed when you signed up. The
Android team does have liaisons who work with the carriers and device
manufacturers and we receive bug reports from them.

On Mar 11, 2:56 pm, Joseph G  wrote:
> Hello,
>
> I am having an issue that looks to be a bug on my Tmobile G1,  but T-
> mobile isn't helping me resolve or expedite it.  The bug details are
> listed here:http://code.google.com/p/android/issues/detail?id=2083.
>
> T-mobile claims that I have the responsibility to troubleshoot Android
> and file bugs for a phone they "support" and run on their network.
> Humorously enough I went to the Better Business Bureau and so they
> finally got back to me after 5 separate calls to support.  They claim
> 2 things that I am wondering about...
>
> 1. Do providers have responsiblity for interfacing with you the
> Android team in submitting bugs on behalf of their supported
> consumers?  Or does the consumer?
>
> 2. Do you have a team within the Android group at Google that works
> with the provider networks?
>
> BTW, the particular "senior" customer service manager I spoke with
> said that the issue related to the fact that Android was open source.
> Being a user, supporter and advocate of FOSS I had to stop and laugh.
> xD  I asked him what that had to do with it and I got no response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] does anyone try using this application - PHONEPLUS CALLBACK?

2009-03-11 Thread npak...@gmail.com

Hi all,

I installed and used this application (http://en.androidwiki.com/wiki/
PhonePlus_Callback) and see that we can do something when call is
coming. I also try to change or modify something on this screen of
dialer when call is coming but i do not know how to do that.I know
this is old topic but I want to ask again because when i searched on
forum, i did not see how to do.

Hope to see your answer,
Thanks very much,
NPAK
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Using custom jar files in Android app?

2009-03-11 Thread indiabolbol.com

create a folder called lib and put 3rd party jar in there. Then add a
reference to the jar in Eclipse as any other java app.

On Mar 6, 1:22 pm, Dirk Jäckel  wrote:
> Hi!
>
> I use thrid-party jars with my application. All it takes is the
> dx-compiler transforming the classfiles to dex-files. It might also be
> neccessary to have a uses-library statement in your manifest.
> Like: 
>
> Its explained for eclipse here:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> It is _not_ necessary to compile (.java -> .class) the jars with the
> android sdk.
>
> Dirk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Request to device test the Android Application

2009-03-11 Thread luodaliang

you can send me a copy too.

On 3月5日, 上午11时43分, nitichandra ingle  wrote:
> Thanks I shall contact u by mail soon take care
>
> On Wed, Mar 4, 2009 at 2:15 PM, www_...@yahoo.com.cn
> wrote:
>
>
>
>
>
> > HI,
> >   Please send me the application,and i can test it for you.
>
> > On 2月26日, 上午12时05分, nitichandra ingle  wrote:
> > > Hi,
>
> > >  We have been developing mobile applications for various mobile platforms
> > > and have recently started Android development. We are facing a small
> > problem
> > > and looking for a volunteer who can just device test the application for
> > us.
>
> > > We have developed an application named "Search & Dine" which is a
> > restaurant
> > > search application for Android.
>
> > > You can see the applicationhttp://www.youtube.com/watch?v=a9b-i9qWuCg
>
> > > Unfortunately, we were not able to device test the application. We are
> > > planning to upgrade the current application with some new features, some
> > of
> > > them based on GPS, which are not possible to test on the emulators. These
> > > features are to enhance the user experience and increase the ease of
> > > searching the restaurants of their choice in their locality.
>
> > > It would be really great if anybody can volunteer for the device testing
> > of
> > > the application, before we upload an upgrade on Android Market. This will
> > > help us develop a better application for the users, and at the same time
> > we
> > > will have your valuable feedback on the applications.
>
> > > Thanks & Regards,
> > > Nitichandra Ingle
> > > MoFirst Solutions Pvt. Ltd.
> > > Email: nitichan...@mofirst.com
> > > Tel: +91-22-28474446www.mofirst.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: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Jesse McGrew

Aha! Adding a call to that method fixes both the context menu problem
and the click handler problem. Thanks.

Jesse

On Mar 11, 7:03 pm, Romain Guy  wrote:
> BTW did you call setItemsCanFocus(true) on your ListView?
>
>
>
> On Wed, Mar 11, 2009 at 7:01 PM, Jesse McGrew  wrote:
>
> > On Mar 11, 6:28 pm, Jesse McGrew  wrote:
> >> On Mar 11, 6:04 pm, Romain Guy  wrote:
>
> >> > > I'm trying to get the same behavior as Alarm Clock, where tapping on a
> >> > > list row brings up an activity to edit the row, and the check box can
> >> > > only be selected by tapping on the check box itself. I think that
> >> > > precludes using multiple-choice mode for the list view, correct?
>
> >> > Indeed it does. ListView is not ready to do things like this really
> >> > but a way to do it (much better than how it was done in AlarmClock) is
> >> > to use a TouchDelegate for the checkbox.
>
> >> Interesting. Unfortunately I can't find any examples of TouchDelegate,
> >> and the class documentation is confusing.
>
> >> I gather that I need to pass the bounds of the check box (relative to
> >> its container) into the TouchDelegate constructor. Once I have a
> >> TouchDelegate instance, what do I do with it? I see a method called
> >> setTouchDelegate() - do I call that on the check box, the list row, or
> >> the view group that directly contains the check box? And is that
> >> method enough to get the touch events relayed to the delegate, or do I
> >> need to listen for touch events and forward them myself?
>
> > Also: would it still be possible to focus the check box using the
> > trackball? I assumed TouchDelegates were only for touch, and so the
> > trackball would only be able to move between list rows. In AlarmClock,
> > the trackball can move horizontally between the clock view and check
> > box inside a row, as well as moving vertically between rows.
>
> > Jesse
>
> --
> 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: Merchant account signup down?

2009-03-11 Thread jsdf

Unfortunately, 24 hours later, it is still down.
And, I check with a friend who works at Google, but he's in Adwords
and is unable to do anything.  Even he said I'm at the mercy of
support, while acknowledging that Google is terrible at support.

Now what?  Suggestions?

On Mar 11, 10:03 am, "keith_hi...@yahoo.com" 
wrote:
> I am having the same issue. Been trying since yesterday to get this
> resolved. Google as of yet has not responded to my tech support
> request.
>
> On Mar 10, 9:16 pm,jsdf wrote:
>
> > I am trying to sign up for a merchant account but it seems to be down:
> > "Sorry, we could not setup your merchant account.
> > Please try again later."
>
> > Can anyone else confirm this, or is it just my login?
>
> > 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: Stream a very large mp3?

2009-03-11 Thread Dave Sparks

I've never tried an MP3 that big - it's quite possible that it won't
work. I think the largest file we ever tested was a one hour MP3 mix
file. I think it was about 70 MB.

On Mar 11, 6:25 pm, g1bb  wrote:
> For the record, here is the code:
>
>  MediaPlayer player = new MediaPlayer();
>
> player.setAudioStreamType(AudioManager.STREAM_MUSIC);
>
> try {
>
> player.setDataSource("http://mybigmp3.mp3";);
> } catch (IllegalArgumentException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> } catch (IllegalStateException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> } catch (IOException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> }
> try {
> player.prepare();
> } catch (IllegalStateException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> player.start();
>
> And the logcat:
> 03-12 01:22:10.996: WARN/System.err(324): java.io.IOException: Prepare
> failed.: status=0xFFF6
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.media.MediaPlayer.prepare(Native Method)
> 03-12 01:22:10.996: WARN/System.err(324): at
> com.myapp.app.Main.onCreate(Main.java:35)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1122)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2104)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2157)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
> 03-12 01:22:10.996: WARN/System.err(324): at
> android.os.Handler.dispatchMessage(Handler.java:88)
> 03-12 01:22:10.996: WARN/System.err(324): at android.os.Looper.loop
> (Looper.java:123)
> 03-12 01:22:11.006: WARN/System.err(324): at
> android.app.ActivityThread.main(ActivityThread.java:3739)
> 03-12 01:22:11.006: WARN/System.err(324): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 03-12 01:22:11.006: WARN/System.err(324): at
> java.lang.reflect.Method.invoke(Method.java:515)
> 03-12 01:22:11.006: WARN/System.err(324): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:739)
> 03-12 01:22:11.006: WARN/System.err(324): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> 03-12 01:22:11.006: WARN/System.err(324): at
> dalvik.system.NativeStart.main(Native Method)
> 03-12 01:22:11.006: ERROR/MediaPlayer(324): start called in state 0
> 03-12 01:22:11.026: ERROR/MediaPlayer(324): Error (-38,0)
>
> On Mar 11, 7:00 pm, g1bb  wrote:
>
> > Hello,
>
> > Is it possible to stream a very large mp3 using MediaPlayer? The mp3 I
> > am interested in is over 270 mb.
>
> > 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: When SIM PIN is blocked, the ril can not function well.

2009-03-11 Thread luodaliang

D/RILJ(   78): [UNSL]< RADIO_STATE_CHANGED SIM_LOCKED_OR_ABSENT
D/RILJ(   78): [0003]> GPRS_REGISTRATION_STATE
D/RILJ(   78): [0004]> REGISTRATION_STATE
D/RILJ(   78): [0005]> QUERY_NETWORK_SELECTION_MODE
D/RILJ(   78): [0006]> BASEBAND_VERSION
D/RILJ(   78): [0007]> GET_IMEI
D/RILJ(   78): [0008]> GET_IMEISV
D/RILJ(   78): [0009]> GET_SIM_STATUS
D/RILJ(   78): [0010]> QUERY_FACILITY_LOCK
I/RILC(  808): RIL Daemon version: android reference-ril 1.0
D/RILJ(   78): [0011]> GET_CURRENT_CALLS
D/RILC(  808): [0001]> SCREEN_STATE (1)
D/RIL (  808): onRequest: SCREEN_STATE
D/RILC(  808): [0001]< SCREEN_STATE returns
E_REQUEST_NOT_SUPPORTED
D/RILJ(   78): wxy0
D/RILJ(   78): wxy1-6
D/RILJ(   78): [0001]< SCREEN_STATE error:
com.android.internal.telephony.gsm.CommandException:
REQUEST_NOT_SUPPORTED
D/RILC(  808): [0002]> OPERATOR
D/RIL (  808): onRequest: OPERATOR
D/AT  (  808): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;
+COPS=3,2;+COPS?
D/AT  (  808): AT< +CME ERROR: 11
E/RIL (  808): requestOperator must not return error when radio is
on
D/RILC(  808): [0002]< OPERATOR returns E_GENERIC_FAILURE
D/RILJ(   78): wxy0
D/RILJ(   78): wxy2-2
D/RILJ(   78): [0002]< OPERATOR error:
com.android.internal.telephony.gsm.CommandException: GENERIC_FAILURE
D/RILC(  808): [0003]> GPRS_REGISTRATION_STATE
D/RIL (  808): onRequest: GPRS_REGISTRATION_STATE
D/AT  (  808): AT> AT+CGREG?
E/GSM (   78): RIL implementation has returned an error where it
must succeed
E/GSM (   78):
com.android.internal.telephony.gsm.CommandException: GENERIC_FAILURE
E/GSM (   78):  at
com.android.internal.telephony.gsm.RILRequest.onError(RIL.java:161)
E/GSM (   78):  at
com.android.internal.telephony.gsm.RIL.processSolicited(RIL.java:1758)
E/GSM (   78):  at
com.android.internal.telephony.gsm.RIL.processResponse(RIL.java:1712)
E/GSM (   78):  at com.android.internal.telephony.gsm.RIL.access
$300(RIL.java:186)
E/GSM (   78):  at com.android.internal.telephony.gsm.RIL
$RILReceiver.run(RIL.java:508)
E/GSM (   78):  at java.lang.Thread.run(Thread.java:935)
D/AT  (  808): AT< +CME ERROR: 11
I/RILJ(   78): 'rild' socket closed
I/RILJ(   78): java.io.IOException: Connection reset by peer
I/RILJ(   78):  at android.net.LocalSocketImpl.readba_native
(Native Method)
I/RILJ(   78):  at android.net.LocalSocketImpl.access$400
(LocalSocketImpl.java:29)
I/RILJ(   78):  at android.net.LocalSocketImpl
$SocketInputStream.read(LocalSocketImpl.java:92)
I/RILJ(   78):  at
com.android.internal.telephony.gsm.RIL.readRilMessage(RIL.java:393)
I/RILJ(   78):  at com.android.internal.telephony.gsm.RIL.access
$200(RIL.java:186)
I/RILJ(   78):  at com.android.internal.telephony.gsm.RIL
$RILReceiver.run(RIL.java:495)
I/RILJ(   78):  at java.lang.Thread.run(Thread.java:935)
I/RILJ(   78): Disconnected from 'rild' socket
D/GSM (   78): Notifying: radio not available
D/GSM (   78): Notifying: radio off or not 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: When SIM PIN is blocked, the ril can not function well.

2009-03-11 Thread luodaliang

I/RIL (  808): Opening tty device /dev/dpmdtty2
D/RILC(  808): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED
{RADIO_OFF}
D/AT  (  808): AT> ATE0Q0V1
D/AT  (  808): AT< OK
D/AT  (  808): AT> ATE0Q0V1
D/AT  (  808): AT< OK
D/AT  (  808): AT> ATS0=0
D/AT  (  808): AT< OK
D/AT  (  808): AT> AT+CMEE=1
D/AT  (  808): AT< OK
D/AT  (  808): AT> AT+CREG=2
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CREG=1
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CGREG=1
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CCWA=1
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CMOD=0
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CMUT=0
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CSSN=0,1
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+COLP=0
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CSCS="HEX"
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CUSD=1
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CGEREP=1,0
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CMGF=0
D/AT  (  808): AT< +CME ERROR: 11
D/AT  (  808): AT> AT+CFUN?
D/AT  (  808): AT< +CFUN: 1
D/AT  (  808): AT< OK
D/RILC(  808): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED
{RADIO_SIM_NOT_READY}
D/AT  (  808): AT> AT+CPIN?
D/AT  (  808): AT< +CPIN: SIM PIN
D/AT  (  808): AT< OK
D/RILC(  808): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED
{RADIO_SIM_LOCKED_OR_ABSENT}
I/RILJ(   78): Connected to 'rild' socket
I/RILC(  808): libril: new connection
D/RILC(  808): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED
{RADIO_SIM_LOCKED_OR_ABSENT}
D/RILJ(   78): wxy1
D/GSM (   78): Notifying: radio available
D/RILJ(   78): [0001]> SCREEN_STATE: true
D/RILJ(   78): [0002]> OPERATOR
D/GSM (   78): Notifying: SIM locked or absent
D/GSM (   78): Notifying: Radio On

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



[android-developers] [RIL Problem] When SIM PIN is blocked, the ril can not function well.

2009-03-11 Thread Nio

Hi All,

   I have met a problem with the RIL. I am using reference ril to
implement SIM PIN unlock
function. When i use a pin blocked SIM card, the Android Java code
through exceptions and
the "rild" is repeatedly disconnected and reconnected. The at command
response is correct
and i suppose it is right for the reference ril to report "GENERIC
FAILURE" when SIM Pin is
blocked. I can not figure out the reason for the error. Can somebody
help me. The log is below:

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Learning JAVA

2009-03-11 Thread Kather Jailani
HI,

Please try Europa. I had some compilation issues with Ganymede. Same code
compiles and works in Europa. (I might have done something wrong with
settings in Ganymede)
On Wed, Mar 11, 2009 at 8:58 PM, JonnySnip3r wrote:

>
> Hey guys was wondering if you could help me, im new to the JAVA
> programming language just started in fact i have installed the
> following...
>
> android-sdk-windows-1.1_r1
> apache-ant-1.7.1-bin
> droiddraw-r1b11
> jdk-6u12-windows-i586-p
> Eclipse Ganymede (latest)
>
> i have installed all the android updates for eclipse but every time i
> start a new android project to learn i keep getting a red cross at the
> side of the package telling me there is an error :|
>
> im a n00b and i have no idea hope someone can help me  i want to start
> ASAP here is where the error is...
>
> Code:
> package com.android.hello.android.hello;
>
> import android.app.Activity;
> import android.os.Bundle;
>
> public class android extends Activity {
>/** Called when the activity is first created. */
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>}
> }
> 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: Bluetooth profile support in cupcake

2009-03-11 Thread Amir

Have you heard anything about this?

On Feb 25, 9:21 am, bmannix  wrote:
> The roadmap for cupcake states that it now supports theBluetoothA2DP
> & AVRCP profiles.  Since theBluetoothAPI was ripped out of 1.0 does
> that mean that these are the only profiles supported?  Or are there
> any other profiles currently supported?

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



[android-developers] [RIL Problem] When SIM PIN is blocked, the ril can not function well.

2009-03-11 Thread Nio

Hi All,

   I have met a problem with the RIL. I am using reference ril to
implement SIM PIN unlock
function. When i use a pin blocked SIM card, the Android Java code
through exceptions and the "rild" is repeatedly disconnected and
reconnected. The at command response is correct and i suppose it is
right for the reference ril to report "GENERIC FAILURE" when SIM Pin
is blocked.
  I can not figure out the reason for the error. Can somebody help
me,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] Problems with support from T-mobile/General Question

2009-03-11 Thread Joseph G

Hello,

I am having an issue that looks to be a bug on my Tmobile G1,  but T-
mobile isn't helping me resolve or expedite it.  The bug details are
listed here: http://code.google.com/p/android/issues/detail?id=2083.

T-mobile claims that I have the responsibility to troubleshoot Android
and file bugs for a phone they "support" and run on their network.
Humorously enough I went to the Better Business Bureau and so they
finally got back to me after 5 separate calls to support.  They claim
2 things that I am wondering about...

1. Do providers have responsiblity for interfacing with you the
Android team in submitting bugs on behalf of their supported
consumers?  Or does the consumer?

2. Do you have a team within the Android group at Google that works
with the provider networks?

BTW, the particular "senior" customer service manager I spoke with
said that the issue related to the fact that Android was open source.
Being a user, supporter and advocate of FOSS I had to stop and laugh.
xD  I asked him what that had to do with it and I got no response.

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



[android-developers] Learning JAVA

2009-03-11 Thread JonnySnip3r

Hey guys was wondering if you could help me, im new to the JAVA
programming language just started in fact i have installed the
following...

android-sdk-windows-1.1_r1
apache-ant-1.7.1-bin
droiddraw-r1b11
jdk-6u12-windows-i586-p
Eclipse Ganymede (latest)

i have installed all the android updates for eclipse but every time i
start a new android project to learn i keep getting a red cross at the
side of the package telling me there is an error :|

im a n00b and i have no idea hope someone can help me  i want to start
ASAP here is where the error is...

Code:
package com.android.hello.android.hello;

import android.app.Activity;
import android.os.Bundle;

public class android extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
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: Am I being banned from the list?

2009-03-11 Thread Pd

Anything to do with this?

Status: 552 5.2.2 minokr: mbox is over quota


I know there have been problems with gmail lately so maybe related.  But 
just in case try cleaning your mail box.  Just a guess   :-)


Pd.


Stoyan Damov wrote:
> Hi,
>
> It's the 2nd post for which I'm getting:
>
> ---
>
> The original message was received at ...
>
>   The following addresses had permanent fatal errors 
> 
>  (552 5.2.2 minokr: mbox is over quota)
>
> Final-Recipient: RFC822; min...@hanmail.net
> Action: failed
> Status: 552 5.2.2 minokr: mbox is over quota
>
>
> -- Forwarded message --
> From: Stoyan Damov 
> To: android-developers@googlegroups.com
> Date: Wed, 11 Mar 2009 22:57:26 +0200
> Subject: [android-developers] Re: Risk of upgrading to 1.1?
>
> I have released my game on 19th of February, built against SDK 1.1 but
> no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
> working on 1.0 devices. So far I haven't got a report that it's not
> working on any device, other than the intermittent "Force Close"
> issues after an update.
>
> Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
> haven't had any problems. Surely I haven't used any feature from 1.1,
> not that there are many.
>
> Do read http://developer.android.com/sdk/android-1.1.html to get more
> confidence.
>
> Cheers
>
> -
>
> So, am I being banned or what?
>
> >
>
>   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Repo Client init problem ubuntu 8.10

2009-03-11 Thread doubleslash

I have the same problem. I tried curl and verified indeed the whole
python script was downloaded. I installed libreadline5-dev instead of
lib32readline5.dev because my computer could not find the latter. I
cannot initilize repo. Can someone help?

On Jan 30, 5:15 am, Bernhard  wrote:
> Same Problem here:
> i flowed the instrcutions 
> at:http://docs.google.com/View?docid=ajdmx8kfg357_81cmpr56f6
> VMware with Ubuntu 8.10
> ---
> m...@desktop:~/eee$ repo init -u 
> git://android.git.kernel.org/platform/manifest.git
> Traceback (most recent call last):
>   File "/bin/repo", line 590, in 
>     main(sys.argv[1:])
>   File "/bin/repo", line 557, in main
>     _Init(args)
>   File "/bin/repo", line 176, in _Init
>     _CheckGitVersion()
>   File "/bin/repo", line 205, in _CheckGitVersion
>     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>   File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
>     errread, errwrite)
>   File "/usr/lib/python2.5/subprocess.py", line 1153, in
> _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory
> ---
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Romain Guy

BTW did you call setItemsCanFocus(true) on your ListView?

On Wed, Mar 11, 2009 at 7:01 PM, Jesse McGrew  wrote:
>
> On Mar 11, 6:28 pm, Jesse McGrew  wrote:
>> On Mar 11, 6:04 pm, Romain Guy  wrote:
>>
>> > > I'm trying to get the same behavior as Alarm Clock, where tapping on a
>> > > list row brings up an activity to edit the row, and the check box can
>> > > only be selected by tapping on the check box itself. I think that
>> > > precludes using multiple-choice mode for the list view, correct?
>>
>> > Indeed it does. ListView is not ready to do things like this really
>> > but a way to do it (much better than how it was done in AlarmClock) is
>> > to use a TouchDelegate for the checkbox.
>>
>> Interesting. Unfortunately I can't find any examples of TouchDelegate,
>> and the class documentation is confusing.
>>
>> I gather that I need to pass the bounds of the check box (relative to
>> its container) into the TouchDelegate constructor. Once I have a
>> TouchDelegate instance, what do I do with it? I see a method called
>> setTouchDelegate() - do I call that on the check box, the list row, or
>> the view group that directly contains the check box? And is that
>> method enough to get the touch events relayed to the delegate, or do I
>> need to listen for touch events and forward them myself?
>
> Also: would it still be possible to focus the check box using the
> trackball? I assumed TouchDelegates were only for touch, and so the
> trackball would only be able to move between list rows. In AlarmClock,
> the trackball can move horizontally between the clock view and check
> box inside a row, as well as moving vertically between rows.
>
> Jesse
> >
>



-- 
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: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Jesse McGrew

On Mar 11, 6:28 pm, Jesse McGrew  wrote:
> On Mar 11, 6:04 pm, Romain Guy  wrote:
>
> > > I'm trying to get the same behavior as Alarm Clock, where tapping on a
> > > list row brings up an activity to edit the row, and the check box can
> > > only be selected by tapping on the check box itself. I think that
> > > precludes using multiple-choice mode for the list view, correct?
>
> > Indeed it does. ListView is not ready to do things like this really
> > but a way to do it (much better than how it was done in AlarmClock) is
> > to use a TouchDelegate for the checkbox.
>
> Interesting. Unfortunately I can't find any examples of TouchDelegate,
> and the class documentation is confusing.
>
> I gather that I need to pass the bounds of the check box (relative to
> its container) into the TouchDelegate constructor. Once I have a
> TouchDelegate instance, what do I do with it? I see a method called
> setTouchDelegate() - do I call that on the check box, the list row, or
> the view group that directly contains the check box? And is that
> method enough to get the touch events relayed to the delegate, or do I
> need to listen for touch events and forward them myself?

Also: would it still be possible to focus the check box using the
trackball? I assumed TouchDelegates were only for touch, and so the
trackball would only be able to move between list rows. In AlarmClock,
the trackball can move horizontally between the clock view and check
box inside a row, as well as moving vertically between rows.

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



[android-developers] Re: access parent's protected variable when extend a android class!

2009-03-11 Thread Romain Guy

Because as you said, this field has the default access modifier, which
restricts its use to the android.widget package.

On Wed, Mar 11, 2009 at 6:39 PM, jusun...@gmail.com  wrote:
>
> thanks Jon Colverson.
> I can see also that mInLayout isn't actually protected, it has
> default.
> then.
> but when I build, build log tell me that I cannot access mInLayout
> from outside package
>> /home/bobos26/work/devel/omap_test/packages/apps/Launcher/src/com/
>> android/launcher/WRGallery.java:27: mInLayout is not public in
>> android.widget.AdapterView; cannot be accessed from outside package
>>        mInLayout = true;
>>        ^
> please. help me!! nobody know the reason?
>
>
> >
>



-- 
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: access parent's protected variable when extend a android class!

2009-03-11 Thread jusun...@gmail.com

thanks Jon Colverson.
I can see also that mInLayout isn't actually protected, it has
default.
then.
but when I build, build log tell me that I cannot access mInLayout
from outside package
> /home/bobos26/work/devel/omap_test/packages/apps/Launcher/src/com/
> android/launcher/WRGallery.java:27: mInLayout is not public in
> android.widget.AdapterView; cannot be accessed from outside package
>mInLayout = true;
>^
please. help me!! nobody know the reason?


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



[android-developers] Fails to connect to AP(which didn't support DHCP Service)

2009-03-11 Thread joseph

I tried connect to AP(DHCP componet is disabled) with Google dev phone
1.
It fails to connect to that AP. Can't get a ip address from AP.
I hoped the dev phone succefully connect to the AP, and assign own
auto-ip by itself(169.254.xx.xx). But It didn't happend. I think it
must be abnormal case.

Is there any special way to get an Auto IP address?
(ex. change WiFi Driver...)

Thanks
 -joe-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Jesse McGrew

On Mar 11, 6:04 pm, Romain Guy  wrote:
> > I'm trying to get the same behavior as Alarm Clock, where tapping on a
> > list row brings up an activity to edit the row, and the check box can
> > only be selected by tapping on the check box itself. I think that
> > precludes using multiple-choice mode for the list view, correct?
>
> Indeed it does. ListView is not ready to do things like this really
> but a way to do it (much better than how it was done in AlarmClock) is
> to use a TouchDelegate for the checkbox.

Interesting. Unfortunately I can't find any examples of TouchDelegate,
and the class documentation is confusing.

I gather that I need to pass the bounds of the check box (relative to
its container) into the TouchDelegate constructor. Once I have a
TouchDelegate instance, what do I do with it? I see a method called
setTouchDelegate() - do I call that on the check box, the list row, or
the view group that directly contains the check box? And is that
method enough to get the touch events relayed to the delegate, or do I
need to listen for touch events and forward them myself?

Jesse
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Stream a very large mp3?

2009-03-11 Thread g1bb

For the record, here is the code:

 MediaPlayer player = new MediaPlayer();

player.setAudioStreamType(AudioManager.STREAM_MUSIC);

try {

player.setDataSource("http://mybigmp3.mp3";);
} catch (IllegalArgumentException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IllegalStateException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
player.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
player.start();


And the logcat:
03-12 01:22:10.996: WARN/System.err(324): java.io.IOException: Prepare
failed.: status=0xFFF6
03-12 01:22:10.996: WARN/System.err(324): at
android.media.MediaPlayer.prepare(Native Method)
03-12 01:22:10.996: WARN/System.err(324): at
com.myapp.app.Main.onCreate(Main.java:35)
03-12 01:22:10.996: WARN/System.err(324): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
03-12 01:22:10.996: WARN/System.err(324): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2104)
03-12 01:22:10.996: WARN/System.err(324): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2157)
03-12 01:22:10.996: WARN/System.err(324): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
03-12 01:22:10.996: WARN/System.err(324): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
03-12 01:22:10.996: WARN/System.err(324): at
android.os.Handler.dispatchMessage(Handler.java:88)
03-12 01:22:10.996: WARN/System.err(324): at android.os.Looper.loop
(Looper.java:123)
03-12 01:22:11.006: WARN/System.err(324): at
android.app.ActivityThread.main(ActivityThread.java:3739)
03-12 01:22:11.006: WARN/System.err(324): at
java.lang.reflect.Method.invokeNative(Native Method)
03-12 01:22:11.006: WARN/System.err(324): at
java.lang.reflect.Method.invoke(Method.java:515)
03-12 01:22:11.006: WARN/System.err(324): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
03-12 01:22:11.006: WARN/System.err(324): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
03-12 01:22:11.006: WARN/System.err(324): at
dalvik.system.NativeStart.main(Native Method)
03-12 01:22:11.006: ERROR/MediaPlayer(324): start called in state 0
03-12 01:22:11.026: ERROR/MediaPlayer(324): Error (-38,0)


On Mar 11, 7:00 pm, g1bb  wrote:
> Hello,
>
> Is it possible to stream a very large mp3 using MediaPlayer? The mp3 I
> am interested in is over 270 mb.
>
> 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: NinePatchDrawable constructor

2009-03-11 Thread Romain Guy (Google)

I can't help you with native crashes unfortunately :(

On Mar 9, 10:36 am, Ron  wrote:
> Sorry, the last time I posted I couldn't figure out how to get the
> logcat text... then I found it was relatively simple.  Here is the
> dump:
>
> 03-09 12:29:05.734: INFO/DEBUG(28): *** *** *** *** *** *** *** ***
> *** *** *** *** *** *** *** ***
> 03-09 12:29:05.734: INFO/DEBUG(28): Build fingerprint: 'android-
> devphone1/dream_devphone/dream/trout:1.0/UNLOCKED/116222:userdebug/
> test-keys'
> 03-09 12:29:05.734: INFO/DEBUG(28): pid: 8966, tid: 8966  >>>
> mobiliti.android.ui <<<
> 03-09 12:29:05.734: INFO/DEBUG(28): signal 11 (SIGSEGV), fault addr
> 0008
> 03-09 12:29:05.734: INFO/DEBUG(28):  r0 baf0  r1 0007  r2
> ad03e18d  r3 
> 03-09 12:29:05.734: INFO/DEBUG(28):  r4 baf0  r5   r6
> ad33f411  r7 4104d880
> 03-09 12:29:05.744: INFO/DEBUG(28):  r8 bef5c630  r9 4104d878  10
> 4104d868  fp 
> 03-09 12:29:05.744: INFO/DEBUG(28):  ip ad33f411  sp bef5c610  lr
> ad0471bd  pc ad03e1a0  cpsr 0030
> 03-09 12:29:06.194: INFO/DEBUG(28):          #00  pc ad03e1a0  /system/
> lib/libdvm.so
> 03-09 12:29:06.214: INFO/DEBUG(28):          #01  pc ad33f426  /system/
> lib/libandroid_runtime.so
> 03-09 12:29:06.224: INFO/DEBUG(28):          #02  pc ad00d9f4  /system/
> lib/libdvm.so
> 03-09 12:29:06.224: INFO/DEBUG(28):          #03  pc ad04120e  /system/
> lib/libdvm.so
> 03-09 12:29:06.234: INFO/DEBUG(28):          #04  pc ad012748  /system/
> lib/libdvm.so
> 03-09 12:29:06.234: INFO/DEBUG(28):          #05  pc ad02a92c  /system/
> lib/libdvm.so
> 03-09 12:29:06.234: INFO/DEBUG(28):          #06  pc ad0169d0  /system/
> lib/libdvm.so
> 03-09 12:29:06.244: INFO/DEBUG(28):          #07  pc ad052096  /system/
> lib/libdvm.so
> 03-09 12:29:06.244: INFO/DEBUG(28):          #08  pc ad03ccbc  /system/
> lib/libdvm.so
> 03-09 12:29:06.254: INFO/DEBUG(28):          #09  pc ad012748  /system/
> lib/libdvm.so
> 03-09 12:29:06.254: INFO/DEBUG(28):          #10  pc ad02a92c  /system/
> lib/libdvm.so
> 03-09 12:29:06.254: INFO/DEBUG(28):          #11  pc ad0169d0  /system/
> lib/libdvm.so
> 03-09 12:29:06.264: INFO/DEBUG(28):          #12  pc ad051f10  /system/
> lib/libdvm.so
> 03-09 12:29:06.264: INFO/DEBUG(28):          #13  pc ad03f87a  /system/
> lib/libdvm.so
> 03-09 12:29:06.274: INFO/DEBUG(28):          #14  pc ad3282b4  /system/
> lib/libandroid_runtime.so
> 03-09 12:29:06.274: INFO/DEBUG(28):          #15  pc ad328d40  /system/
> lib/libandroid_runtime.so
> 03-09 12:29:06.274: INFO/DEBUG(28):          #16  pc 8c12  /system/
> bin/app_process
> 03-09 12:29:06.284: INFO/DEBUG(28):          #17  pc afe1dbd2  /system/
> lib/libc.so
> 03-09 12:29:06.294: INFO/DEBUG(28):          #18  pc afe0b010  /system/
> lib/libc.so
> 03-09 12:29:06.304: INFO/DEBUG(28):          #19  pc bd70  /system/
> bin/linker
> 03-09 12:29:06.304: INFO/DEBUG(28): stack:
> 03-09 12:29:06.304: INFO/DEBUG(28):     bef5c5d0  a000  [heap]
> 03-09 12:29:06.304: INFO/DEBUG(28):     bef5c5d4  ad0481ab  /system/
> lib/libdvm.so
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5d8  0322
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5dc  
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5e0  400240b8
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5e4  ad060361  /system/
> lib/libdvm.so
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5e8  4476be28
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5ec  0003
> 03-09 12:29:06.314: INFO/DEBUG(28):     bef5c5f0  baf0  [heap]
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c5f4  0001
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c5f8  0007
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c5fc  ad0471bd  /system/
> lib/libdvm.so
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c600  baf0  [heap]
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c604  
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c608  df002777
> 03-09 12:29:06.324: INFO/DEBUG(28):     bef5c60c  e3a070ad
> 03-09 12:29:06.334: INFO/DEBUG(28): #00 bef5c610  0320
> 03-09 12:29:06.334: INFO/DEBUG(28):     bef5c614  a870  [heap]
> 03-09 12:29:06.334: INFO/DEBUG(28):     bef5c618  ad35bcf8
> 03-09 12:29:06.334: INFO/DEBUG(28):     bef5c61c  ad33f429  /system/
> lib/libandroid_runtime.so
> 03-09 12:29:06.334: INFO/DEBUG(28): #01 bef5c620  0018
> 03-09 12:29:06.334: INFO/DEBUG(28):     bef5c624  bef5c650  [stack]
> 03-09 12:29:06.334: INFO/DEBUG(28):     bef5c628  
> 03-09 12:29:06.344: INFO/DEBUG(28):     bef5c62c  ad00d9f8  /system/
> lib/libdvm.so
> 03-09 12:29:07.294: DEBUG/dalvikvm(4482): GC freed 3599 objects /
> 241312 bytes in 259ms
> 03-09 12:29:08.254: DEBUG/AudioHardwareMSM72XX(31): Going to standby
> 03-09 12:29:08.284: INFO/DEBUG(28): debuggerd committing suicide to
> free the zombie!
> 03-09 12:29:08.314: INFO/DEBUG(8986): debuggerd: Nov  3 2008 12:56:23
> 03-09 12:29:08.324: DEBUG/dalvikvm(51): GC freed 25597 objects /
> 941072 bytes in 397ms
> 03-09 12:29:08.

[android-developers] Re: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Jesse McGrew

On Mar 11, 5:57 pm, Jesse McGrew  wrote:
> Thanks for your response. I'm not sure if that approach will work,
> though. My ListActivity's onListItemClick() method is called when I
> click on an item with the trackball, but *not* when I touch it.

It looks like I can handle both cases by setting a click listener on
the row *and* responding to onListItemClick().

Now I wonder if there's a way to make the context menu only appear for
data rows, not the list header row. (This works as expected with
touch, but with the trackball, I still get a context menu on the
header row.)

Jesse
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Romain Guy

> I'm trying to get the same behavior as Alarm Clock, where tapping on a
> list row brings up an activity to edit the row, and the check box can
> only be selected by tapping on the check box itself. I think that
> precludes using multiple-choice mode for the list view, correct?

Indeed it does. ListView is not ready to do things like this really
but a way to do it (much better than how it was done in AlarmClock) is
to use a TouchDelegate for the checkbox.

>
> Jesse
>
> On Mar 11, 4:38 pm, "Romain Guy (Google)" 
> wrote:
>> Hi Jesse,
>>
>> You should **not** set individual click listeners on the list items.
>> This will cause all sort of problems, like the ones you're seeing. The
>> main reason behind that is that ListView handles clicks/long clicks on
>> the items already. Instead you should use
>> ListView.setOnItemClickListener().
>>
>> On Mar 5, 6:54 pm, Jesse McGrew  wrote:
>>
>> > I have a list activity that creates a header row above the data rows
>> > from the adapter. I want to receive click events when the user selects
>> > the header or a data row (but my data rows have check boxes in them,
>> > so this part is tricky). When I use the touch screen, I get this
>> > expected behavior:
>>
>> > 1. Tapping on any row causes a click event and a dialog appears.
>> > 2. Long-pressing on a data row causes a context menu to appear.
>> > 3. Long-pressing on the header row does *not* show the context menu.
>>
>> > However, when I use the arrow keys (emulator) or trackball (G1), I get
>> > this unexpected behavior:
>>
>> > 1. Selecting any row fails to cause any click events, even though the
>> > row's appearance changes like it's being clicked.
>> > 2. Long-pressing on the header row *does* show the context menu, which
>> > I don't want.
>> > 3. Occasionally, it doesn't focus the correct row when I move up or
>> > down (e.g. it skips from the header to the last data row).
>>
>> > What am I doing wrong?
>>
>> > Jesse
>>
>> > (Complete project:http://hansprestige.com/android/DpadBug.zip)
>>
>> > // DpadActivity.java //
>>
>> > package com.hansprestige.DpadBug;
>>
>> > import android.app.AlertDialog;
>> > import android.app.Dialog;
>> > import android.app.ListActivity;
>> > import android.os.Bundle;
>> > import android.view.ContextMenu;
>> > import android.view.View;
>> > import android.view.ViewGroup;
>> > import android.view.ContextMenu.ContextMenuInfo;
>> > import android.view.View.OnClickListener;
>> > import android.widget.ArrayAdapter;
>> > import android.widget.ListView;
>>
>> > public class DpadBugActivity extends ListActivity {
>> >         private static final int DIALOG_TEST = 1;
>>
>> >     private OnClickListener testListener = new OnClickListener() {
>> >         public void onClick(View v) {
>> >                 showDialog(DIALOG_TEST);
>> >         }
>> >     };
>>
>> >     @Override
>> >     public void onCreate(Bundle savedInstanceState) {
>> >         super.onCreate(savedInstanceState);
>> >         setContentView(R.layout.main);
>>
>> >         ListView lv = getListView();
>> >         registerForContextMenu(lv);
>>
>> >         findViewById(android.R.id.empty).setOnClickListener
>> > (testListener);
>>
>> >         View addItem = getLayoutInflater().inflate
>> > (R.layout.list_header,
>> >                         null, false);
>> >         addItem.setOnClickListener(testListener);
>> >         lv.addHeaderView(addItem);
>>
>> >         fillData();
>>
>> > }
>>
>> >     private void fillData()
>> >     {
>> >         String[] items = new String[] { "Item A", "Item B", "Item C" };
>> >         ArrayAdapter adapter = new ArrayAdapter(this,
>> > R.layout.list_row, R.id.TextView01, items) {
>> >                 @Override
>> >                 public View getView(int position, View convertView, 
>> > ViewGroup
>> > parent) {
>> >                         View v = super.getView(position, convertView, 
>> > parent);
>> >                         v.setOnClickListener(testListener);
>> >                         v.setLongClickable(true);
>> >                         return v;
>> >                 }
>> >         };
>> >         setListAdapter(adapter);
>> >     }
>>
>> >     @Override
>> >     protected Dialog onCreateDialog(int id) {
>> >         switch (id) {
>> >         case DIALOG_TEST:
>> >                 return new AlertDialog.Builder(this)
>> >                         .setTitle("Hello!")
>> >                         .setPositiveButton("Close", null)
>> >                         .create();
>> >         }
>> >         return super.onCreateDialog(id);
>> >     }
>>
>> >     @Override
>> >     public void onCreateContextMenu(ContextMenu menu, View v,
>> >                 ContextMenuInfo menuInfo) {
>> >         super.onCreateContextMenu(menu, v, menuInfo);
>> >         menu.add("Context item");
>> >     }
>>
>> > }
>>
>> > // main.xml //
>>
>> > 
>> > http://schemas.android.com/apk/res/
>> > android"
>> >         android:layout_width="fill_parent"
>> >     android:l

[android-developers] Stream a very large mp3?

2009-03-11 Thread g1bb

Hello,

Is it possible to stream a very large mp3 using MediaPlayer? The mp3 I
am interested in is over 270 mb.

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: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Jesse McGrew

Romain,

Thanks for your response. I'm not sure if that approach will work,
though. My ListActivity's onListItemClick() method is called when I
click on an item with the trackball, but *not* when I touch it.

Perhaps the root problem is that my list rows have focusable items in
them (check boxes). The built-in Alarm Clock application has something
similar, though, and I can see from the source code that Alarm Clock
sets individual click listeners on the check boxes and the clock
views.

I'm trying to get the same behavior as Alarm Clock, where tapping on a
list row brings up an activity to edit the row, and the check box can
only be selected by tapping on the check box itself. I think that
precludes using multiple-choice mode for the list view, correct?

Jesse

On Mar 11, 4:38 pm, "Romain Guy (Google)" 
wrote:
> Hi Jesse,
>
> You should **not** set individual click listeners on the list items.
> This will cause all sort of problems, like the ones you're seeing. The
> main reason behind that is that ListView handles clicks/long clicks on
> the items already. Instead you should use
> ListView.setOnItemClickListener().
>
> On Mar 5, 6:54 pm, Jesse McGrew  wrote:
>
> > I have a list activity that creates a header row above the data rows
> > from the adapter. I want to receive click events when the user selects
> > the header or a data row (but my data rows have check boxes in them,
> > so this part is tricky). When I use the touch screen, I get this
> > expected behavior:
>
> > 1. Tapping on any row causes a click event and a dialog appears.
> > 2. Long-pressing on a data row causes a context menu to appear.
> > 3. Long-pressing on the header row does *not* show the context menu.
>
> > However, when I use the arrow keys (emulator) or trackball (G1), I get
> > this unexpected behavior:
>
> > 1. Selecting any row fails to cause any click events, even though the
> > row's appearance changes like it's being clicked.
> > 2. Long-pressing on the header row *does* show the context menu, which
> > I don't want.
> > 3. Occasionally, it doesn't focus the correct row when I move up or
> > down (e.g. it skips from the header to the last data row).
>
> > What am I doing wrong?
>
> > Jesse
>
> > (Complete project:http://hansprestige.com/android/DpadBug.zip)
>
> > // DpadActivity.java //
>
> > package com.hansprestige.DpadBug;
>
> > import android.app.AlertDialog;
> > import android.app.Dialog;
> > import android.app.ListActivity;
> > import android.os.Bundle;
> > import android.view.ContextMenu;
> > import android.view.View;
> > import android.view.ViewGroup;
> > import android.view.ContextMenu.ContextMenuInfo;
> > import android.view.View.OnClickListener;
> > import android.widget.ArrayAdapter;
> > import android.widget.ListView;
>
> > public class DpadBugActivity extends ListActivity {
> >         private static final int DIALOG_TEST = 1;
>
> >     private OnClickListener testListener = new OnClickListener() {
> >         public void onClick(View v) {
> >                 showDialog(DIALOG_TEST);
> >         }
> >     };
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
>
> >         ListView lv = getListView();
> >         registerForContextMenu(lv);
>
> >         findViewById(android.R.id.empty).setOnClickListener
> > (testListener);
>
> >         View addItem = getLayoutInflater().inflate
> > (R.layout.list_header,
> >                         null, false);
> >         addItem.setOnClickListener(testListener);
> >         lv.addHeaderView(addItem);
>
> >         fillData();
>
> > }
>
> >     private void fillData()
> >     {
> >         String[] items = new String[] { "Item A", "Item B", "Item C" };
> >         ArrayAdapter adapter = new ArrayAdapter(this,
> > R.layout.list_row, R.id.TextView01, items) {
> >                 @Override
> >                 public View getView(int position, View convertView, 
> > ViewGroup
> > parent) {
> >                         View v = super.getView(position, convertView, 
> > parent);
> >                         v.setOnClickListener(testListener);
> >                         v.setLongClickable(true);
> >                         return v;
> >                 }
> >         };
> >         setListAdapter(adapter);
> >     }
>
> >     @Override
> >     protected Dialog onCreateDialog(int id) {
> >         switch (id) {
> >         case DIALOG_TEST:
> >                 return new AlertDialog.Builder(this)
> >                         .setTitle("Hello!")
> >                         .setPositiveButton("Close", null)
> >                         .create();
> >         }
> >         return super.onCreateDialog(id);
> >     }
>
> >     @Override
> >     public void onCreateContextMenu(ContextMenu menu, View v,
> >                 ContextMenuInfo menuInfo) {
> >         super.onCreateContextMenu(menu, v, menuInfo);
> >         menu.add("Context item");
> >     }
>
> 

[android-developers] Re: Using the word "Android" in a market developer name

2009-03-11 Thread Hayden

Ok, I think it's fine.  I just searched the Market and there are
several developers doing this already

On Mar 11, 8:50 pm, Hayden  wrote:
> Is it against Google's rules to use the word "Android" in a developer
> name?  I'm leaning towards no.  While it is the name of the OS, Google
> didn't invent the word.
>
> For example, could I make my developer name "bobTheAndroid"?
>
> (I'm asking before I make my developer account so I don't somehow lose
> my $25)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using the word "Android" in a market developer name

2009-03-11 Thread Hayden

Is it against Google's rules to use the word "Android" in a developer
name?  I'm leaning towards no.  While it is the name of the OS, Google
didn't invent the word.

For example, could I make my developer name "bobTheAndroid"?

(I'm asking before I make my developer account so I don't somehow lose
my $25)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Failed to reopen debug port for Selected Client to:

2009-03-11 Thread Nmix

Same thing happened to me this week.  A quick search indicates that
the ::1 address for localhost is in some way related to IPv6.  I don't
know why this happens, but then I didn't dig any deeper (I figure the
less I know about Vista the happier I'll be).  I made the same edit to
the hosts file and all is fine again.

On Mar 10, 6:27 am, Emmanuel  wrote:
> I had the same problem yesterday !
>
> Actually, the original poster post saved my day :
> it's the window Host file that is messed up :
> the file is at this place :
> C:\WINDOWS\system32\drivers\etc
>
> And should contain this line :
> 127.0.0.1       localhost
>
> Putting this line back allow me to debug once again.
>
> But to tell the truth, I'm more than worried by this. I can't imagine
> how this line get removed.
> To add it back, I had Windows Defender that warned me 'something' was
> happening.
> And later, as I was working on my Android application, the line got
> removed once again. And Windows Defender didn't tell me anything.
>
> So I really suspect there is a virus there that remove this line...
>
> If someone know something about that, I would be glad to here it !
>
> Emmanuelhttp://androidblogger.blogspot.com/
>
> On 10 mar, 03:45, jus...@ragblue.com wrote:
>
> > I'm having the exact same problem.  It started today.  I could always
> > connect before.
>
> > Can you be more specific about your solution with your host file?
>
> > Justin
>
> > On Mar 5, 1:19 pm, NWallman  wrote:
>
> > > Turns out my hosts file was messed up.  When I fixed that my problem
> > > was resolved.
>
> > > On Mar 4, 8:02 pm, NWallman  wrote:
>
> > > > Hi,
>
> > > > I am struggling to get my emulator to be able tobindfor debugging
> > > > purposes.  I get the following stack trace when I start my emulator:
>
> > > > [2009-03-04 19:35:46 -ddms]Failedto reopen debug port for Selected
> > > > Client to: 8700
> > > > [2009-03-04 19:35:46 -ddms]Address family not supported by protocol
> > > > family:bind
> > > > java.net.SocketException: Address family not supported by protocol
> > > > family:bind
> > > >         at sun.nio.ch.Net.bind(Native Method)
> > > >         at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
> > > >         at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
> > > >         at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
> > > >         at 
> > > > com.android.ddmlib.MonitorThread.reopenDebugSelectedPort(Unknown
> > > > Source)
> > > >         at com.android.ddmlib.MonitorThread.run(Unknown Source)
>
> > > > [2009-03-04 20:00:39 -ddms]Can'tbindtolocal8600fordebugger
> > > > [2009-03-04 20:00:43 -ddms]Can'tbindtolocal8601 fordebugger
> > > > [2009-03-04 20:00:43 -ddms]Can'tbindtolocal8602 fordebugger
> > > > [2009-03-04 20:00:45 -ddms]Can'tbindtolocal8603 fordebugger
> > > > [2009-03-04 20:00:54 -ddms]Can'tbindtolocal8604 fordebugger
> > > > [2009-03-04 20:00:54 -ddms]Can'tbindtolocal8605 fordebugger
> > > > [2009-03-04 20:00:54 -ddms]Can'tbindtolocal8607 fordebugger
> > > > [2009-03-04 20:00:55 -ddms]Can'tbindtolocal8610 fordebugger
> > > > [2009-03-04 20:00:55 -ddms]Can'tbindtolocal8611 fordebugger
>
> > > > Can someone please explain to me what I am doing wrong?  Here are some
> > > > specs:
>
> > > > Windows Vista Ultimate
> > > > JDK 1.6 Update 12
> > > > Android SDK 1.0r2
>
> > > > Thanks!- Hide quoted text -
>
> > > - Show quoted text -- Masquer le texte des messages précédents -
>
> > - Afficher le texte des messages précédents -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: startActivityForResult problems

2009-03-11 Thread droozen


Not sure if this is your problem, but I do notice you commented out
the super.onActivityResult function in your onActivityResult function.
I don't know all of what the parent method for that function does, but
it's pretty good practice to always call the super method first when
you override a method. It could be doing some setup for you.

I could be way off and that's not what's causing your problem, but
it's a good idea to do it anyway, except for in methods where you know
you shouldn't, like the method for an option item being selected.

On Mar 11, 3:20 pm, Geos  wrote:
> Hello All
>
> I've use startActivityForResult as it described in many examples but
> it return 0 result code after start new Activity.
>
> In main Activity I use such code for sub activity invocation
>
>                 Intent iShowVideo = new Intent(EventHandling.this, 
> ShowVideo.class);
>                 startActivityForResult(iShowVideo, 
> this.REQUEST_CODE_SHOW_VIDEO);
>
> And such code for getting results.
>
>         @Override
>         protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
>                 // TODO Auto-generated method stub
>                 //super.onActivityResult(requestCode, resultCode, data);
>                 if(requestCode == REQUEST_CODE_SHOW_VIDEO){
>                         if(resultCode == RESULT_CANCELED){
>                                 Toast toast = Toast.makeText(this, 
> "onActivityResultCancel: " +
> String.valueOf(resultCode), Toast.LENGTH_LONG);
>                                 toast.show();
>                         }else{
>                                 Toast toast = Toast.makeText(this, 
> "onActivityResult: " +
> String.valueOf(resultCode), Toast.LENGTH_LONG);
>                                 toast.show();
>                         }
>                 }
>         }
>
> Here is a part code from ShowVideo activity
>         @Override
>         protected void onCreate(Bundle savedInstanceState) {
>                 // TODO Auto-generated method stub
>                 super.onCreate(savedInstanceState);
>
>                 setContentView(R.layout.showvideo);
>                 //showDialog(DIALOG_YES_NO_MESSAGE);
>
>         Button button = (Button)findViewById(R.id.btnOK);
>         button.setOnClickListener(mOkListener);
>         button = (Button)findViewById(R.id.btnCancel);
>         button.setOnClickListener(mCancelListener);
>
>         //setResult(RESULT_OK, (new Intent()).setAction("Test!"));
>         }
>
>     private OnClickListener mOkListener = new OnClickListener()
>     {
>         public void onClick(View v)
>         {
>             // To send a result, simply call setResult() before your
>             // activity is finished.
>             setResult(RESULT_OK, (new Intent()).setAction("Corky!"));
>             finish();
>         }
>     };
>
> This code should work according many examples. And it should return
> RESULT_OK after btnOK clicked but after I click this button it only
> closes ShowVideo  Activity.
>
> Please 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] Re: Change height of notification?

2009-03-11 Thread Dianne Hackborn
If you create a layout that doesn't fit in a dialog (whose content is some
smaller part of the screen), the exact same thing will happen. :}

On Wed, Mar 11, 2009 at 2:27 PM, Marc  wrote:

>
> Can you think of another case in which you can supply a layout to an
> API, but the layout is largely ignored?
>
> Marc
>
> On Mar 11, 2:25 pm, MrSnowflake  wrote:
> > On 11 mrt, 21:30, Marc  wrote:> BTW, that should
> probably be documented somewhere (i.e. that you can
> > > use a custom view, but it's restricted in that way...)
> >
> > If you'd do that, you would have to document everything you can't do,
> > which would be the wrong way around, I believe.
> >
> >
> >
> > > Marc
> >
> > > On Mar 11, 1:28 pm, Marc  wrote:
> >
> > > > Thanks, Dianne!
> >
> > > > Marc
> >
> > > > On Mar 11, 11:12 am, Dianne Hackborn  wrote:
> >
> > > > > No the height is deliberately restricted.
> >
> > > > > On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:
> >
> > > > > > Is there any way to change the height of the "extended"
> notification
> > > > > > (i.e. the contentView in the Notification)?   It seems like I get
> the
> > > > > > standard two lines no matter what...   I'm thinking I've missed
> > > > > > something, but ...
> >
> > > > > > TIA
> >
> > > > > > Marc
> >
> > > > > --
> > > > > Dianne Hackborn
> > > > > Android framework engineer
> > > > > hack...@android.com
> >
> > > > > Note: please don't send private questions to me, as I don't have
> time to
> > > > > provide private support.  All such questions should be posted on
> public
> > > > > forums, where I and others can see and answer them.
> >
>


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

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

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



[android-developers] Re: Issue with Threads and onCreate()

2009-03-11 Thread Dianne Hackborn
Yep, it's easier to take advantage of Handler to deal with a lot of the
threading grunginess for you.

On Wed, Mar 11, 2009 at 4:13 PM, Timo Bruck  wrote:

>
> Answering my own question, I think the answer is that Dianne's way is
> better than mine.
>
> With Dianne's way, if the thread completes while the Activity is being
> destroyed/created, there's still a Handler around to post a message
> to. When the new Activity is created, it'll get the message that was
> queued.
>
> With my way, if the thread completes while the Activity is in the
> destroy/create state, it has no Handler to post to, and the message
> will never get sent.
>
> -Timo
>
> >
>


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

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

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



[android-developers] Re: Trackball doesn't give me click events, but touch screen does

2009-03-11 Thread Romain Guy (Google)

Hi Jesse,

You should **not** set individual click listeners on the list items.
This will cause all sort of problems, like the ones you're seeing. The
main reason behind that is that ListView handles clicks/long clicks on
the items already. Instead you should use
ListView.setOnItemClickListener().

On Mar 5, 6:54 pm, Jesse McGrew  wrote:
> I have a list activity that creates a header row above the data rows
> from the adapter. I want to receive click events when the user selects
> the header or a data row (but my data rows have check boxes in them,
> so this part is tricky). When I use the touch screen, I get this
> expected behavior:
>
> 1. Tapping on any row causes a click event and a dialog appears.
> 2. Long-pressing on a data row causes a context menu to appear.
> 3. Long-pressing on the header row does *not* show the context menu.
>
> However, when I use the arrow keys (emulator) or trackball (G1), I get
> this unexpected behavior:
>
> 1. Selecting any row fails to cause any click events, even though the
> row's appearance changes like it's being clicked.
> 2. Long-pressing on the header row *does* show the context menu, which
> I don't want.
> 3. Occasionally, it doesn't focus the correct row when I move up or
> down (e.g. it skips from the header to the last data row).
>
> What am I doing wrong?
>
> Jesse
>
> (Complete project:http://hansprestige.com/android/DpadBug.zip)
>
> // DpadActivity.java //
>
> package com.hansprestige.DpadBug;
>
> import android.app.AlertDialog;
> import android.app.Dialog;
> import android.app.ListActivity;
> import android.os.Bundle;
> import android.view.ContextMenu;
> import android.view.View;
> import android.view.ViewGroup;
> import android.view.ContextMenu.ContextMenuInfo;
> import android.view.View.OnClickListener;
> import android.widget.ArrayAdapter;
> import android.widget.ListView;
>
> public class DpadBugActivity extends ListActivity {
>         private static final int DIALOG_TEST = 1;
>
>     private OnClickListener testListener = new OnClickListener() {
>         public void onClick(View v) {
>                 showDialog(DIALOG_TEST);
>         }
>     };
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         ListView lv = getListView();
>         registerForContextMenu(lv);
>
>         findViewById(android.R.id.empty).setOnClickListener
> (testListener);
>
>         View addItem = getLayoutInflater().inflate
> (R.layout.list_header,
>                         null, false);
>         addItem.setOnClickListener(testListener);
>         lv.addHeaderView(addItem);
>
>         fillData();
>
> }
>
>     private void fillData()
>     {
>         String[] items = new String[] { "Item A", "Item B", "Item C" };
>         ArrayAdapter adapter = new ArrayAdapter(this,
> R.layout.list_row, R.id.TextView01, items) {
>                 @Override
>                 public View getView(int position, View convertView, ViewGroup
> parent) {
>                         View v = super.getView(position, convertView, parent);
>                         v.setOnClickListener(testListener);
>                         v.setLongClickable(true);
>                         return v;
>                 }
>         };
>         setListAdapter(adapter);
>     }
>
>     @Override
>     protected Dialog onCreateDialog(int id) {
>         switch (id) {
>         case DIALOG_TEST:
>                 return new AlertDialog.Builder(this)
>                         .setTitle("Hello!")
>                         .setPositiveButton("Close", null)
>                         .create();
>         }
>         return super.onCreateDialog(id);
>     }
>
>     @Override
>     public void onCreateContextMenu(ContextMenu menu, View v,
>                 ContextMenuInfo menuInfo) {
>         super.onCreateContextMenu(menu, v, menuInfo);
>         menu.add("Context item");
>     }
>
> }
>
> // main.xml //
>
> 
> http://schemas.android.com/apk/res/
> android"
>         android:layout_width="fill_parent"
>     android:layout_height="fill_parent">
>
>                              android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:focusable="false" />
>             
> 
>
> // list_header.xml //
>
> 
> 
> http://schemas.android.com/apk/res/
> android"
>         android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>         android:background="@android:drawable/menuitem_background"
>         android:focusable="true"
> android:descendantFocusability="blocksDescendants">
>          android:layout_height="50dip">
>                                                          
> android:textAppearance="?android:attr/textAppearanceLarge"
>                                 android:layout_gravity="center_vertical"
>                                 android:layout_width="wrap_content"
> androi

[android-developers] Re: Slow Scrolling

2009-03-11 Thread Romain Guy

It's waiting for events in the main events queue. That's pretty normal
to see this.

On Wed, Mar 11, 2009 at 4:03 PM, AlCapwn  wrote:
>
> Whoops, forgot to add this. When the freeze happened, I generated a
> bugreport and it says this:
>
> "main" prio=5 tid=3 TIMED_WAIT
>  | group="main" sCount=1 dsCount=0 s=0 obj=0x400103e8
>  | sysTid=2339 nice=0 sched=0/0 handle=-1096221588
>  at java.lang.Object.wait(Native Method)
>  - waiting on <0x1b6408> (a android.os.MessageQueue)
>  at java.lang.Object.wait(Object.java:195)
>  at android.os.MessageQueue.next(MessageQueue.java:144)
>  at android.os.Looper.loop(Looper.java:110)
>  at android.app.ActivityThread.main(ActivityThread.java:3739)
>  at java.lang.reflect.Method.invokeNative(Native Method)
>  at java.lang.reflect.Method.invoke(Method.java:515)
>  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:739)
>  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
>  at dalvik.system.NativeStart.main(Native Method)
>
> Not too sure why it would be wait()ing :s
> On Mar 11, 11:00 pm, Al  wrote:
>> Hi, sometimes when I try to scroll using a scrollview (wrapped around
>> a textview), there will be no response. I've noticed this in both my
>> apps and the only common thing between them is the textview in both
>> apps use Spanned (SpanableStringBuilder to be exact) text. This
>> happens even when there is no activity on the window and no anr pops
>> up either.
>>
>> Any idea what would be the cause?
>> Thanks.
> >
>



-- 
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: Issue with Threads and onCreate()

2009-03-11 Thread Timo Bruck

Answering my own question, I think the answer is that Dianne's way is
better than mine.

With Dianne's way, if the thread completes while the Activity is being
destroyed/created, there's still a Handler around to post a message
to. When the new Activity is created, it'll get the message that was
queued.

With my way, if the thread completes while the Activity is in the
destroy/create state, it has no Handler to post to, and the message
will never get sent.

-Timo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Slow Scrolling

2009-03-11 Thread AlCapwn

Whoops, forgot to add this. When the freeze happened, I generated a
bugreport and it says this:

"main" prio=5 tid=3 TIMED_WAIT
  | group="main" sCount=1 dsCount=0 s=0 obj=0x400103e8
  | sysTid=2339 nice=0 sched=0/0 handle=-1096221588
  at java.lang.Object.wait(Native Method)
  - waiting on <0x1b6408> (a android.os.MessageQueue)
  at java.lang.Object.wait(Object.java:195)
  at android.os.MessageQueue.next(MessageQueue.java:144)
  at android.os.Looper.loop(Looper.java:110)
  at android.app.ActivityThread.main(ActivityThread.java:3739)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
  at dalvik.system.NativeStart.main(Native Method)

Not too sure why it would be wait()ing :s
On Mar 11, 11:00 pm, Al  wrote:
> Hi, sometimes when I try to scroll using a scrollview (wrapped around
> a textview), there will be no response. I've noticed this in both my
> apps and the only common thing between them is the textview in both
> apps use Spanned (SpanableStringBuilder to be exact) text. This
> happens even when there is no activity on the window and no anr pops
> up either.
>
> Any idea what would be the cause?
> 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] Slow Scrolling

2009-03-11 Thread Al

Hi, sometimes when I try to scroll using a scrollview (wrapped around
a textview), there will be no response. I've noticed this in both my
apps and the only common thing between them is the textview in both
apps use Spanned (SpanableStringBuilder to be exact) text. This
happens even when there is no activity on the window and no anr pops
up either.

Any idea what would be the cause?
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: Issue with Threads and onCreate()

2009-03-11 Thread Timo Bruck

Dianne... instead of making a Handler subclass, would it be just as
effective to have the Handler be a field of a custom Thread class
which is reset by a dying activity instance in
onRetainNonConfigurationInstance() and set by the new activity
instance in onCreate()?

Instead of retaining the handler in
onRetainNonConfigurationInstance(), I'd just retain a pointer to the
thread.

-Timo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Am I being banned from the list?

2009-03-11 Thread Jean-Baptiste Queru

I got one of those too. My guess is that some member on the list has
an auto-auto-responder because their mailbox is full.

JBQ

On Wed, Mar 11, 2009 at 2:45 PM, Stoyan Damov  wrote:
>
> Thank you for the prompt reply.
>
> I don't know what could be the problem, I'm posting by sending my
> posts to android-developers@googlegroups.com thru GMail.
>
> Cheers
>
> On Wed, Mar 11, 2009 at 11:38 PM, clark  wrote:
>>
>> Your message showed up under the thread you posted to "[android-
>> developers] Re: Risk of upgrading to 1.1?", right above JBQ, so I do
>> not think you are being banned.  You may want to look for other causes
>> for this problem.
>>
>>
>> ~clark
>>
>> On Mar 11, 2:16 pm, Stoyan Damov  wrote:
>>> Hi,
>>>
>>> It's the 2nd post for which I'm getting:
>>>
>>> ---
>>>
>>> The original message was received at ...
>>>
>>>   The following addresses had permanent fatal errors 
>>> 
>>>  (552 5.2.2 minokr: mbox is over quota)
>>>
>>> Final-Recipient: RFC822; min...@hanmail.net
>>> Action: failed
>>> Status: 552 5.2.2 minokr: mbox is over quota
>>>
>>>
>>>
>>> -- Forwarded message --
>>> From: Stoyan Damov 
>>> To: android-developers@googlegroups.com
>>> Date: Wed, 11 Mar 2009 22:57:26 +0200
>>> Subject: [android-developers] Re: Risk of upgrading to 1.1?
>>>
>>> I have released my game on 19th of February, built against SDK 1.1 but
>>> no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
>>> working on 1.0 devices. So far I haven't got a report that it's not
>>> working on any device, other than the intermittent "Force Close"
>>> issues after an update.
>>>
>>> Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
>>> haven't had any problems. Surely I haven't used any feature from 1.1,
>>> not that there are many.
>>>
>>> Do readhttp://developer.android.com/sdk/android-1.1.htmlto get more
>>> confidence.
>>>
>>> Cheers
>>>
>>> -
>>>
>>> So, am I being banned or what?- Hide quoted text -
>>>
>>> - Show quoted text -
>> >
>>
>
> >
>



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

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

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



[android-developers] Re: Am I being banned from the list?

2009-03-11 Thread Stoyan Damov

Thank you for the prompt reply.

I don't know what could be the problem, I'm posting by sending my
posts to android-developers@googlegroups.com thru GMail.

Cheers

On Wed, Mar 11, 2009 at 11:38 PM, clark  wrote:
>
> Your message showed up under the thread you posted to "[android-
> developers] Re: Risk of upgrading to 1.1?", right above JBQ, so I do
> not think you are being banned.  You may want to look for other causes
> for this problem.
>
>
> ~clark
>
> On Mar 11, 2:16 pm, Stoyan Damov  wrote:
>> Hi,
>>
>> It's the 2nd post for which I'm getting:
>>
>> ---
>>
>> The original message was received at ...
>>
>>   The following addresses had permanent fatal errors 
>> 
>>  (552 5.2.2 minokr: mbox is over quota)
>>
>> Final-Recipient: RFC822; min...@hanmail.net
>> Action: failed
>> Status: 552 5.2.2 minokr: mbox is over quota
>>
>>
>>
>> -- Forwarded message --
>> From: Stoyan Damov 
>> To: android-developers@googlegroups.com
>> Date: Wed, 11 Mar 2009 22:57:26 +0200
>> Subject: [android-developers] Re: Risk of upgrading to 1.1?
>>
>> I have released my game on 19th of February, built against SDK 1.1 but
>> no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
>> working on 1.0 devices. So far I haven't got a report that it's not
>> working on any device, other than the intermittent "Force Close"
>> issues after an update.
>>
>> Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
>> haven't had any problems. Surely I haven't used any feature from 1.1,
>> not that there are many.
>>
>> Do readhttp://developer.android.com/sdk/android-1.1.htmlto get more
>> confidence.
>>
>> Cheers
>>
>> -
>>
>> So, am I being banned or what?- 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: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?

2009-03-11 Thread MrSnowflake

I think it probably would speed up your drawing, but OpenGL probably
also uses more battery because it needs the hardware gpu to be enabled
too.

On 11 mrt, 16:46, Stoyan Damov  wrote:
> What is it that you are drawing, how are you drawing it, have you
> profiled your code?
>
>
>
> On Wed, Mar 11, 2009 at 5:31 PM, William  wrote:
>
> > Greetings Developers,
>
> > I am just putting this question out there.
>
> > Is there a large efficiency difference between Canvas.drawBitmap or
> > OpenGL.  I am drawing using Canvas.drawBitmap and running slowing FPS,
> > would openGL speed that up a lot you think?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SSL client authentication

2009-03-11 Thread telematics

I am new on SSL programming. The Android app I am developing needs to
open an SSL socket to a secure server which requires the client
authentication. When running on the Emulator and trying to talk to a
Server running on the host PC, the following Android code snippet
always gives me a SocketException at the line, SSLSocket c =
(SSLSocket) f.createSocket(hostName, ) :

private void openSslClient(String hostName)
{
try
{
KeyStore keyStore = KeyStore.getInstance
(KeyStore.getDefaultType());
InputStream fis = this.getAssets().open("client.bks");
keyStore.load(fis, "clientjks".toCharArray());

KeyManagerFactory kmf = KeyManagerFactory.getInstance
("X509");

kmf.init(keyStore, "clientkey".toCharArray());

TrustManagerFactory tmf = TrustManagerFactory.getInstance
("X509");

tmf.init(keyStore);

SSLContext sc = SSLContext.getInstance("TLS");
sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(),
new SecureRandom());

SSLSocketFactory f = sc.getSocketFactory();
SSLSocket c = (SSLSocket) f.createSocket(hostName, );
c.startHandshake();
w = new BufferedWriter(new OutputStreamWriter
(c.getOutputStream()));
r = new BufferedReader(new InputStreamReader
(c.getInputStream()));
} catch (Exception e)
{
Log.e(LOG_TAG, "openSslClient failed", e);
}
}

The stack trace looks like below:
03-11 21:24:00.585: ERROR/OSNetworkSystem(1093): unknown socket error
-1
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): openSslClient
failed
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):
java.net.SocketException: unknown error
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl
(Native Method)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocket
(OSNetworkSystem.java:79)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
org.apache.harmony.luni.net.PlainSocketImpl2.create
(PlainSocketImpl2.java:59)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
java.net.Socket.startupSocket(Socket.java:668)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
java.net.Socket.(Socket.java:142)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
javax.net.ssl.SSLSocket.(SSLSocket.java:42)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.
(OpenSSLSocketImpl.java:179)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl.createSocket
(OpenSSLSocketFactoryImpl.java:65)


The server test program I am using is a modified version of
SslReverseEchoer available on Dr. Herong Yang's website. It looks like
below:

public static void main(String[] args) {
if (args.length < 3) {
System.out.println("Usage:");
System.out
.println("   java 
SslReverseEchoerRevised ksName ksPass ctPass
ipAddr");
return;
}
String ksName = args[0];
char[] ksPass = args[1].toCharArray();
char[] ctPass = args[2].toCharArray();
String ipAddr = args[3];
try {
KeyStore ks = KeyStore.getInstance("BKS");
ks.load(new FileInputStream(ksName), ksPass);
KeyManagerFactory kmf = 
KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, ctPass);
TrustManagerFactory tmf = 
TrustManagerFactory.getInstance("X509");
tmf.init(ks);
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), 
null);
SSLServerSocketFactory ssf = 
sc.getServerSocketFactory();
SSLServerSocket s = (SSLServerSocket) 
ssf.createServerSocket(,
1, InetAddress.getByName(ipAddr));
s.setNeedClientAuth(true);
printServerSocketInfo(s);
SSLSocket c = (SSLSocket) s.accept();
printSocketInfo(c);
BufferedWriter w = new BufferedWriter(new 
OutputStreamWriter(c
.getOutputStream()));
BufferedReader r = new BufferedReader(new 
InputStreamReader(c
.getInputStream()));
String m = "Welcome to SSL Reverse Echo Server."
+ " Please type in some words.";

[android-developers] Re: Am I being banned from the list?

2009-03-11 Thread clark

Your message showed up under the thread you posted to "[android-
developers] Re: Risk of upgrading to 1.1?", right above JBQ, so I do
not think you are being banned.  You may want to look for other causes
for this problem.


~clark

On Mar 11, 2:16 pm, Stoyan Damov  wrote:
> Hi,
>
> It's the 2nd post for which I'm getting:
>
> ---
>
> The original message was received at ...
>
>   The following addresses had permanent fatal errors 
> 
>  (552 5.2.2 minokr: mbox is over quota)
>
> Final-Recipient: RFC822; min...@hanmail.net
> Action: failed
> Status: 552 5.2.2 minokr: mbox is over quota
>
>
>
> -- Forwarded message --
> From: Stoyan Damov 
> To: android-developers@googlegroups.com
> Date: Wed, 11 Mar 2009 22:57:26 +0200
> Subject: [android-developers] Re: Risk of upgrading to 1.1?
>
> I have released my game on 19th of February, built against SDK 1.1 but
> no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
> working on 1.0 devices. So far I haven't got a report that it's not
> working on any device, other than the intermittent "Force Close"
> issues after an update.
>
> Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
> haven't had any problems. Surely I haven't used any feature from 1.1,
> not that there are many.
>
> Do readhttp://developer.android.com/sdk/android-1.1.htmlto get more
> confidence.
>
> Cheers
>
> -
>
> So, am I being banned or what?- 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: Risk of upgrading to 1.1?

2009-03-11 Thread MrSnowflake



On 11 mrt, 21:59, Jean-Baptiste Queru  wrote:
> Well, there is a risk that a bug in 1.0 that would have been fixed in
> 1.1 could be hit by your application. I'm not explicitly aware of such
> situations, but that's definitely possible in theory.
A very valid situation. But does it matter? All Android devices have
the posibility to run 1.1, so if you build for 1.1, why not set
minSdkVersion? You only are making your app more secure, and you are
not excluding anyone (except for some developer still running 1.0 for
some very specific reason).

And if you are still on 1.0, I think upgrading always is the better
option, because all devices support it and 1.1 will have less bugs, or
at least less bugs in code which was available in 1.0. Though staying
with 1.0 won't really have any negative results.

>
> It is possible (and in fact reasonably easy) to downgrade an ADP1 back
> to 1.0, the drawback being that you need to wipe your data in that
> case.
>
> JBQ
>
> On Wed, Mar 11, 2009 at 1:17 PM, Tim Bray  wrote:
>
> > I was going to keep my SDK at 1.0 because for my own app I don't need
> > any 1.1 stuff and I'd like it to work on as many devices as possible.
> > If I upgrade my dev-phone to 1.1 just because I'd like a nicer phone,
> > is there any appreciable risk that it will fail to detect problems
> > that might occur on 1.0 devices?  -Tim
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Custom icon on notification

2009-03-11 Thread MrSnowflake

On 11 mrt, 21:49, Wesley  wrote:
> So, are the resource ids unique across all applications on the phone ?
Probably not, but does it matter? The NotificationManager probably
gets the drawable from the context it got called and used from.

> What about new applications being downloaded, how would this work ?
Well, you shouldn't care for it :) The system does that for you.

>
> On Mar 10, 7:42 pm, Zero  wrote:
>
>
>
> > resource id can be any id from your project as well. should work just
> > fine.
>
> > On 10 Mrz., 18:52, Wesley  wrote:
>
> > > Is it possible to display a custom icon (i.e., an icon which is a
> > > application resource) on a notification ?
> > > For sounds you can pass a Uri which makes possible to play custom
> > > sounds when notifying, but for the icon you only pass the resource id
> > > when creating the Notification object, which as I understand makes
> > > possible only to display the system icons (i.e., those on android.R).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Change height of notification?

2009-03-11 Thread Marc

Can you think of another case in which you can supply a layout to an
API, but the layout is largely ignored?

Marc

On Mar 11, 2:25 pm, MrSnowflake  wrote:
> On 11 mrt, 21:30, Marc  wrote:> BTW, that should probably 
> be documented somewhere (i.e. that you can
> > use a custom view, but it's restricted in that way...)
>
> If you'd do that, you would have to document everything you can't do,
> which would be the wrong way around, I believe.
>
>
>
> > Marc
>
> > On Mar 11, 1:28 pm, Marc  wrote:
>
> > > Thanks, Dianne!
>
> > > Marc
>
> > > On Mar 11, 11:12 am, Dianne Hackborn  wrote:
>
> > > > No the height is deliberately restricted.
>
> > > > On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:
>
> > > > > Is there any way to change the height of the "extended" notification
> > > > > (i.e. the contentView in the Notification)?   It seems like I get the
> > > > > standard two lines no matter what...   I'm thinking I've missed
> > > > > something, but ...
>
> > > > > TIA
>
> > > > > Marc
>
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > hack...@android.com
>
> > > > Note: please don't send private questions to me, as I don't have time to
> > > > provide private support.  All such questions should be posted on public
> > > > forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Change height of notification?

2009-03-11 Thread MrSnowflake


On 11 mrt, 21:30, Marc  wrote:
> BTW, that should probably be documented somewhere (i.e. that you can
> use a custom view, but it's restricted in that way...)
If you'd do that, you would have to document everything you can't do,
which would be the wrong way around, I believe.

>
> Marc
>
> On Mar 11, 1:28 pm, Marc  wrote:
>
>
>
> > Thanks, Dianne!
>
> > Marc
>
> > On Mar 11, 11:12 am, Dianne Hackborn  wrote:
>
> > > No the height is deliberately restricted.
>
> > > On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:
>
> > > > Is there any way to change the height of the "extended" notification
> > > > (i.e. the contentView in the Notification)?   It seems like I get the
> > > > standard two lines no matter what...   I'm thinking I've missed
> > > > something, but ...
>
> > > > TIA
>
> > > > Marc
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support.  All such questions should be posted on public
> > > forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to explicitly launch the system's Home application by code?

2009-03-11 Thread MrSnowflake

Nice, thanks!

On 11 mrt, 19:14, Dianne Hackborn  wrote:
> Query the package manager for all home activities, and pick the one that has
> the SYSTEM flag set.
>
>
>
>
>
> On Wed, Mar 11, 2009 at 6:26 AM, MrSnowflake  wrote:
>
> > But using CATEGORY_HOME won't solve his problem.
>
> > On 10 mrt, 19:41, Romain Guy  wrote:
> > > Don't use the package and class name directly, this will work only for
> > > the current default Home screen. Use an Intent with the CATEGORY_HOME
> > > instead.
>
> > > On Tue, Mar 10, 2009 at 11:40 AM, MrSnowflake 
> > wrote:
>
> > > > As I said on Anddev.org earlier:
> > > > Intent myIntent = new Intent();
> > > > myIntent.setClassName("com.android.launcher",
> > > > "com.android.launcher.Launcher");
> > > > startActivity(myIntent);
>
> > > > On 10 mrt, 14:18, Stoyan Damov  wrote:
> > > >> I can't help you with this. Tough luck - I'd assume that when an
> > > >> intent has alternative intent filters and an intent filter crashes,
> > > >> the user would be presented with the list of intent filters to retry
> > > >> the operation. I guess that's not the case or you wouldn't be asking.
>
> > > >> Cheers
>
> > > >> On Tue, Mar 10, 2009 at 2:59 PM, Kakyoin  wrote:
>
> > > >> > On Mar 10, 7:31 pm, Stoyan Damov  wrote:
> > > >> >> "Here are some examples of other operations you can specify as
> > intents
> > > >> >> using these additional parameters:
>
> > > >> >>     *
>
> > > >> >>       ACTION_MAIN with category CATEGORY_HOME -- Launch the home
> > screen."
>
> > > >> >>http://developer.android.com/reference/android/content/Intent.html
>
> > > >> >> On Tue, Mar 10, 2009 at 2:20 PM, Kakyoin 
> > wrote:
>
> > > >> >> > Topic.  Short and sweet question. And I did browse the forum
> > before
> > > >> >> > asking.
>
> > > >> >> > Thank you in advance.
>
> > > >> > Hi. Thank you for the reply.
>
> > > >> > But actually I do have another Alternative Home application (which I
> > > >> > set to default for CATEGORY_HOME).
>
> > > >> > In this case, let's assume that this Alternative Home has a but in
> > its
> > > >> > onCreate(), this bug cause the "Force close" screen.
>
> > > >> > The real problem is: when user set my Alternative Home as their
> > > >> > 'default action for 'Home' ', then shutdown the device and turn it
> > > >> > back on. It'll keep crashing at the start up.
>
> > > >> > The user can't press back to go to system's Home app; there's no
> > > >> > system's Home to go back to (because my Alternative Home is the
> > > >> > default and is the only 'Home'  loaded at boot time)
>
> > > >> > I'm sorry for my bad English. >_<  What I'm trying to do is to
> > handle
> > > >> > that bug(which actually only happen when user has no SD card
> > present)
> > > >> > by doing this: "if there's no SD card inserted, then just launch the
> > > >> > System's Home app instead"
>
> > > >> > here's my code when the SD card is not found:
>
> > > >> > Intent i = new Intent();
> > > >> > i.setAction("android.intent.action.MAIN");
> > > >> > i.addCategory("android.intent.category.HOME");
> > > >> > startActivity(i); // this launch my Alternative Home (because it is
> > > >> > set as default)
>
> > > >> > Anyway, Thank you for your reply. =)
>
> > > --
> > > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Am I being banned from the list?

2009-03-11 Thread Stoyan Damov

Hi,

It's the 2nd post for which I'm getting:

---

The original message was received at ...

  The following addresses had permanent fatal errors 

 (552 5.2.2 minokr: mbox is over quota)

Final-Recipient: RFC822; min...@hanmail.net
Action: failed
Status: 552 5.2.2 minokr: mbox is over quota


-- Forwarded message --
From: Stoyan Damov 
To: android-developers@googlegroups.com
Date: Wed, 11 Mar 2009 22:57:26 +0200
Subject: [android-developers] Re: Risk of upgrading to 1.1?

I have released my game on 19th of February, built against SDK 1.1 but
no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
working on 1.0 devices. So far I haven't got a report that it's not
working on any device, other than the intermittent "Force Close"
issues after an update.

Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
haven't had any problems. Surely I haven't used any feature from 1.1,
not that there are many.

Do read http://developer.android.com/sdk/android-1.1.html to get more
confidence.

Cheers

-

So, am I being banned or what?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Risk of upgrading to 1.1?

2009-03-11 Thread Jean-Baptiste Queru

Well, there is a risk that a bug in 1.0 that would have been fixed in
1.1 could be hit by your application. I'm not explicitly aware of such
situations, but that's definitely possible in theory.

It is possible (and in fact reasonably easy) to downgrade an ADP1 back
to 1.0, the drawback being that you need to wipe your data in that
case.

JBQ

On Wed, Mar 11, 2009 at 1:17 PM, Tim Bray  wrote:
>
> I was going to keep my SDK at 1.0 because for my own app I don't need
> any 1.1 stuff and I'd like it to work on as many devices as possible.
> If I upgrade my dev-phone to 1.1 just because I'd like a nicer phone,
> is there any appreciable risk that it will fail to detect problems
> that might occur on 1.0 devices?  -Tim
>
> >
>



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

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

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



[android-developers] Re: Risk of upgrading to 1.1?

2009-03-11 Thread Stoyan Damov

I have released my game on 19th of February, built against SDK 1.1 but
no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
working on 1.0 devices. So far I haven't got a report that it's not
working on any device, other than the intermittent "Force Close"
issues after an update.

Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
haven't had any problems. Surely I haven't used any feature from 1.1,
not that there are many.

Do read http://developer.android.com/sdk/android-1.1.html to get more
confidence.

Cheers

On Wed, Mar 11, 2009 at 10:17 PM, Tim Bray  wrote:
>
> I was going to keep my SDK at 1.0 because for my own app I don't need
> any 1.1 stuff and I'd like it to work on as many devices as possible.
> If I upgrade my dev-phone to 1.1 just because I'd like a nicer phone,
> is there any appreciable risk that it will fail to detect problems
> that might occur on 1.0 devices?  -Tim
>
> >
>

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



[android-developers] Re: Custom icon on notification

2009-03-11 Thread Wesley

So, are the resource ids unique across all applications on the phone ?
What about new applications being downloaded, how would this work ?

On Mar 10, 7:42 pm, Zero  wrote:
> resource id can be any id from your project as well. should work just
> fine.
>
> On 10 Mrz., 18:52, Wesley  wrote:
>
> > Is it possible to display a custom icon (i.e., an icon which is a
> > application resource) on a notification ?
> > For sounds you can pass a Uri which makes possible to play custom
> > sounds when notifying, but for the icon you only pass the resource id
> > when creating the Notification object, which as I understand makes
> > possible only to display the system icons (i.e., those on android.R).

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



[android-developers] List of countries & carriers

2009-03-11 Thread Noonien Soong

Does anyone know a list of countries and carriers where phones with
the Android OS can be bought?

I searched for a while for this now but haven't found anything...

Thx!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Change height of notification?

2009-03-11 Thread Marc

BTW, that should probably be documented somewhere (i.e. that you can
use a custom view, but it's restricted in that way...)

Marc

On Mar 11, 1:28 pm, Marc  wrote:
> Thanks, Dianne!
>
> Marc
>
> On Mar 11, 11:12 am, Dianne Hackborn  wrote:
>
> > No the height is deliberately restricted.
>
> > On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:
>
> > > Is there any way to change the height of the "extended" notification
> > > (i.e. the contentView in the Notification)?   It seems like I get the
> > > standard two lines no matter what...   I'm thinking I've missed
> > > something, but ...
>
> > > TIA
>
> > > Marc
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Change height of notification?

2009-03-11 Thread Marc

Thanks, Dianne!

Marc

On Mar 11, 11:12 am, Dianne Hackborn  wrote:
> No the height is deliberately restricted.
>
> On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:
>
> > Is there any way to change the height of the "extended" notification
> > (i.e. the contentView in the Notification)?   It seems like I get the
> > standard two lines no matter what...   I'm thinking I've missed
> > something, but ...
>
> > TIA
>
> > Marc
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] startActivityForResult problems

2009-03-11 Thread Geos

Hello All

I've use startActivityForResult as it described in many examples but
it return 0 result code after start new Activity.

In main Activity I use such code for sub activity invocation

Intent iShowVideo = new Intent(EventHandling.this, 
ShowVideo.class);
startActivityForResult(iShowVideo, 
this.REQUEST_CODE_SHOW_VIDEO);

And such code for getting results.

@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
// TODO Auto-generated method stub
//super.onActivityResult(requestCode, resultCode, data);
if(requestCode == REQUEST_CODE_SHOW_VIDEO){
if(resultCode == RESULT_CANCELED){
Toast toast = Toast.makeText(this, 
"onActivityResultCancel: " +
String.valueOf(resultCode), Toast.LENGTH_LONG);
toast.show();
}else{
Toast toast = Toast.makeText(this, 
"onActivityResult: " +
String.valueOf(resultCode), Toast.LENGTH_LONG);
toast.show();
}
}
}

Here is a part code from ShowVideo activity
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);

setContentView(R.layout.showvideo);
//showDialog(DIALOG_YES_NO_MESSAGE);

Button button = (Button)findViewById(R.id.btnOK);
button.setOnClickListener(mOkListener);
button = (Button)findViewById(R.id.btnCancel);
button.setOnClickListener(mCancelListener);

//setResult(RESULT_OK, (new Intent()).setAction("Test!"));
}

private OnClickListener mOkListener = new OnClickListener()
{
public void onClick(View v)
{
// To send a result, simply call setResult() before your
// activity is finished.
setResult(RESULT_OK, (new Intent()).setAction("Corky!"));
finish();
}
};

This code should work according many examples. And it should return
RESULT_OK after btnOK clicked but after I click this button it only
closes ShowVideo  Activity.

Please 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] Risk of upgrading to 1.1?

2009-03-11 Thread Tim Bray

I was going to keep my SDK at 1.0 because for my own app I don't need
any 1.1 stuff and I'd like it to work on as many devices as possible.
If I upgrade my dev-phone to 1.1 just because I'd like a nicer phone,
is there any appreciable risk that it will fail to detect problems
that might occur on 1.0 devices?  -Tim

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



[android-developers] Problem Troubleshooting Vista ADB USB Connection.

2009-03-11 Thread JLMG

This one is kinda weird...

I have a Ubuntu 8.10 box with everything including Eclipse working
perfectly, both the emulator and USB connection to my ADP1... works
perfectly!

But I decide to inflict Vista on myself by attempting to get Eclipse
and ADT working on my Vista laptop.

I set up Vista with Eclipse and installed the Android plug-in...
but... the only thing NOT working is the USB connection using the
exact same USB cable to the exact same ADP1.

Everything including the emulator is just fine, but no USB to ADP1.  ;o
(

Here is the message I get when I try to use the ADB command line:
--

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\John>adb version
Android Debug Bridge version 1.0.20  < (Same version as on the
Linux box)

C:\Users\John>adb shell
* daemon not running. starting it now *
* daemon started successfully *
error: device not found

C:\Users\John>adb shell
error: device not found

C:\Users\John>

--

And to top it all off, the Device Manager shows the ADP1 sdcard as a
USB mass storage device. but won't let me install the USB driver over
the Microsoft version.

I've been scouring around looking for a solution but remain flummoxed
so far.

Thanks for any pointers to a solution for this vexing pain in the
Windows!

JLMG


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: New Fee Structure?!?!

2009-03-11 Thread Streets Of Boston

I don't think this is the right discussion group for this, but i would
say:

Don't worry.
Here is the link:
http://checkout.google.com/seller/fees.html

This seller-fee is the same type of fee as is shown currently on you
seller checkout-page (2% +0.20). In other words, it does not apply to
your Android sales. As far as i know, they'll stay at 30%.


On Mar 11, 3:03 pm, csyperski  wrote:
> I just got an email about the new fee structure for the android
> market, and I must say, it doesn't look good.
>
> It is going from 2% + $0.20 -> 2.9% + $0.30
>
> This upsets me, because, it doesn't make sense to see apps for a low
> price ($0.99) on the market any longer, I am going to have to raise my
> rates to make it worthwhile. What does everyone else think about this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: New Fee Structure?!?!

2009-03-11 Thread Inderjeet Singh
This rate will not apply to you for Android transactions where the rate is
30% flat on the pre-tax amount.

This rate applies only if you used Google Checkout to sell other goods on an
Internet store.


On Wed, Mar 11, 2009 at 12:03 PM, csyperski  wrote:

>
> I just got an email about the new fee structure for the android
> market, and I must say, it doesn't look good.
>
> It is going from 2% + $0.20 -> 2.9% + $0.30
>
> This upsets me, because, it doesn't make sense to see apps for a low
> price ($0.99) on the market any longer, I am going to have to raise my
> rates to make it worthwhile. What does everyone else think about this?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Issue with Threads and onCreate()

2009-03-11 Thread Dianne Hackborn
Yes, a Service is what you want to use if you want to continue doing work
after the user has exiting your app.

The original poster I think is dealing with thread that are just supposed to
be running while the app is being used, in which case I would avoid using a
Service, since that is likely to introduce other more subtle problems where
your app continues needing to be running even when the user has left it,
consuming memory and cpu.

I think the best way to deal with this is to introduce a static Handler
subclass for receiving messages from the threads, which has a pointer to the
current activity.  Return that object in onRetainNonConfigurationInstance()
and set its activity pointer to 0; when the next activity enters onCreate(),
retrieve the object with getLastNonConfigurationInstance() and point it to
the new activity.  You are guaranteed no messages will be dispatched on the
main thread between onRetainNonConfigurationInstance() and the next
activity's onCreate() call.

On Wed, Mar 11, 2009 at 7:33 AM, Streets Of Boston
wrote:

>
> I've been dealing with the same issues and i tried all these. And
> nothing seems to work well.
> First of all, having a thread that's part of your activity running
> after your activity's onDestroy has been called is tricky. It can lead
> to memory-leaks, etc.
>
> I finally decided to create a Service for these kinds of tasks and it
> simplified everything. It's an initial expense writing a Service, but
> it pays off in your activity's code and its life-cycle handling.
>
> Your activity binds to the service on the onCreate and unbinds it on
> the onDestroy (or, even better, on onResume and onPause).
> To prevent the Service from shutting down, call startService from your
> activity as well, just after binding to it. When your activity
> unbinds, the service won't be shut down and your service's threads can
> keep running safely. When your activity is recreated, just re-bind to
> the service, have your activity query the service for the most current
> state of your Service's threads and voila!
>
> Your Activity:
>  Register a callback service. The service can call your activity back
> with important updates:
>Handle callbacks from service.
>
>  onCreate:
> bind to service.
> start-service as well. This will keep the service alive when
> unbinding from it.
> request callback from service giving the latest state/info of the
> service's threads/process.
>
>  onDestroy:
> unbind from service.
>
> On Mar 11, 10:18 am, Stoyan Damov  wrote:
> > unless he traps the back button in onKeyDown
> >
> >
> >
> > On Wed, Mar 11, 2009 at 2:51 PM, Marco Nelissen 
> wrote:
> >
> > > That will solve the problem when opening/closing the keyboard, but
> > > won't solve it when e.g. starting the app and then immediately hitting
> > > the back button to exit it.
> >
> > > On Wed, Mar 11, 2009 at 5:37 AM, Stoyan Damov 
> wrote:
> >
> > >> keyboardHidden|orientation
> >
> > >> On Wed, Mar 11, 2009 at 2:34 PM, mobilekid 
> wrote:
> >
> > >>> For some reason that seems not to work in my case. I've declared the
> > >>> activity as android:configChanges="orientation" in the
> > >>> AndroidManifest.xml, which I assume will call onConfigurationChanged
> > >>> (Configuration). So for testing purposes I've simply implemented it
> as
> > >>> follows:
> >
> > >>> @Override
> > >>> public void onConfigurationChanged (Configuration newConfig){
> > >>>Log.i(this.toString(), "I've been called!");
> > >>>super.onConfigurationChanged(newConfig);
> > >>> }
> >
> > >>> However, it never gets called. Am I doing anything wrong here?!
> > >>> Thanks!
> >
> > >>> On Mar 11, 11:44 am, Stoyan Damov  wrote:
> >  Yes, basically if you declare your activity's orientation to be
> >  "sensor" there's nothing else to do (I think).- Hide quoted text -
> >
> > - Show quoted text -
> >
>


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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: Where do I get the selection color?

2009-03-11 Thread Mariano Kamp
Ah, thanks -
where can I find the gradient defined in a 9patch?

On Wed, Mar 11, 2009 at 5:57 PM, Romain Guy  wrote:

>
> It's not a single color, but a gradient defined in a 9patch.
> - Show quoted text -
>
> On Wed, Mar 11, 2009 at 5:39 AM, Mariano Kamp 
> wrote:
> > Hi,
> >
> >   I'd like to use the standard selection color when clicking on a list
> item.
> > Where do I get it from?
> >
> > Cheers,
> > Mariano
> >
> > >
> >
>
>
>
> --
> 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] New Fee Structure?!?!

2009-03-11 Thread csyperski

I just got an email about the new fee structure for the android
market, and I must say, it doesn't look good.

It is going from 2% + $0.20 -> 2.9% + $0.30

This upsets me, because, it doesn't make sense to see apps for a low
price ($0.99) on the market any longer, I am going to have to raise my
rates to make it worthwhile. What does everyone else think about this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Attn: Android Engineers. Feature request

2009-03-11 Thread Jean-Baptiste Queru

Please mention this a http://b.android.com so that we don't lose track of it.

Thanks,
JBQ

On Wed, Mar 11, 2009 at 11:08 AM, Colin  wrote:
>
> There may be issues with this, but I have run into problems developing
> for android that could easily be solved by this:
>
> Maybe add an option in your manifest that stats that youd like to give
> customers the option to send bug reports to the developer on
> application crash. This way if the customer consents, the system can
> just compose an email with the last hundred or so lines of the the log
> (similar to 'logcat E:*' or whatever).
> >
>



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

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

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



[android-developers] Re: Adding self to menus on other applications

2009-03-11 Thread Dianne Hackborn
Doing a broadcast is definitely better than making people sit around
watching all the time.  Still, it is better yet not to rely on either -- if
you are relying on this to keep your data in sync, you can pretty much be
guaranteed that one way or another in some situation you will get out of
sync. :}

2008/11/20 Peli 

>
> Regarding menu icons not being displayed, a workaround has been posted
> in this thread:
> http://groups.google.com/group/android-developers/browse_frm/thread/3fed25cdda765b02
>
> I agree that it makes sense to present an Activity chooser for well-
> defined actions (like "Send"), but I guess there are also cases where
> it makes more sense for an application to appear like an "extension"
> to a specific application and be embedded in their menu (like adding
> voice memo to a note in notepad). At least, I hope you will not drop
> this functionality in the future, as we already make use of it :-)
>
> I have a related question, regarding the example above:
> voice memo would have to be notified if notes are deleted, so that the
> recordings that are linked to a note URI can also be deleted.
> We were thinking of sending a broadcast action in the notepad provider
> ACTION_DELETED with the note URI that all interested extensions could
> listen to. Could there be anything wrong with this approach?
>
> We thought that this would be better and more efficient than
> registering a ContentObserver that would have to listen in a
> background service all the time, and then scan for the change.
>
> Peli
>
>
> On Nov 19, 9:02 pm, "Dianne Hackbod"  wrote:
> > Having an arbitrarily large number of items added by other applications,
> > mixed together with unrelated items from the main application, is really
> > tough to provide a decent UI for.  I think it is better to have a single
> > top-level menu item that goes to a chooser dialog of the actions to be
> > performed (and the choose can show the normal app icons, instead of there
> > needing to be some additional extra special icon associated with the
> > activity for display in the menu, which we don't really support right now
> > anyway).
> >
> > 2008/11/19 Peli 
> >
> >
> >
> >
> >
> > > What are the specific problems here regarding to managing the UI?
> > > Aren't menu items beyond six items shown as a scrollable list, anyway?
> >
> > > Peli
> >
> > > On Nov 18, 10:36 pm, "Dianne Hackbod"  wrote:
> > > > Note that this only works with applications that want to participate
> in
> > > the
> > > > mechanism, and pretty much none of the built-in applications do this.
>  We
> > > > moved away from this approach because managing the UI for an
> arbitrary
> > > > number of additional items is a challenge.  Our preference these days
> is
> > > for
> > > > the application to start a chooser activity from which the user can
> > > select
> > > > what they want to do; see the Intent docs for info on this.
> >
> > > > 2008/11/18 Adrian A 
> >
> > > > > Hi Michael,
> >
> > > > > Have you had any luck with this?  What was the problem you had?
> >
> > > > > Many thanks in advance,
> > > > > Adrian
> >
> > > > > On Oct 21, 4:31 am, Shade  wrote:
> > > > > > Hello!
> >
> > > > > > If you mean Android Howto document:
> >
> > > > > > Adding yourself to menus on other applications
> >
> > > > > > You can also advertise your Activity's services so that
> > > > > otherActivitiescan add your activity to their own optionmenu. For
> > > > > > example, suppose you implement a new image handling tool that
> shrinks
> > > > > > an image to a smaller size and you would like to offer this as
> amenu
> > > > > > option to any other Activity that handles pictures. To do this,
> you
> > > > > > would exposes your capabilities inside an intent filter in your
> > > > > > manifest. If another application that handles photos asks Android
> for
> > > > > > anyActivitiesthat can perform actions on pictures, Android will
> > > > > > perform intent resolution, find your Activity, and add it to the
> > > other
> > > > > > Activity's optionsmenu.
> > > > > > The offering application
> >
> > > > > > The application offering the service must include an
> 
> > > > > > element in the manifest, inside the  tag of the
> offering
> > > > > > Activity. The intent filter includes all the details describing
> what
> > > > > > it can do, such as a  element that describes the MIME type
> of
> > > > > > data that it can handle, a custom  value that describes
> what
> > > > > > your handling application can do (this is so that when it
> receives
> > > the
> > > > > > Intent on opening it knows what it is expected to do), and most
> > > > > > important, include a  filter with the value
> > > > > > android.intent.category.ALTERNATIVEand/or
> > > > > > android.intent.category.SELECTED_ALTERNATIVE
> (SELECTED_ALTERNATIVE is
> > > > > > used to handle only the currently selected element on the screen,
> > > > > > rather than the whole Activity intent.
> >
> > > > > > Here's an example of a snip of a manifest 

[android-developers] Re: [Apps question] user dictionary

2009-03-11 Thread Dianne Hackborn
There is no android 1.5, and cupcake is still in development.  And this
should be asked on the platform groups.

On Wed, Mar 11, 2009 at 4:53 AM, Morris  wrote:

>
> Hi All:
>
> I couldn't use the function of user dictionary.
> Is it not complete for android 1.5 or
> Is it my program issue?
>
> Thanks.
>
> Morris
> >
>


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

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

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



[android-developers] Re: Spanned How to use?

2009-03-11 Thread Dianne Hackborn
What are you trying to do?  Like I said, the main purpose of this API is to
create styled text that can be given to TextView for display.  If you want
to do your own display of that stuff, you'll need to write your own text
layout engine line TextView (or using the existing layout stuff like it
already does).

You'll really need to dig in to the code of TextView and these classes if
you want to do your own special stuff with them.

On Wed, Mar 11, 2009 at 4:57 AM, John Doe  wrote:

>
> I am really trying hard to figure it out :( Probably it has a very
> easy way to implement but I couldnt discover.
>
> Spanned spanned;
> spanned =  Html.fromHtml(content);
>
> I am looking inside spanned and I see that all image url's and text is
> properly kept. There must be a way to reach them. Can you help me to
> figure it out? Can anyone?
>
> On Mar 10, 11:39 pm, Dianne Hackborn  wrote:
> > This function is intended to create text with style spans that you can
> put
> > into a TextView for display.  Unfortunately the underlying style span
> stuff
> > is not extensively documented, though it shouldn't be hard to figure out
> --
> > look at the various classes in android.text.style for the kinds of
> standard
> > style spans that are in the platform.  You may also want to browse the
> > open-source code to see how they are used.
> >
> >
> >
> > On Tue, Mar 10, 2009 at 12:21 PM, John Doe  wrote:
> >
> > > I have looked a lot on the internet but I couldnt find anything. So
> > > thats why I am asking it here.
> >
> > > While parsing an RSS I had to use Spanned class.
> >
> > > Spanned spanned;
> > > spanned =  Html.fromHtml(content);
> >
> > > content string keeps the html content in it. when i check spanned
> > > object during debug it really contains image urls and text strings but
> > > how do I reach them? I read ImageGetter and getSpans on SDK but there
> > > is no example on how to use them. Would you please help me?
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
> >
>


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

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

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



[android-developers] Re: How to explicitly launch the system's Home application by code?

2009-03-11 Thread Dianne Hackborn
Query the package manager for all home activities, and pick the one that has
the SYSTEM flag set.

On Wed, Mar 11, 2009 at 6:26 AM, MrSnowflake  wrote:

>
> But using CATEGORY_HOME won't solve his problem.
>
> On 10 mrt, 19:41, Romain Guy  wrote:
> > Don't use the package and class name directly, this will work only for
> > the current default Home screen. Use an Intent with the CATEGORY_HOME
> > instead.
> >
> >
> >
> >
> >
> > On Tue, Mar 10, 2009 at 11:40 AM, MrSnowflake 
> wrote:
> >
> > > As I said on Anddev.org earlier:
> > > Intent myIntent = new Intent();
> > > myIntent.setClassName("com.android.launcher",
> > > "com.android.launcher.Launcher");
> > > startActivity(myIntent);
> >
> > > On 10 mrt, 14:18, Stoyan Damov  wrote:
> > >> I can't help you with this. Tough luck - I'd assume that when an
> > >> intent has alternative intent filters and an intent filter crashes,
> > >> the user would be presented with the list of intent filters to retry
> > >> the operation. I guess that's not the case or you wouldn't be asking.
> >
> > >> Cheers
> >
> > >> On Tue, Mar 10, 2009 at 2:59 PM, Kakyoin  wrote:
> >
> > >> > On Mar 10, 7:31 pm, Stoyan Damov  wrote:
> > >> >> "Here are some examples of other operations you can specify as
> intents
> > >> >> using these additional parameters:
> >
> > >> >> *
> >
> > >> >>   ACTION_MAIN with category CATEGORY_HOME -- Launch the home
> screen."
> >
> > >> >>http://developer.android.com/reference/android/content/Intent.html
> >
> > >> >> On Tue, Mar 10, 2009 at 2:20 PM, Kakyoin 
> wrote:
> >
> > >> >> > Topic.  Short and sweet question. And I did browse the forum
> before
> > >> >> > asking.
> >
> > >> >> > Thank you in advance.
> >
> > >> > Hi. Thank you for the reply.
> >
> > >> > But actually I do have another Alternative Home application (which I
> > >> > set to default for CATEGORY_HOME).
> >
> > >> > In this case, let's assume that this Alternative Home has a but in
> its
> > >> > onCreate(), this bug cause the "Force close" screen.
> >
> > >> > The real problem is: when user set my Alternative Home as their
> > >> > 'default action for 'Home' ', then shutdown the device and turn it
> > >> > back on. It'll keep crashing at the start up.
> >
> > >> > The user can't press back to go to system's Home app; there's no
> > >> > system's Home to go back to (because my Alternative Home is the
> > >> > default and is the only 'Home'  loaded at boot time)
> >
> > >> > I'm sorry for my bad English. >_<  What I'm trying to do is to
> handle
> > >> > that bug(which actually only happen when user has no SD card
> present)
> > >> > by doing this: "if there's no SD card inserted, then just launch the
> > >> > System's Home app instead"
> >
> > >> > here's my code when the SD card is not found:
> >
> > >> > Intent i = new Intent();
> > >> > i.setAction("android.intent.action.MAIN");
> > >> > i.addCategory("android.intent.category.HOME");
> > >> > startActivity(i); // this launch my Alternative Home (because it is
> > >> > set as default)
> >
> > >> > Anyway, Thank you for your reply. =)
> >
> > --
> > 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
> >
>


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

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

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



[android-developers] Re: Touch *extremely* expensive performance-wise

2009-03-11 Thread Dianne Hackborn
The ANR dialog is shown when you aren't responsive for 5 seconds.  We should
be talking about waiting for ~20ms only for motion events.  These are in
completely different realms.

On Wed, Mar 11, 2009 at 7:22 AM, Streets Of Boston
wrote:

>
> I would think so too.
>
> As soon as you execute wait statements in your main message-
> dispatching thread (e.g. sleeps, waits, waiting for I/O, long lasting
> loops, joins, etc.), you run the risk of the application getting
> unresponsive. Android may pop up a message telling the user that the
> application is not responding giving the user the choice to wait or
> force-close.
>
> In this case, the longest wait is only a second, after which the
> onTouchEvent returns, but still
>
> On Mar 11, 9:38 am, MrSnowflake  wrote:
> > But won't it affect other Activity stuff and life cycle functions and
> > such?
> >
> > On 10 mrt, 19:48, Stoyan Damov  wrote:
> >
> >
> >
> > > sure, it should work - I think someone has already done that
> >
> > > On Tue, Mar 10, 2009 at 8:26 PM, MrSnowflake 
> wrote:
> >
> > > > I have a question about this: While sleeping the ui thread works,
> > > > would it also work to wait() the main thread and notify() it when the
> > > > new frame 'starts'?
> >
> > > > On 20 feb, 10:41, suhas gavas  wrote:
> > > >> hi zombies and robots,
> > > >> plz let me the solution to improve touch event performance
> > > >> I have got stuck because of the sam
> >
> > > >> regards,
> > > >> suhas
> >
> > > >> On Fri, Feb 20, 2009 at 12:46 PM, Zombies and Robots <
> caecus...@gmail.com>wrote:
> >
> > > >> > Thank you both!
> >
> > > >> > With those pointers, I was able to figure out and implement
> working
> > > >> > versions of both techniques.  Now I just have to decide which one
> I
> > > >> > like better and finish writing my game...- Hide quoted text -
> >
> > - Show quoted text -
> >
>


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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: Change height of notification?

2009-03-11 Thread Dianne Hackborn
No the height is deliberately restricted.

On Tue, Mar 10, 2009 at 10:11 AM, Marc  wrote:

>
> Is there any way to change the height of the "extended" notification
> (i.e. the contentView in the Notification)?   It seems like I get the
> standard two lines no matter what...   I'm thinking I've missed
> something, but ...
>
> TIA
>
> Marc
> >
>


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

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

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



[android-developers] Re: How can I play a custom animation between 2 activity?

2009-03-11 Thread Dianne Hackborn
Transition animations are not enabled by default in current Android.  You
must have turned it on somehow in your emulator.

On Wed, Mar 11, 2009 at 3:38 AM, tcassany  wrote:

>
> Hello,
>
> I search a way to play a custom animation (as slide animation on the
> emulator)  to do a transition between the end of an activity and the
> begin of an other?
>
> Thanks,
>
> Thomas
>
> >
>


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

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

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



[android-developers] Re: Issue with Threads and onCreate()

2009-03-11 Thread Marco Nelissen

Sure, but then what if right as the activity is starting, something
else happens that causes it to be destroyed? (incoming phone call,
camera app is  started, it could be anything, really)
My point was: instead of putting in all these hacks to try and prevent
your activity from being stopped and restarted at an inconvenient
time, it's ultimately easier to do the right thing. Like cleaning up
the threads in onDestroy, using a service instead of a thread, or
keeping the threads across activities.



On Wed, Mar 11, 2009 at 7:18 AM, Stoyan Damov  wrote:
>
> unless he traps the back button in onKeyDown
>
> On Wed, Mar 11, 2009 at 2:51 PM, Marco Nelissen  wrote:
>>
>> That will solve the problem when opening/closing the keyboard, but
>> won't solve it when e.g. starting the app and then immediately hitting
>> the back button to exit it.
>>
>>
>> On Wed, Mar 11, 2009 at 5:37 AM, Stoyan Damov  wrote:
>>>
>>> keyboardHidden|orientation
>>>
>>> On Wed, Mar 11, 2009 at 2:34 PM, mobilekid  
>>> wrote:

 For some reason that seems not to work in my case. I've declared the
 activity as android:configChanges="orientation" in the
 AndroidManifest.xml, which I assume will call onConfigurationChanged
 (Configuration). So for testing purposes I've simply implemented it as
 follows:

 @Override
 public void onConfigurationChanged (Configuration newConfig){
        Log.i(this.toString(), "I've been called!");
        super.onConfigurationChanged(newConfig);
 }

 However, it never gets called. Am I doing anything wrong here?!
 Thanks!




 On Mar 11, 11:44 am, Stoyan Damov  wrote:
> Yes, basically if you declare your activity's orientation to be
> "sensor" there's nothing else to do (I think).

 >

>>>
>>> >
>>>
>>
>> >
>>
>
> >
>

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



[android-developers] Attn: Android Engineers. Feature request

2009-03-11 Thread Colin

There may be issues with this, but I have run into problems developing
for android that could easily be solved by this:

Maybe add an option in your manifest that stats that youd like to give
customers the option to send bug reports to the developer on
application crash. This way if the customer consents, the system can
just compose an email with the last hundred or so lines of the the log
(similar to 'logcat E:*' or whatever).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Contact change broadcast

2009-03-11 Thread LambergaR

Hello all!

Is there a broadcast message dispached when a contact is changed or
added in Android's native contact book?
If not, what would be the most efficient way to check for changes?

Secend of all, what would be the most efficient method for sending a
file (image) using HTTP POST request?

Thanks in advance,
Martin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 use IOCTL() to access H/W, via Sahred Library + JNI or else, in Android applications?

2009-03-11 Thread tec

hi all,

I occurred the familiar issue with that.
I want to open the /dev/snd/hwC0D0 to do the I/O control.
But the different thing is that I failed at opening the device node.

Dear Mars,
Did you find the same situation while opening the device node?
Since I wrote this code into Android ALSA part. (See also /hardware/
alsa-sound/)
Did you confirm that you've already been success on "open"?
Thanks for your information.

BR,
Tec

On 3月10日, 下午4時48分, Mars Alucard  wrote:
> Hi,
>
> In my Android application, I need to use IOCTL() to do I2C R/W
> operations.
>
> My native C application could do it successfully, no matter by
> standalone or dynamically linking .so, but...
> ioctl() returns -1 when Android application loads shared library (.so)
> and calls the function including ioctl() via JNI.
>
> Could Android application directly use ioctl() in shared library (.so)
> thruogh JNI with any tips?
>
> Or, if Android application needs to use ioctl() in native C code,
> could some methods help to do this?
> (Like Service Manager, Binder, Android source code, or something
> else?)
>
> I've tried to find articles for several days to solve this issue, but
> still get no ideas now.
>
> (Followings are the environment and testing steps for my trials.)
>
> 1. Testing Steps for Native C Application on Android (Successful)
> (1) Chiefly I want to execute the two statements below on Android:
>
> unsigned int hI2C = open("/dev/i2c-2", O_RDWR);
> int retI2C = ioctl(hI2C, I2C_SLAVE, 0x0C);
>
> (2) A native C application is compiled on Ubuntu, and then put to
> Beagle/G1.
> (3) The native C application could work well to open I2C and bind/read/
> write I2C slave address 0x0C.
> (4)
> Even more, the native C application could dynamically link the shared
> library (.so) in 2. (1) below,
> and then call JNI function to execute the statements in 1. (1) above
> successfully.
>
> 2. Testing Steps for Android Application with JNI + Shared Library .so
> (Unsuccessful)
> (1) I make a shared library (.so) with JNI, including the statements
> in 1. (1) above, by the commands below:
>
> ~/arm-2007q3/bin/arm-none-linux-gnueabi-gcc -I/usr/lib/jvm/java-6-sun/
> include -I/usr/lib/jvm/java-6-sun/include/linux -fpic -c XXX.c
> ~/arm-2007q3/bin/arm-none-linux-gnueabi-ld -T ~/arm-2007q3/arm-none-
> linux-gnueabi/lib/ldscripts/armelf_linux_eabi.xsc -shared -o libXXX.so
> XXX.o
>
> (2) An Android application is compiled by Eclipse on WIN32, with a few
> system-level permission. (enabled by "uses-permission")
> (3) Then put the Android application (.apk) and shared library (.so)
> to Beagle/G1, with chmod 777.
> (4) Run the Android application, to load the shared library and call
> JNI function to execute the statements in 1. (1) above.
> (5) The Android application could load the shared library, call JNI
> functions, and execute almost all statements well, BUT...
> (6) When the Android application call JNI function to execute ioctl(),
> ioctl() return -1, which means FAILED.
>
> 3. Environment
> (1) Platform: Android @ T1 OMAP Beagle Board & Google Phone
> (2) WIN32: JDK v1.60_12 & Eclipse v3.42 (with a few system-level
> permissions enabled by "uses-permission")
> (3) Linux: Ubuntu & JDK v1.60_10 & arm-2007q3 ( with arm-non-linux-
> gnueabi-gcc/ld)
>
> Many thanks,
>
> Mars Alucard

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



[android-developers] How to create a fixed size(eg. 30x30 ) main window?

2009-03-11 Thread Goldeneye

Hi,
   I'm a newbie in android, and not good at java too. I suppose this
is a very simple question, could you give me the clue?

   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] Where can I get com.google.googlenav Package

2009-03-11 Thread jenny

Hi everyone,

   I am working on a GPS navigation App. I notice that
com.google.googlenav Package is available in Android SDK-m5,but in the
source code, there is nothing about googlenav. However, the package is
necessary for drive direction development on the device.
Could anyone please tell me from where I can get that googlenav
library?

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



[android-developers] Re: Android Testing with TMobile G1

2009-03-11 Thread Seufster

Hi gents
I am running fedora 8 with eclipse and have the sdk and plugin setup.
It work like a champ. I have regular g1 with the debug on and
developed one app sofar and it has worked great with no real issues.
I really liked the live debug option.

Ed

On Mar 10, 5:54 pm, mark.ka...@gmail.com wrote:
>   You do need to enable debugging to use adb, under Settings ->
> applications -> development
>
>                      M
>
> On Mar 10, 2:52 pm, mark.ka...@gmail.com wrote:
>
> >   I just use a regular G1 for development, got it before the dev phone
> > came out. You can access it with adb as usual. You don't have root
> > access, but this doesn't seem to matter for developing normal apps,
> > only if you plan on hacking or setting up your own linux layer code
> > etc. You also get the app store which you don't on the dev phone, so
> > that's an advantage. I use mine with AT&T, its an ulocked G1.
>
> >                   mark
>
> > On Mar 10, 12:33 am, Al Sutton  wrote:
>
> > > If you're running Vista you may encounter problems with the USB 
> > > connection.
>
> > > Al.
>
> > > Mike Pastor wrote:
>
> > > > Fellow Developers,
>
> > > > Has anyone experienced problems with using the TMobile G1 (usa) as a
> > > > serious Android testing machine?  Is it a seamless task to load the G1
> > > > phone from your development PC through the USB connection?
>
> > > > Are there any special "Developer Mode" settings that have to be made
> > > > on the consumer TMobile G1?  Does TMobile give us official "root"
> > > > access?
>
> > > > Does the GPS feature on the TMobile G1 work well?  Can the positioning
> > > > and directions (with voice?) be similar to a Garmin Navigation unit?
>
> > > > Thanks and Cheers,
>
> > > > Mike Pastor
>
> > > --
>
> > > * Written an Android App? - List it athttp://andappstore.com/*
>
> > > ==
> > > Funky Android Limited is registered in England & Wales with the
> > > company number  6741909. The registered head office is Kemp House,
> > > 152-160 City Road, London,  EC1V 2NX, UK.
>
> > > The views expressed in this email are those of the author and not
> > > necessarily those of Funky Android Limited, it's associates, or it's
> > > subsidiaries.- Hide quoted text -
>
> > > - Show quoted text -- 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: Merchant account signup down?

2009-03-11 Thread keith_hi...@yahoo.com

I am having the same issue. Been trying since yesterday to get this
resolved. Google as of yet has not responded to my tech support
request.

On Mar 10, 9:16 pm, jsdf  wrote:
> I am trying to sign up for a merchant account but it seems to be down:
> "Sorry, we could not setup your merchant account.
> Please try again later."
>
> Can anyone else confirm this, or is it just my login?
>
> 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: Issue 2204: logcat service can not run while add parameters -n 2

2009-03-11 Thread eagle black
Deer all;
  I think I have fix this problem.
 The reason is
struct service {
/* list of all services */
struct listnode slist;

const char *name;
const char *classname;

unsigned flags;
pid_t pid;
time_t time_started;/* time of last start */
time_t time_crashed;/* first crash within inspection window */
int nr_crashed; /* number of times crashed within window */

uid_t uid;
gid_t gid;
gid_t supp_gids[NR_SVC_SUPP_GIDS];
size_t nr_supp_gids;

struct socketinfo *sockets;
struct svcenvinfo *envvars;

int nargs;
char *args[1];
struct action onrestart;  /* Actions to execute on restart. */

/* keycodes for triggering this service via /dev/keychord */
int *keycodes;
int nkeycodes;
int keychord_id;
};

while we use the field 'char *args[1]' ,
 static void *parse_service(struct parse_state *state, int nargs, char
**args)
{
struct service *svc;
if (nargs < 3) {
parse_error(state, "services must have a name and a program\n");
return 0;
}
if (!valid_name(args[1])) {
parse_error(state, "invalid service name '%s'\n", args[1]);
return 0;
}

svc = service_find_by_name(args[1]);
if (svc) {
parse_error(state, "ignored duplicate definition of service '%s'\n",
args[1]);
return 0;
}

nargs -= 2;
svc = calloc(1, sizeof(*svc) + sizeof(char*) * nargs);
if (!svc) {
parse_error(state, "out of memory\n");
return 0;
}
svc->name = args[1];
svc->classname = "default";
memcpy(svc->args, args + 2, sizeof(char*) * nargs);
svc->args[nargs] = 0;
svc->nargs = nargs;
svc->onrestart.name = "onrestart";
list_init(&svc->onrestart.commands);
list_add_tail(&service_list, &svc->slist);
return svc;
}

the  memcpy(svc->args, args + 2, sizeof(char*) * nargs); is used the struct
svc->onrestart
memory.
so while the nargs > 8
the svc->args[8] == "onrestart"
but not your real args.






2009/3/11 eagle black 

> hi all,
> I found a bug at android platform.
>
> *Please describe the problem in as much detail as possible.  Be sure to 
> include:*
> *- Steps to reproduce the problem*
> 1 .
> modify init.hardware.rc  (hardware is your platform hardware, such
>
> init.goldfish.rc)
> change
> service logcat /system/bin/logcat -r 1000 -v long -f /local/log/logcat.log
> oneshot
> to
> service logcat /system/bin/logcat -r 1000 -n 2 -v long -f 
> /local/log/logcat.log
> oneshot
>
> because the /local/log room limited, we only need two logcat.logs
> so we add a argumenet -n 2 (default is 4, right?)
> 2 .
> run the phone
>
> 3 .
> #ps | grep logcat
> we will found the logcat service is not running.
>
> *- Sample source code demonstrating the problem*
> *- What you think the correct behavior should be.*
> if we use the old
> service logcat /system/bin/logcat -r 1000 -v long -f /local/log/logcat.log
> oneshot
>
> the service can running.
>
>
>
>
>

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



[android-developers] Download of [Application} was unsuccessful

2009-03-11 Thread ads_78

Hi,
I have an app on the android market and am getting complaints that the
download is unsuccessful.  I know it is usually installing ok
though.

A) Is this download failure my fault?
B) Is there anything I can do to make it less likely?
C) What should I tell users whose download fails?  Should they try
again?

Thanks,
Andrew

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



[android-developers] [RFC PATCH] fix the Issue 2204: logcat service can not run while add parameters -n 2

2009-03-11 Thread eagle black
Deer all:
 I think my patch can fix this problem.

diff -uprN original/init.h now/init.h
--- original/init.h 2009-03-11 14:27:20.0 +0800
+++ now/init.h  2009-03-11 14:29:32.0 +0800
@@ -136,14 +136,15 @@ struct service {
 struct socketinfo *sockets;
 struct svcenvinfo *envvars;

-int nargs;
-char *args[1];
 struct action onrestart;  /* Actions to execute on restart. */

 /* keycodes for triggering this service via /dev/keychord */
 int *keycodes;
 int nkeycodes;
 int keychord_id;
+
+int nargs;
+char *args[1] __attribute__ ((aligned (sizeof(char *;
 };

 int parse_config_file(const char *fn);

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: Accessing the internet.

2009-03-11 Thread ku fu panda

 public static InputStream getInputStreamWithHttpClient( String
resourceURL )
throws IOException
{
// Create an instance of HttpClient.
HttpClient client = new DefaultHttpClient();
// Create a method instance.
HttpGet method = new HttpGet( resourceURL );
method.getParams().setIntParameter(
CoreConnectionPNames.CONNECTION_TIMEOUT,
CONNECTION_TINEOUT );
method.getParams().setIntParameter
( CoreConnectionPNames.SO_TIMEOUT,
CONNECTION_TINEOUT );
method.getParams().setIntParameter(
CoreConnectionPNames.SOCKET_BUFFER_SIZE, IO_BUFFER_SIZE );
method.getParams().setIntParameter(
ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, 5 );
method.getParams().setIntParameter(
ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 10 );
HttpResponse response = null;
InputStream input = null;
try
{
response = client.execute( method );
HttpEntity entity = response.getEntity();
input = entity.getContent();
}
catch ( IOException e )
{
Log.d( TAG, "Can not connect to the target server!" );
throw new IOException();
}
finally
{
Log.d( TAG, "close Expired Connections!" );
client.getConnectionManager().closeExpiredConnections();
}
return input;
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 play a custom animation between 2 activity?

2009-03-11 Thread tcassany

Hello,

I search a way to play a custom animation (as slide animation on the
emulator)  to do a transition between the end of an activity and the
begin of an other?

Thanks,

Thomas

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



[android-developers] Can someone make me an app?

2009-03-11 Thread AzonCigars.com

I would like someone to make an app for me.  I am willing to pay for
it and hope to list it on the android market.  The app would be a
niche app, only downloaded by certain people.  If you are interesting
in making the app for me please email me.   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] Issue 2204: logcat service can not run while add parameters -n 2

2009-03-11 Thread eagle black
hi all,
I found a bug at android platform.

*Please describe the problem in as much detail as possible.  Be sure
to include:*
*- Steps to reproduce the problem*
1 .
modify init.hardware.rc  (hardware is your platform hardware, such
init.goldfish.rc)
change
service logcat /system/bin/logcat -r 1000 -v long -f /local/log/logcat.log
oneshot
to
service logcat /system/bin/logcat -r 1000 -n 2 -v long -f /local/log/logcat.log
oneshot

because the /local/log room limited, we only need two logcat.logs
so we add a argumenet -n 2 (default is 4, right?)
2 .
run the phone

3 .
#ps | grep logcat
we will found the logcat service is not running.

*- Sample source code demonstrating the problem*
*- What you think the correct behavior should be.*
if we use the old
service logcat /system/bin/logcat -r 1000 -v long -f /local/log/logcat.log
oneshot
the service can running.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Accessing the internet.

2009-03-11 Thread ku fu panda

 public static InputStream getInputStreamWithHttpClient( String
resourceURL )
throws IOException
{
// Create an instance of HttpClient.
HttpClient client = new DefaultHttpClient();
// Create a method instance.
HttpGet method = new HttpGet( resourceURL );
method.getParams().setIntParameter(
CoreConnectionPNames.CONNECTION_TIMEOUT,
CONNECTION_TINEOUT );
method.getParams().setIntParameter
( CoreConnectionPNames.SO_TIMEOUT,
CONNECTION_TINEOUT );
method.getParams().setIntParameter(
CoreConnectionPNames.SOCKET_BUFFER_SIZE, IO_BUFFER_SIZE );
method.getParams().setIntParameter(
ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, 5 );
method.getParams().setIntParameter(
ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 10 );
HttpResponse response = null;
InputStream input = null;
try
{
response = client.execute( method );
HttpEntity entity = response.getEntity();
input = entity.getContent();
}
catch ( IOException e )
{
Log.d( TAG, "Can not connect to the target server!" );
throw new IOException();
}
finally
{
Log.d( TAG, "close Expired Connections!" );
client.getConnectionManager().closeExpiredConnections();
}
return input;
}


On Mar 10, 12:21 pm, dillirao malipeddi 
wrote:
>  public String get_DAtaFromWeb(String url_toconnect)//throws Exception
>   {
>         int connection_Timeout = 1;// 10sec
> HttpParams my_httpParams = new BasicHttpParams();;
> HttpConnectionParams.setConnectionTimeout(my_httpParams,connection_Timeout)­;
>         HttpConnectionParams.setSoTimeout(my_httpParams,connection_Timeout);
>
>         HttpClient httpclient = new DefaultHttpClient(my_httpParams);  //get
> http client with given params
>         String responseBody = null;
>
>      try
>      {
>
>       HttpGet httpget = new HttpGet(url_Pls);
>
>       if(myDebug.debug_Log)Log.i("CONTENT GET","executing request " +
> httpget.getURI());
>
>       // Create a response handler
>       ResponseHandler responseHandler = new BasicResponseHandler();
>
>       responseBody = httpclient.execute(httpget, responseHandler);
>       }
>      catch(Exception e)
>      {
>      if(myDebug.debug_Log)Log.i("Exception","Http Connection"+e.toString());
>      }
>
>       String Content = responseBody;
>
>  if(myDebug.debug_Log)Log.i("","-START--­-");
>       if(myDebug.debug_Log)Log.i("Response",""+Content);
>
>  if(myDebug.debug_Log)Log.i("","---END-"­);
>
>      return Content;
>
>   }
>
> On Mon, Mar 9, 2009 at 4:53 PM, murphy  wrote:
>
> > Hi all,
>
> > Was just wondering if anyone had any code samples about writing and
> > retrieving data from a website? I am currently creating an application
> > which populates its textviews by accessing information from an online
> > source.
>
> > Thanks, Murphy.
>
> --
> Dilli Rao. M

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Loading 3D Models

2009-03-11 Thread Markus Feuerstein
Hi!
I'm really interested in this issue too! I would be very pleased if someone
could share their experience!

Anyway, does someone know some good opengl 'tutorials' or documentations?

Regards markus

On Mar 11, 2009 9:53 AM, "geoff"  wrote:


How are people here loading in their models?

I'm just manually parsing a OBJ file into my own model class and
drawing that.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Loading 3D Models

2009-03-11 Thread tathagatac

Sounds interesting. What kind of FPS are you getting? It would be
interesting to have a triangles vs FPS graph.

On Mar 11, 1:52 pm, geoff  wrote:
> How are people here loading in their models?
>
> I'm just manually parsing a OBJ file into my own model class and
> drawing that.

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



[android-developers] db4o Object Database Android Demos Updated

2009-03-11 Thread German

Hi.

For those of you who never heard about db4o -> it's an Android
complaint open source object database with a thriving user community
(http://developer.db4o.com). It allows you to store/retrieve POJOs
directly (no tables, no rows, no cursors) without sacrificing speed,
flexibility and reliability.

I'm sending this message to the list because I wanted to let you know
that we've updated the PasswordSafe and MapMe Android demos to work
with both the latest stable version of db4o (v7.4) and Android SDK
(v1.1 r1).

By checking out these examples (tutorial and videos included) you'll
realize how easy and straight forward it's to persist POJOs rather
than relying solely on SQLite.

For more information see:
http://developer.db4o.com/blogs/community/archive/2009/03/11/db4o-android-demos-updated.aspx

Enjoy!!

German Viscuso
db4objects
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Merchant account signup down?

2009-03-11 Thread Al Sutton

You aren't going to get an official response from Google on this list.

The Google engineers here are developers who get involved in technical 
discussions.

You are now at the mercy of Googles support infrastructure.

Al.

jsdf wrote:
> Bump!
> It's been down for 15 hours for me now.
> I submitted a help request to Google, but of course it probably got
> routed to the black hole that is tech support.
> Please can anyone confirm??
> Anyone from Google able to help on this??
>
> Thanks.
>
> On Mar 10, 8:16 pm, jsdf  wrote:
>   
>> I am trying to sign up for a merchant account but it seems to be down:
>> "Sorry, we could not setup your merchant account.
>> Please try again later."
>>
>> Can anyone else confirm this, or is it just my login?
>>
>> Thanks.
>> 
> >
>   


-- 

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

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

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


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



  1   2   >