[android-developers] Re: SDK 1.6 and emulator sdcard problem
hi EvgenyV / all even i am facing the same problem in my case also file.mkdirs( ) is always returning false ! its happening since i upgraded to sdk version 1.6 :( does anyone has any solution for this ? thanks in advance ! ~pp On Sep 22, 4:21 pm, EvgenyV wrote: > Hi all, > > I've updated toSDK1.6and created the new AVD andemulatorsdcard > image file sucesssfully. > > I'm using following code to store binary file insdcard: > - > File file = new File("sdcard/mypackage.folder1"); > if(!file.exists() && file.mkdir()) > { > file = new File('myfile.bin'); > if(!file.exists()) > file.createNewFile(); > } > > FileOutputStream stream = new FileOutputStream('myfile.bin'); > objectOut = new ObjectOutputStream(new BufferedOutputStream > (stream)); > objectOut.writeObject(data); > --- > Exactly the same code is working properly withSDK1.5. > > For some reason file.mkdir( ) always returns false. > > Does anybody got suchproblem? > > Thanks in advance, > Evgeny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SDK 1.6 and emulator sdcard problem
anyways ... has solved my problem :-) thanks all! ~pp On Oct 10, 12:27 pm, preetam_pict wrote: > hi EvgenyV / all > > even i am facing the same problem > > in my case also file.mkdirs( ) is always returning false ! its > happening since i upgraded to sdk version 1.6 :( > > does anyone has any solution for this ? > > thanks in advance ! > ~pp > > On Sep 22, 4:21 pm, EvgenyV wrote: > > > Hi all, > > > I've updated toSDK1.6and created the new AVD andemulatorsdcard > > image file sucesssfully. > > > I'm using following code to store binary file insdcard: > > - > > File file = new File("sdcard/mypackage.folder1"); > > if(!file.exists() && file.mkdir()) > > { > > file = new File('myfile.bin'); > > if(!file.exists()) > > file.createNewFile(); > > } > > > FileOutputStream stream = new FileOutputStream('myfile.bin'); > > objectOut = new ObjectOutputStream(new BufferedOutputStream > > (stream)); > > objectOut.writeObject(data); > > --- > > Exactly the same code is working properly withSDK1.5. > > > For some reason file.mkdir( ) always returns false. > > > Does anybody got suchproblem? > > > Thanks in advance, > > Evgeny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: can anybody tell pls......
what is "st" and "sb" ?? Thanks, AJ On Oct 10, 11:55 am, ragavendran s wrote: > problem in StringTokenizer > > String str="one.1.two.2.three.3" > > Stringtokenizer tok=new Stringtokenizer(str); > while(st.hasmoreTokens()) > { > sb.append(st.nextToken); > > } > > Sustem.out.println(sb.toString()); > > output: > > one > 1 > two > 2 > three > 3 > > but i need output like this: > one > two > three > > i want to cut the values 1,2,3 > > Thanks in Advance > Raghav.S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: can anybody tell pls......
Sorry Here is my Revised Code problem in StringTokenizer String str="one.1.two.2.three.3" StringBuffer sb; Stringtokenizer tok=new Stringtokenizer(str); while(tok.hasmoreTokens()) { sb.append(tok.nextToken); } Sustem.out.println(sb.toString()); output: one 1 two 2 three 3 but i need output like this: one two three i want to cut the values 1,2,3 Thanks in Advance Raghav.S On Sat, Oct 10, 2009 at 1:08 PM, AJ wrote: > > what is "st" and "sb" ?? > > Thanks, > AJ > > On Oct 10, 11:55 am, ragavendran s wrote: > > problem in StringTokenizer > > > > String str="one.1.two.2.three.3" > > > > Stringtokenizer tok=new Stringtokenizer(str); > > while(st.hasmoreTokens()) > > { > > sb.append(st.nextToken); > > > > } > > > > Sustem.out.println(sb.toString()); > > > > output: > > > > one > > 1 > > two > > 2 > > three > > 3 > > > > but i need output like this: > > one > > two > > three > > > > i want to cut the values 1,2,3 > > > > Thanks in Advance > > Raghav.S > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: can anybody tell pls......
Sorry Here is my Revised Code problem in StringTokenizer String str="one.1.two.2.three.3" StringBuffer sb; Stringtokenizer tok=new Stringtokenizer(str); while(tok.hasmoreTokens()) { sb.append(tok.nextToken); } Sustem.out.println(sb.toString()); output: one 1 two 2 three 3 but i need output like this: one two three i want to cut the values 1,2,3 Thanks in Advance Raghav.S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Mobile phone accelaration sensor
Hi Mike, actually I am doing integrations on the acceleration readings obtained from the sensor, to implement "dead reckoning" . and yes, like you said, it is touchy. Then just wonder whether you have got better ways to do this? What did you mean by "not a real-time OS"? So is that to say, the accelerometer on HTC intrinsically can't be used for this purpose or the problems are more about software on Android side? Thanks On Sep 23, 5:40 am, Mike Collins wrote: > Quite precise. It can get a bit touchy if you start doing > integrations > over time. It's not a real-time OS so be aware. > > mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SDK 1.6 and emulator sdcard problem
Hi ! Since i've added the permissin entry in manifest the problem was solved. Thanks, Evgeny On Sat, Oct 10, 2009 at 9:27 AM, preetam_pict wrote: > > hi EvgenyV / all > > even i am facing the same problem > > in my case also file.mkdirs( ) is always returning false ! its > happening since i upgraded to sdk version 1.6 :( > > does anyone has any solution for this ? > > thanks in advance ! > ~pp > > > On Sep 22, 4:21 pm, EvgenyV wrote: > > Hi all, > > > > I've updated toSDK1.6and created the new AVD andemulatorsdcard > > image file sucesssfully. > > > > I'm using following code to store binary file insdcard: > > - > > File file = new File("sdcard/mypackage.folder1"); > > if(!file.exists() && file.mkdir()) > >{ > >file = new File('myfile.bin'); > >if(!file.exists()) > > file.createNewFile(); > >} > > > > FileOutputStream stream = new FileOutputStream('myfile.bin'); > > objectOut = new ObjectOutputStream(new BufferedOutputStream > > (stream)); > > objectOut.writeObject(data); > > --- > > Exactly the same code is working properly withSDK1.5. > > > > For some reason file.mkdir( ) always returns false. > > > > Does anybody got suchproblem? > > > > Thanks in advance, > > Evgeny > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: can anybody tell pls......
Hi Raghav See the following code: StringBuffer sb = new StringBuffer(); String str="one.1.two.2.three.3"; Pattern p =Pattern.compile("[.\\d.]"); String[] items = p.split(str); for(String s : items) { sb.append(s); sb.append("\n"); } System.out.println(sb.toString()); hope this helps you. Thanks, AJ On Oct 10, 1:47 pm, ragavendran s wrote: > Sorry > Here is my Revised Code > > problem in StringTokenizer > > String str="one.1.two.2.three.3" > StringBuffer sb; > Stringtokenizer tok=new Stringtokenizer(str); > while(tok.hasmoreTokens()) > { > sb.append(tok.nextToken); > > } > > Sustem.out.println(sb.toString()); > > output: > > one > 1 > two > 2 > three > 3 > > but i need output like this: > one > two > three > > i want to cut the values 1,2,3 > > Thanks in Advance > Raghav.S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Screen Orientation Change
Great, thanks! On Oct 10, 12:22 am, Mark Murphy wrote: > Neilz wrote: > > This must be simple, right? > > > On Oct 8, 11:34 pm, Neilz wrote: > >> Richard that's great, thanks. I'm almost there. One further > >> question... > > >> How can I check what the orientation of the screen is when the > >> Activity loads? > > Try getResources().getConfiguration(). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: can anybody tell pls......
Hi AJ thanks for ur kind reply Here i need one more output: one 1 two 2 three 3 i want separate this like :one,two,three in list the list like this one two three when i click the one it will display 1(it the corresponding value shown in output) when i click two it should display 2 i want to separate string values and integer values...when i access string value it should tell corresponding integer values... Thanks in Advance, Raghav.S On Sat, Oct 10, 2009 at 2:41 PM, AJ wrote: > > Hi Raghav > > See the following code: > > > >StringBuffer sb = new StringBuffer(); >String str="one.1.two.2.three.3"; > >Pattern p =Pattern.compile("[.\\d.]"); >String[] items = p.split(str); >for(String s : items) { >sb.append(s); >sb.append("\n"); >} >System.out.println(sb.toString()); > > > > > hope this helps you. > > Thanks, > AJ > > On Oct 10, 1:47 pm, ragavendran s wrote: > > Sorry > > Here is my Revised Code > > > > problem in StringTokenizer > > > > String str="one.1.two.2.three.3" > > StringBuffer sb; > > Stringtokenizer tok=new Stringtokenizer(str); > > while(tok.hasmoreTokens()) > > { > > sb.append(tok.nextToken); > > > > } > > > > Sustem.out.println(sb.toString()); > > > > output: > > > > one > > 1 > > two > > 2 > > three > > 3 > > > > but i need output like this: > > one > > two > > three > > > > i want to cut the values 1,2,3 > > > > Thanks in Advance > > Raghav.S > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 find out how packaged the ROM?
Maybe http://developer.android.com/reference/android/os/Build.html Not tried it -- RichardC On Oct 9, 11:05 pm, Mariano Kamp wrote: > Hi, > is there any way I can find out programmatically who packaged the ROM > (Google, HTC, cyanogen mod)? > > I would like to include that information in my bug reporting facility. > > Cheers, > Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Relation between Google GeoPoint instances
Here's a tricky one. Or maybe it isn't... I am trying to find a way to tell the difference in degrees between two GeoPoints. I've been playing around with GoogleMaps for a while, and can't see an obvious relationship between points. For example, if I mark two points on the map which are clearly 45 degrees from each other, I would expect the differences in latitude and longitude to be equal, but they're not, nothing like it. So I don't have an obvious ratio to work with to help me find the degrees between the two. I need an algorithm... Anyone have any ideas how I might achieve 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: can anybody tell pls......
hi Aj here i i know how to display list the only problem is how to retrieve the corresponding values.can i separate the intager values and string values from string str ="1.one.2.two.3.three".i need separate these "1" as integer value and "one " as string value.. On Sat, Oct 10, 2009 at 2:57 PM, ragavendran s wrote: > Hi AJ thanks for ur kind reply > > Here i need one more > > output: > > one > 1 > two > 2 > three > 3 > > i want separate this like :one,two,three in list > > the list like this > one > two > three > > when i click the one it will display 1(it the corresponding value shown in > output) when i click two it should display 2 > > i want to separate string values and integer values...when i access string > value it should tell corresponding integer values... > > Thanks in Advance, > > Raghav.S > > > > On Sat, Oct 10, 2009 at 2:41 PM, AJ wrote: > >> >> Hi Raghav >> >> See the following code: >> >> >> >>StringBuffer sb = new StringBuffer(); >>String str="one.1.two.2.three.3"; >> >>Pattern p =Pattern.compile("[.\\d.]"); >>String[] items = p.split(str); >>for(String s : items) { >>sb.append(s); >>sb.append("\n"); >>} >>System.out.println(sb.toString()); >> >> >> >> >> hope this helps you. >> >> Thanks, >> AJ >> >> On Oct 10, 1:47 pm, ragavendran s wrote: >> > Sorry >> > Here is my Revised Code >> > >> > problem in StringTokenizer >> > >> > String str="one.1.two.2.three.3" >> > StringBuffer sb; >> > Stringtokenizer tok=new Stringtokenizer(str); >> > while(tok.hasmoreTokens()) >> > { >> > sb.append(tok.nextToken); >> > >> > } >> > >> > Sustem.out.println(sb.toString()); >> > >> > output: >> > >> > one >> > 1 >> > two >> > 2 >> > three >> > 3 >> > >> > but i need output like this: >> > one >> > two >> > three >> > >> > i want to cut the values 1,2,3 >> > >> > Thanks in Advance >> > Raghav.S >> >> >> > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Uniquely identifying a phone via an Http request
You can use the android id and add it in http header On Oct 9, 10:55 pm, stanlick wrote: > Is there a way I can identify a handset on the server side of an Http > request? I realize many headers are included on the request, but I am > uncertain as to how the handset might be uniquely identified? Perhaps > the sim signature or some such fingerprint? > > Thanks, > Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] onSensorChanged: synchronized (this)?
Hi, I have a pretty simple question. For public void onSensorChanged (int sensor, float[] values){synchronized (this) { what's "synchronized (this) " for...? I'm really new to Java...what's gonna happen if I dont have this? Thank you very much.!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Relation between Google GeoPoint instances
I don't know if there is something already in the SDK to work this out for you but if not you need to research Greate Circle algorithms. Note that if your points are only a few 10s of km (or miles) apart then you can approximate using pythagoras. http://en.wikipedia.org/wiki/Great-circle_distance -- RichardC On Oct 10, 10:54 am, Neilz wrote: > Here's a tricky one. Or maybe it isn't... > > I am trying to find a way to tell the difference in degrees between > two GeoPoints. I've been playing around with GoogleMaps for a while, > and can't see an obvious relationship between points. > > For example, if I mark two points on the map which are clearly 45 > degrees from each other, I would expect the differences in latitude > and longitude to be equal, but they're not, nothing like it. So I > don't have an obvious ratio to work with to help me find the degrees > between the two. I need an algorithm... > > Anyone have any ideas how I might achieve 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] MediaPlayer and Amr
I used MediaPlayer for play an amr file and it work good. Now I'd like to play an amr stream progressive. I must use a my socket connection to get audio stream (no rtp no http but a private protocol). Can I play a buffer amr using ParcelFileDescriptor.fromSocket(_sc); ? I read the doc about ParcelFileDescriptor but is not clear how must be used. I written that little code but it does't work if (_pfd==null){ // INIT THE PLAYER _pfd = ParcelFileDescriptor.fromSocket(_sc); player.setDataSource(_pfd.getFileDescriptor()); player = new MediaPlayer(); Parcel data = null; data = Parcel.obtain(); ' HEADER AMR data.writeString("#!AMR"); _pfd.writeToParcel(data, 0); } else{ ' WRITE FRAME AUDIO Parcel data = null; data = Parcel.obtain(); data.writeByteArray(_byBuf); _pfd.writeToParcel(data, 0); if (_iNAudioFrames==300){ // play the stream after 300 frames received player.prepare(); player.start(); } } somebody can help ? Is possible do it ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onSensorChanged: synchronized (this)?
Hi, Simply put "synchronized(this)" will stop multilpe threads changing the data in your class via all methods that are also "synchronized (this)". Have a read of http://java.sun.com/docs/books/tutorial/essential/concurrency/sync.html However I think that the interface you are using (SensorListener) has been deprecated and you should now be using SensorEventListener http://developer.android.com/reference/android/hardware/SensorEventListener.html -- RichardC "Used for receiving notifications from the SensorManager when sensor values have changed. This interface is deprecated, use SensorEventListener instead." On Oct 10, 11:10 am, DD wrote: > Hi, I have a pretty simple question. For > > public void onSensorChanged (int sensor, float[] values){synchronized > (this) { > > what's "synchronized (this) " for...? I'm really new to Java...what's > gonna happen if I dont have this? Thank you very much.!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: can anybody tell pls......
there are helper function available to do this. check this isDigit(char ch) Thanks, AJ On Oct 10, 3:02 pm, ragavendran s wrote: > hi Aj here i i know how to display list the only problem is how to retrieve > > the corresponding values.can i separate the intager values and string > values from > string str ="1.one.2.two.3.three".i need separate these "1" as integer > value and "one " as string value.. > > On Sat, Oct 10, 2009 at 2:57 PM, ragavendran s wrote: > > > Hi AJ thanks for ur kind reply > > > Here i need one more > > > output: > > > one > > 1 > > two > > 2 > > three > > 3 > > > i want separate this like :one,two,three in list > > > the list like this > > one > > two > > three > > > when i click the one it will display 1(it the corresponding value shown in > > output) when i click two it should display 2 > > > i want to separate string values and integer values...when i access string > > value it should tell corresponding integer values... > > > Thanks in Advance, > > > Raghav.S > > > On Sat, Oct 10, 2009 at 2:41 PM, AJ wrote: > > >> Hi Raghav > > >> See the following code: > > >> > >> StringBuffer sb = new StringBuffer(); > >> String str="one.1.two.2.three.3"; > > >> Pattern p =Pattern.compile("[.\\d.]"); > >> String[] items = p.split(str); > >> for(String s : items) { > >> sb.append(s); > >> sb.append("\n"); > >> } > >> System.out.println(sb.toString()); > > >> > > >> hope this helps you. > > >> Thanks, > >> AJ > > >> On Oct 10, 1:47 pm, ragavendran s wrote: > >> > Sorry > >> > Here is my Revised Code > > >> > problem in StringTokenizer > > >> > String str="one.1.two.2.three.3" > >> > StringBuffer sb; > >> > Stringtokenizer tok=new Stringtokenizer(str); > >> > while(tok.hasmoreTokens()) > >> > { > >> > sb.append(tok.nextToken); > > >> > } > > >> > Sustem.out.println(sb.toString()); > > >> > output: > > >> > one > >> > 1 > >> > two > >> > 2 > >> > three > >> > 3 > > >> > but i need output like this: > >> > one > >> > two > >> > three > > >> > i want to cut the values 1,2,3 > > >> > Thanks in Advance > >> > Raghav.S > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: onSensorChanged: synchronized (this)?
I wish could edit our messages ... I should have said something like: .. will block multilpe simultaneous threads changing the data ... -- RichardC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to use a buildin drawable resource?
I need to use some buildin drawable I found in http://developer.android.com/reference/android/R.drawable.html I set drawable @drawable/ic_input_add to a button in my layout xml file. The add icon appears on the button of layout editor. But there is a error of that xml file said that Description ResourcePathLocationType ERROR Error: No resource found that matches the given name (at 'drawableLeft' with value '@drawable/ic_input_add').spend_list.xml / AccountBook/res/layout line 5 Android AAPT Problem My question is, how to use a buildin drawable? Thanks. Victor Lin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 a buildin drawable resource?
U can use findViewById() to get the view, n then use android.R.* in the java class associated. Dunno a soln in XML. Sujay On Sat, Oct 10, 2009 at 4:20 PM, Victor Lin wrote: > > I need to use some buildin drawable I found in > http://developer.android.com/reference/android/R.drawable.html > > I set drawable @drawable/ic_input_add to a button in my layout xml > file. The add icon appears on the button of layout editor. But there > is a error of that xml file said that > > Description ResourcePathLocationType > ERROR Error: No resource found that matches the given name (at > 'drawableLeft' with value '@drawable/ic_input_add').spend_list.xml / > AccountBook/res/layout line 5 Android AAPT Problem > > My question is, how to use a buildin drawable? > > Thanks. > Victor Lin. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ssh and ftp connections not run in android sdk 1.6
Hi, i've developed a conectivity app. The ssh connection run successfully in sdk 1.5, but in the new version never connect with the servers. I use the jsch library to make ssh connection. My other problem is the ftp connections, this never run in android sdk, i try my code with SUN's JRE and run successfully. I use the common-net library to make it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to register for multiple sensors
Hi, A simple question: How do I register for multiple sensors? I just switched from registerListener(SensorListener listener, int sensors, int rate) , which is deprecated, to registerListener(SensorEventListener listener, Sensor sensor, int rate) . Previously, I could use " | " to indicate multiple sensors, but now " | " is undefined so how?? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: BaseAdapter.getView()'s convertView parameter
Eric Mill wrote: > AH, I GET IT NOW! > > I was having awful troubles with an ArrayAdapter recycling random > views to me, in a list which used different kinds of views. The > errors were maddening until I figured out what was going on, using > that part of your book. It's absolutely insane...until you understand > why they do it, and then it makes (some) sense. Phew. Yeah, it takes getting used to. If some of the rows are one-offs (e.g., there is only occurrence of the row at some more-or-less fixed position), adapters like my SackOfViewsAdapter and MergeAdapter may help simplify things: http://github.com/commonsguy -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] "The project cannot be built until build path errors are resolved"
Hi there, i'm having "The project cannot be built until build path errors are resolved" after each Project->clean in eclipse I have two projects with one referencing another. The error appears in the project referencing the another one. When the error appears I go to the 'configure build path' and then remove and re-add the referenced project and then magically the build is done fine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] listview header
Hey, What is the easiest way to add headers to a listview (and my list has multiple adapters (sections) so I need to show multiple headers for my list! Thank you, Wouter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
Wouter wrote: > What is the easiest way to add headers to a listview (and my list has > multiple adapters (sections) so I need to show multiple headers for my > list! I have a MergeAdapter here that can serve that role: http://github.com/commonsguy/cwac-merge I have a SectionedAdapter here that can serve that role, but it is GPLv3 rather than Apache License 2.0: http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/ The reason that is GPLv3 is because it is derived from Jeff Sharkey's original sectioned list code: http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
On Sat, Oct 10, 2009 at 8:42 PM, Mark Murphy wrote: > > Wouter wrote: > > What is the easiest way to add headers to a listview (and my list has > > multiple adapters (sections) so I need to show multiple headers for my > > list! > > I have a MergeAdapter here that can serve that role: > > http://github.com/commonsguy/cwac-merge > > I have a SectionedAdapter here that can serve that role, but it is GPLv3 > rather than Apache License 2.0: > > http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/ > > The reason that is GPLv3 is because it is derived from Jeff Sharkey's > original sectioned list code: > > > http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > Need Android talent? Ask on HADO! http://wiki.andmob.org/hado > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
Hey Mark, Yes I am using the SeperatedListAdapter from Jeff Sharkey, but I will take a look at your SectionedAdapter. Can I use it in my project? Wouter On Oct 10, 2:42 pm, Mark Murphy wrote: > Wouter wrote: > > What is the easiest way to add headers to a listview (and my list has > > multiple adapters (sections) so I need to show multiple headers for my > > list! > > I have a MergeAdapter here that can serve that role: > > http://github.com/commonsguy/cwac-merge > > I have a SectionedAdapter here that can serve that role, but it is GPLv3 > rather than Apache License 2.0: > > http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Secti... > > The reason that is GPLv3 is because it is derived from Jeff Sharkey's > original sectioned list code: > > http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-... > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Publishing both free and paid versions of app on Android Market
Thanks a lot for your clarification on this. On Oct 9, 6:19 pm, String wrote: > On Oct 9, 11:16 am, abarinoff wrote: > > > Thanks for pointing to those topic - it's quite interesting. But > > unfortunately solution of Justin Anderson doesn't help me much as I > > don't need any additional > > key application. What I need is topublishbothfree andpaidversions > > of application on Android Market and ideally user would be able to > > first download free > > version and then update topaidversion later. > > I think the point is that there's no good way to do this in the > current Market. If you insist on having free andpaidversions, > they're separate apps, and there's no way to "upgrade" from one to the > other. Correspondingly, there's nothing to stop a user havingboth > installed on their phone at once. > > The approach of using a separate key/license "app" is an alternate > solution to the problem. It's still not perfect, but it avoids the > double-installation problem, as well as any trickery to keep a single > code base. It's not the solution you ideally want, but it does > accomplish an equivalent result, and it works. IMO, it's cleaner - > it's the approach I use for one of my own apps. > > String --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
I had uses the MergeAdapter with this code: public void retrieveVideotheek() { try { HashMap response = (HashMap) client.call("film.retrieveTv", sessionKey); Iterator it = response.entrySet().iterator(); while (it.hasNext()) { cinema = new ArrayList(); Map.Entry pairs = (Map.Entry)it.next(); Object[] cinemaFilms = (Object[])pairs.getValue(); FilmDetail cinemaMovie = new FilmDetail(); for (int i=0; ihttp://snapplr.com/stkn What is the problem? Wouter On Oct 10, 2:54 pm, Wouter wrote: > Hey Mark, > > Yes I am using the SeperatedListAdapter from Jeff Sharkey, but I will > take a look at your SectionedAdapter. > Can I use it in my project? > > Wouter > > On Oct 10, 2:42 pm, Mark Murphy wrote: > > > Wouter wrote: > > > What is the easiest way to add headers to a listview (and my list has > > > multiple adapters (sections) so I need to show multiple headers for my > > > list! > > > I have a MergeAdapter here that can serve that role: > > >http://github.com/commonsguy/cwac-merge > > > I have a SectionedAdapter here that can serve that role, but it is GPLv3 > > rather than Apache License 2.0: > > >http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Secti... > > > The reason that is GPLv3 is because it is derived from Jeff Sharkey's > > original sectioned list code: > > >http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-... > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Sometimes the running emulator is not found from within Eclipse?!
Hi, when launching my app from within Eclipse, sometimes the running emulator is found and displayed in the launch dialog, sometimes it isn't?! Killing adb, the emulator and Eclipse usually helps ... until it happens again. Any idea why this is? I see this behavior since the launch of Android. I am running on Mac OS X. And it happened on Leopard as well as Snow Leopard. Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator is very slow and CPU consuming
Hello all, few weeks ago I encountered a problem. My Android SDK 1.5 emulator became very slow and CPU consuming. This happened earlier, but was irregular just removing AVDs usually helped. Few weeks ago I installed Android SDK 1.6, tried to move my dev environment there and noticed that emulator runs very slowly. I rolled back to 1.5 and noticed that the same problem is there. What's going on: - emulator startup is pretty slow; - sometimes emulator hangs on startup; - sometimes after startup is complete I see Force close/Wait dialog for some Android applications/services (Alarm clock, messaging) - applications inside the emulator run MUCH slower than they ran before, I see delays in response even in launcher, when I just switching between icons with arrow keys (at this time CPU usage according to the task manager is from 35 to 50%, i.e. one core is completely busy). - now, when I'm typing this message, emulator (clean, newly created AVD, I haven't installed nothing there, just out of the box) occupied 50% of my CPU (and 140MB of RAM). Hardware: Intel Core2Duo T7500 (2.2GHz) + 2GB RAM. OS: Vista I don't have any problems with 1.6 on Linux (Kubuntu 7.10), emulator starts quickly, responds in a flash, and seldom consumes more than 20% of CPU time (usually in case my application is working with DB). Any ideas? Thank you 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: listview header
Wouter wrote: > Yes I am using the SeperatedListAdapter from Jeff Sharkey, but I will > take a look at your SectionedAdapter. > Can I use it in my project? Sure! As I noted, SectionedAdapter is GPLv3, because it's derived from Jeff's code, which itself is GPLv3. If that license is incompatible with your goals, you can achieve the same effect with MergeAdapter, which is Apache License 2.0 (same as Android proper). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
Wouter wrote: > I had uses the MergeAdapter with this code: > > public void retrieveVideotheek() > { > try { > HashMap response = (HashMap Object>) > client.call("film.retrieveTv", sessionKey); > > Iterator it = response.entrySet().iterator(); > > while (it.hasNext()) { > cinema = new ArrayList(); > Map.Entry pairs = (Map.Entry)it.next(); > Object[] cinemaFilms = (Object[])pairs.getValue(); > FilmDetail cinemaMovie = new FilmDetail(); > > for (int i=0; i { > cinemaMovie = new FilmDetail(); > Map m = (Map) cinemaFilms[i]; > cinemaMovie.setTitle(m.get("title").toString()); >. > cinema.add(cinemaMovie); > } > > String datum = pairs.getKey().toString(); > long unixTime = Long.parseLong(datum); > long timeStamp = unixTime * 1000; > java.util.Date date = new Date(timeStamp); > SimpleDateFormat formatter = new > SimpleDateFormat("EE, > HH:mm 'uur'"); > String parsed = formatter.format(date); > > System.out.println("DATUM: " + parsed); > > LayoutInflater inflater = (LayoutInflater) > this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); > View filmLayout = inflater.inflate(R.layout.list_header, > null); > TextView headerTxt = (TextView)filmLayout.findViewById > (R.id.list_header_title); > headerTxt.setText(parsed); > > mergeAdapter.addView(headerTxt); > mergeAdapter.addAdapter(new cinemaAdapter(this, > R.layout.cinema_row, cinema)); > > //adapter.addSection(parsed, new cinemaAdapter(this, > R.layout.cinema_row, cinema)); > > } > > and this is the response: > > {1255207800=[Ljava.lang.Object;@43780378, 1255199100= > [Ljava.lang.Object;@43824bb8, 1255204800=[Ljava.lang.Object;@4381fd38, > 1255212600=[Ljava.lang.Object;@43822ff0, 1255169700= > [Ljava.lang.Object;@438289d8, 1255194000=[Ljava.lang.Object;@43796e08, > 1255189800=[Ljava.lang.Object;@43819d98, 1255197600= > [Ljava.lang.Object;@43824b18, 1255183500=[Ljava.lang.Object;@438147b8, > 1255181400=[Ljava.lang.Object;@43859b58, 1255206000= > [Ljava.lang.Object;@438189e0, 1255207500=[Ljava.lang.Object;@43790030, > 1255212000=[Ljava.lang.Object;@43788908, 1255216500= > [Ljava.lang.Object;@43823570} > > So for every key i make a new header with the corresponding Movies > under this header. > > When the listActivity loads it shows it very well but when i scroll > down and up it shows me this list like this: > > http://snapplr.com/stkn > > What is the problem? Off the top of my head, I have no idea. > mergeAdapter.addView(headerTxt); > mergeAdapter.addAdapter(new cinemaAdapter(this, > R.layout.cinema_row, cinema)); That much seems correct. The rest is your business logic which I only sorta follow. I have not tested MergeAdapter on Android 1.6 (part of my chores for this weekend), so there is a chance it needs updating. Try the demo activity that ships with MergeAdapter and see if it behaves properly. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 register for multiple sensors
With one sensor, we can register only one sensor, so for multiple register, multiple sensor |Manager is required. On Oct 10, 4:42 pm, DD wrote: > Hi, A simple question: How do I register for multiple sensors? I just > switched from > registerListener(SensorListener listener, int sensors, int rate) , > which is deprecated, to > registerListener(SensorEventListener listener, Sensor sensor, int > rate) . Previously, I could use " | " to indicate multiple sensors, > but now " | " is undefined so how?? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Sometimes the running emulator is not found from within Eclipse?!
+1 i have also ecountered this umpteen times on Windows XP. Sometimes it does not take recognise the internet connectivity.Only a restart helps On Sat, Oct 10, 2009 at 7:01 PM, Mariano Kamp wrote: > Hi, > > when launching my app from within Eclipse, sometimes the running emulator > is found and displayed in the launch dialog, sometimes it isn't?! Killing > adb, the emulator and Eclipse usually helps ... until it happens again. > > Any idea why this is? I see this behavior since the launch of Android. > > I am running on Mac OS X. And it happened on Leopard as well as Snow > Leopard. > > Cheers, > Mariano > > > > -- Thanks and Regards Gurudutt P.S. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] LinearLayout not filling all screen
hi guys, I'm trying to create a simple view of a header image, few buttons, then footer image. I'm using a LinearLayout inside a ScrollView. Even though i'm using the android:layout_gravity="bottom" for the footer image, it's being placed about 1 cm above the bottom margin. i'm using the following xml config http://schemas.android.com/apk/res/android"; android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="none" android:background="#"> http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#" > Thank you Simon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ScrollView occupies entire screen height?
Hi, I'm having trouble with this layout - I need a ScrollView, then a LinearLayout with a button below that: the scrollview pushes the linear layout under it off the screen. The only way I can get this to work is if I explicitly set the scrollview height in pixels to be less than the total height of the screen, but hardcoding a height isn't going to work on different devices. How can I do this? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: LinearLayout not filling all screen
Simon wrote: > I'm trying to create a simple view of a header image, few buttons, > then footer image. I'm using a LinearLayout inside a ScrollView. > > Even though i'm using the android:layout_gravity="bottom" for the > footer image, it's being placed about 1 cm above the bottom margin. > > i'm using the following xml config > > > http://schemas.android.com/apk/res/android"; > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:scrollbars="none" > android:background="#"> > > http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#" > > > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:background="#" > android:src="@drawable/faa_header" > android:layout_gravity="top"/> > >android:text="@string/button_tutorial" > android:layout_height="wrap_content" > android:layout_width="fill_parent"/> > >android:text="@string/buttons_emergency_now" > android:layout_height="wrap_content" > android:layout_width="fill_parent"/> > >android:text="@string/button_emergency_hints" > android:layout_height="wrap_content" > android:layout_weight="1" > android:layout_width="fill_parent"/> > android:layout_gravity="bottom" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#" > android:src="@drawable/footer"/> > > Try changing the LinearLayout from android:layout_height="fill_parent" (which I think may be meaningless when wrapped in a ScrollView) to android:layout_height="wrap_content". Or, switch from LinearLayout to RelativeLayout and anchor the ImageView to the bottom via android:layout_alignParentBottom="true". -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ScrollView occupies entire screen height?
Mark Wyszomierski wrote: > I'm having trouble with this layout - I need a ScrollView, then a > LinearLayout with a button below that: > > > > > > > I am assuming the whole thing is being wrapped in a LinearLayout for my comments below. > the scrollview pushes the linear layout under it off the screen. That's because you told it to via android:layout_height="fill_parent". > The > only way I can get this to work is if I explicitly set the scrollview > height in pixels to be less than the total height of the screen, but > hardcoding a height isn't going to work on different devices. How can > I do this? Set the ScrollView's android:layout_height="0px" and its android:layout_weight="1". Android will allocate 0px initially to the ScrollView, then however many pixels the LinearLayout needs. It then divides the extra pixels between those widgets with weights; if the only weight is on the ScrollView, it will "absorb" all those pixels. Or, use a RelativeLayout to wrap the whole thing, anchoring the LinearLayout to the bottom via android:layout_alignParentBottom="true" and anchoring the ScrollView to the top (android:layout_alignParentTop="true") and to the top of the LinearLayout (android:layout_above="@id/whatever"). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use a buildin drawable resource?
@android:drawable/ic_input_add On Oct 10, 6:50 am, Victor Lin wrote: > I need to use some buildin drawable I found > inhttp://developer.android.com/reference/android/R.drawable.html > > I set drawable @drawable/ic_input_add to a button in my layout xml > file. The add icon appears on the button of layout editor. But there > is a error of that xml file said that > > Description Resource Path Location Type > ERROR Error: No resource found that matches the given name (at > 'drawableLeft' with value '@drawable/ic_input_add'). spend_list.xml / > AccountBook/res/layout line 5 Android AAPT Problem > > My question is, how to use a buildin drawable? > > Thanks. > Victor Lin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: onSensorChanged: synchronized (this)?
Thanks. Richard ! On Oct 10, 6:26 pm, RichardC wrote: > I wish could edit our messages ... > > I should have said something like: > > .. will block multilpe simultaneous threads changing > the data ... > > -- > RichardC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ScrollView occupies entire screen height?
Mark - works perfectly, thanks so much. On Oct 10, 10:20 am, Mark Murphy wrote: > Mark Wyszomierski wrote: > > I'm having trouble with this layout - I need a ScrollView, then a > > LinearLayout with a button below that: > > > > > > > > > > > > > > > I am assuming the whole thing is being wrapped in a LinearLayout for my > comments below. > > > the scrollview pushes the linear layout under it off the screen. > > That's because you told it to via android:layout_height="fill_parent". > > > The > > only way I can get this to work is if I explicitly set the scrollview > > height in pixels to be less than the total height of the screen, but > > hardcoding a height isn't going to work on different devices. How can > > I do this? > > Set the ScrollView's android:layout_height="0px" and its > android:layout_weight="1". Android will allocate 0px initially to the > ScrollView, then however many pixels the LinearLayout needs. It then > divides the extra pixels between those widgets with weights; if the only > weight is on the ScrollView, it will "absorb" all those pixels. > > Or, use a RelativeLayout to wrap the whole thing, anchoring the > LinearLayout to the bottom via android:layout_alignParentBottom="true" > and anchoring the ScrollView to the top > (android:layout_alignParentTop="true") and to the top of the > LinearLayout (android:layout_above="@id/whatever"). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview header
There is no problem with the MergeAdapter, I had the same issue in 1.5. I have tried everything now but nothing works for me :s On 10 okt, 15:58, Mark Murphy wrote: > Wouter wrote: > > I had uses the MergeAdapter with this code: > > > public void retrieveVideotheek() > > { > > try { > > HashMap response = (HashMap > Object>) > > client.call("film.retrieveTv", sessionKey); > > > Iterator it = response.entrySet().iterator(); > > > while (it.hasNext()) { > > cinema = new ArrayList(); > > Map.Entry pairs = (Map.Entry)it.next(); > > Object[] cinemaFilms = (Object[])pairs.getValue(); > > FilmDetail cinemaMovie = new FilmDetail(); > > > for (int i=0; i > { > > cinemaMovie = new FilmDetail(); > > Map m = (Map) cinemaFilms[i]; > > cinemaMovie.setTitle(m.get("title").toString()); > > . > > cinema.add(cinemaMovie); > > } > > > String datum = pairs.getKey().toString(); > > long unixTime = Long.parseLong(datum); > > long timeStamp = unixTime * 1000; > > java.util.Date date = new Date(timeStamp); > > SimpleDateFormat formatter = new > > SimpleDateFormat("EE, > > HH:mm 'uur'"); > > String parsed = formatter.format(date); > > > System.out.println("DATUM: " + parsed); > > > LayoutInflater inflater = (LayoutInflater) > > this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); > > View filmLayout = inflater.inflate(R.layout.list_header, > > null); > > TextView headerTxt = (TextView)filmLayout.findViewById > > (R.id.list_header_title); > > headerTxt.setText(parsed); > > > mergeAdapter.addView(headerTxt); > > mergeAdapter.addAdapter(new cinemaAdapter(this, > > R.layout.cinema_row, cinema)); > > > //adapter.addSection(parsed, new cinemaAdapter(this, > > R.layout.cinema_row, cinema)); > > > } > > > and this is the response: > > > {1255207800=[Ljava.lang.Object;@43780378, 1255199100= > > [Ljava.lang.Object;@43824bb8, 1255204800=[Ljava.lang.Object;@4381fd38, > > 1255212600=[Ljava.lang.Object;@43822ff0, 1255169700= > > [Ljava.lang.Object;@438289d8, 1255194000=[Ljava.lang.Object;@43796e08, > > 1255189800=[Ljava.lang.Object;@43819d98, 1255197600= > > [Ljava.lang.Object;@43824b18, 1255183500=[Ljava.lang.Object;@438147b8, > > 1255181400=[Ljava.lang.Object;@43859b58, 1255206000= > > [Ljava.lang.Object;@438189e0, 1255207500=[Ljava.lang.Object;@43790030, > > 1255212000=[Ljava.lang.Object;@43788908, 1255216500= > > [Ljava.lang.Object;@43823570} > > > So for every key i make a new header with the corresponding Movies > > under this header. > > > When the listActivity loads it shows it very well but when i scroll > > down and up it shows me this list like this: > > >http://snapplr.com/stkn > > > What is the problem? > > Off the top of my head, I have no idea. > > > mergeAdapter.addView(headerTxt); > > mergeAdapter.addAdapter(new cinemaAdapter(this, > > R.layout.cinema_row, cinema)); > > That much seems correct. The rest is your business logic which I only > sorta follow. > > I have not tested MergeAdapter on Android 1.6 (part of my chores for > this weekend), so there is a chance it needs updating. > > Try the demo activity that ships with MergeAdapter and see if it behaves > properly. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 drawable resources
Jerome, If you look up ID #0x7f02 in your R.java, what do you get? I'm finding the same issue with one of my apps now that I have upgraded to 1.6---it worked fine on 1.5---the error is: Caused by: android.content.res.Resources$NotFoundException: File res/drawable/t.png from drawable resource ID #0x7f020007 But my R.java says: public static final class drawable { ... public static final int menu_how_to_videos=0x7f020007; ... public static final int t=0x7f02000e; } Somehow the mapping from IDs to files has become broken. Not sure how this can happen, (I've deleted R.java and had it rebuilt with the same mismatch). Could be a bug, but I did also change some images so perhaps there is another problem. Will post if I can sort it out. Paul. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 drawable resources
Found the problem. The runtime is wrongly reporting which file is missing (and R.java has been wrongly generated). I had one file misnamed (the file name did not match the @drawable declaration) but it wasn't the reported t.png which was wrong. Suggest checking all your drawables and see if you have one wrongly named. For me, I have res/drawable, res/drawable-land and res/ drawable-port. I wonder if the R.java generator is becoming confused when a file is missing from one of those directories? Paul. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 drawable resources
PaulT wrote: > I wonder if the R.java generator is becoming confused > when a file is missing from one of those directories? I doubt it -- that's part of the resource set system. With respect to R.java, I run into problems frequently when developing with Ant (not Eclipse) where R.java gets mis-generated or something when I add a new resource. It is as if R.java is generated with different numbers for previous resources, yet something (other compiled Java classes?) still remember the old values, so I get random resource substitution, resulting in screwed up images, ClassCastExceptions, and the like. I have been adding an "ant clean" target to my build.xml files that blows away the contents of gen/ and bin/, so I can readily clean and rebuild. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to register for multiple sensors
Why not just call the new method multiple times, once for each sensor you want to listen to, keeping the other arguments the same? On Oct 10, 7:42 am, DD wrote: > Hi, A simple question: How do I register for multiple sensors? I just > switched from > registerListener(SensorListener listener, int sensors, int rate) , > which is deprecated, to > registerListener(SensorEventListener listener, Sensor sensor, int > rate) . Previously, I could use " | " to indicate multiple sensors, > but now " | " is undefined so how?? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] First QVGA Android Phone — HT C Tattoo™ — on sale October 2009. Is your application ready?
HTC Corporation is set to launch the HTC Tattoo™ — the first Android phone with QVGA resolution — this month with major European and Asian operators. The QVGA screen has helped make the HTC Tattoo a very affordable offering, while it still maintains HTC Sense and features such as a 3 Megapixel camera, WiFi, GPS and 4-way D-pad navigation to ensure compatibility with your applications and provide an excellent user experience. Because it was designed as an affordable, customizable phone, we expect it will lead many new users to the Android platform and create additional demand for Android Market applications. HTC Tattoo is powered by Android 1.6, also referred to as Donut, in order to support the QVGA resolution. Due to the new Android Market's filtering mechanism, QVGA devices will only see applications which have been recompiled with Donut. We strongly recommend that you recompile your applications with Donut to ensure that it is available to Tattoo and other Donut devices that take advantage of new resolutions on the market. To help you reach your total potential customer base on Android Market, we would like to share our experiences about the porting process. We will be posting FAQs and porting suggestions on our website so that you can leverage what we have learned and get your QVGA compatible applications published quickly and effectively. Furthermore, if you encounter problems not mentioned in our FAQ section, feel free to email us at androidsupp...@htc.com. Our engineering support team will try our best to resolve any porting issues. For HTC – Tattoo QVGA Technical support, visit http://developer.htc.com/ For more information on HTC Tattoo, visit http://www.htc.com/www/product/tattoo/overview.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How native Gallery is reading bigger images!
Hi, I am a android developer, I stuck into a problem, how to read really big images with Android API, I am wondering how native Gallery ( Camera application ) is reading bigger images so fast. can any Android Engineer here direct me to the piece of code that android engineer used to draw bigger images. Thank You, Regards, Abdul Mateen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: "The project cannot be built until build path errors are resolved"
I've had this issue before, and for me at least, it normally is due to eclipse messing up and building the projects in the wrong order (wrong considering dependencies). Give this a try: Do a project --> Clean, but only clean one project, not sure which usually works for me, I think its the one with a dependency. If that doesn't work, try build-->clean with just the other. :) - Dan 2009/10/10 Cyryl Płotnicki-Chudyk > > Hi there, i'm having "The project cannot be built until build path > errors are resolved" after each Project->clean in eclipse > > I have two projects with one referencing another. The error appears in > the project referencing the another one. > When the error appears I go to the 'configure build path' and then > remove and re-add the referenced project and then magically the build > is done fine. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Identifying phone hardware
With all the new Android devices around the corner -- how do we identify what hardware the app is running on? Specifically for game development, I want to find out what input devices might be available (keyboard, trackball, dpad, etc), and possibly even how things are layed out -- dpad on the left or right, only accessible w/ the keyboard open, etc. So does the API already provide any way to do that? Identifying the phone model would be a start, but I'd rather not have to maintain a db of phone models and their hardware features. Thanks, Jeremy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Identifying phone hardware
I've used this to get if the device has a physical keyboard (may or may not be the correct method with 1.6, haven't looked into it), but should put you in the right direction: Configuration conf = context.getResources().getConfiguration(); boolean hasPhysical = (conf.keyboard == Configuration.KEYBOARD_QWERTY); On Sat, Oct 10, 2009 at 1:33 PM, Jeremy Slade wrote: > > With all the new Android devices around the corner -- how do we > identify what hardware the app is running on? Specifically for game > development, I want to find out what input devices might be available > (keyboard, trackball, dpad, etc), and possibly even how things are > layed out -- dpad on the left or right, only accessible w/ the > keyboard open, etc. > > So does the API already provide any way to do that? Identifying the > phone model would be a start, but I'd rather not have to maintain a db > of phone models and their hardware features. > > > Thanks, > Jeremy > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: First QVGA Android Phone — HTC Tattoo™ — on sale October 2009. Is your applicat ion ready?
First off, thank you for approaching the dev community (I assume to speak for the rest here...) Question (cc to androidsupp...@htc.com, for reference: this is a response to your post in the Android Developers group): After devs exhaust the tools and resources that Donut offers, and access to a physical device is still needed to appropriately test the apps for the different screen sizes (and potentially other behavioral changes outside of that aspect) - does HTC offer a path to such devices outside of having to purchase the devices outright? Example: Augmented Reality apps rely on sensor inputs that DDMS does not seem to support, at least at this point (Outside of that, it's a pain to work with DDMS/emulators to begin with). At the current price point of the average app, it takes a considerable amount of executed sales to recover that potential cost, to a degree that the acquisition of the various devices to perpetuate the app beyond the current set of devices cannot be justified. (Assuming the dev is unwilling to go into the hole on an ongoing basis). On Oct 10, 8:46 am, "htcand...@gmail.com" wrote: > HTC Corporation is set to launch the HTC Tattoo™ — the first Android > phone with QVGA resolution — this month with major European and Asian > operators. The QVGA screen has helped make the HTC Tattoo a very > affordable offering, while it still maintains HTC Sense and features > such as a 3 Megapixel camera, WiFi, GPS and 4-way D-pad navigation to > ensure compatibility with your applications and provide an excellent > user experience. Because it was designed as an affordable, > customizable phone, we expect it will lead many new users to the > Android platform and create additional demand for Android Market > applications. > > HTC Tattoo is powered by Android 1.6, also referred to as Donut, in > order to support the QVGA resolution. Due to the new Android Market's > filtering mechanism, QVGA devices will only see applications which > have been recompiled with Donut. We strongly recommend that you > recompile your applications with Donut to ensure that it is available > to Tattoo and other Donut devices that take advantage of new > resolutions on the market. > > To help you reach your total potential customer base on Android > Market, we would like to share our experiences about the porting > process. We will be posting FAQs and porting suggestions on our > website so that you can leverage what we have learned and get your > QVGA compatible applications published quickly and effectively. > Furthermore, if you encounter problems not mentioned in our FAQ > section, feel free to email us at androidsupp...@htc.com. Our > engineering support team will try our best to resolve any porting > issues. > > For HTC – Tattoo QVGA Technical support, visithttp://developer.htc.com/ > For more information on HTC Tattoo, > visithttp://www.htc.com/www/product/tattoo/overview.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Identifying phone hardware
Jeremy Slade wrote: > With all the new Android devices around the corner -- how do we > identify what hardware the app is running on? Specifically for game > development, I want to find out what input devices might be available > (keyboard, trackball, dpad, etc), and possibly even how things are > layed out -- dpad on the left or right, only accessible w/ the > keyboard open, etc. > > So does the API already provide any way to do that? Identifying the > phone model would be a start, but I'd rather not have to maintain a db > of phone models and their hardware features. If there are hardware features you have to have, there are elements you can put in the manifest to declare what you need: http://developer.android.com/guide/topics/manifest/supports-screens-element.html http://developer.android.com/guide/topics/manifest/uses-configuration-element.html http://developer.android.com/guide/topics/manifest/uses-feature-element.html If there are hardware features you can live without but want to use if they are available...I suspect that will be on a feature-by-feature basis. If all you want to do is change up layouts and such for keyboards and the like, you can use resource sets to help with that: http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources In terms of identifying the phone model, android.os.Build is what you'll want -- BRAND, DEVICE, MODEL, and such should give you what you need. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is HttpGet.abort() thread-safe?
Hi, I'm using the following method to open a url and download: public class MyWebRequest { public HttpGet httpget; public void get(String url) { httpget = new HttpGet(url); DefaultHttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(httpget); InputStream is = response.getEntity().getContent(); StringBuilder sb = new StringBuilder(500); int c = -1; while ((c = is.read()) != -1) { sb.append((char)c); } return sb.toString(); } } instances of this class are created and run in a background thread. If I need to abort the operation, can I simply do this from another thread safely: MyRequestObject.httpget.abort(); is the abort() method thread-safe? If another thread calls abort() before any work is actually done, that's still ok right? The request will just immediately fail? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to find out how packaged the ROM?
Thanks Richard. No, this information I already use. I got an answer from stackoverflow though: http://stackoverflow.com/questions/1547236/how-to-find-out-who-the-rom-provider-is Unfortunately it is using a command line utility that may break in the future, but this is better than nothing. On Sat, Oct 10, 2009 at 11:31 AM, RichardC wrote: > > Maybe > http://developer.android.com/reference/android/os/Build.html > > Not tried it > > -- > RichardC > > On Oct 9, 11:05 pm, Mariano Kamp wrote: > > Hi, > > is there any way I can find out programmatically who packaged the ROM > > (Google, HTC, cyanogen mod)? > > > > I would like to include that information in my bug reporting facility. > > > > Cheers, > > Mariano > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Sometimes the running emulator is not found from within Eclipse?!
Regarding the internet connectivity thing: same here. On Sat, Oct 10, 2009 at 4:10 PM, Guru wrote: > +1 i have also ecountered this umpteen times on Windows XP. > > Sometimes it does not take recognise the internet connectivity.Only a > restart helps > > > On Sat, Oct 10, 2009 at 7:01 PM, Mariano Kamp wrote: > >> Hi, >> >> when launching my app from within Eclipse, sometimes the running >> emulator is found and displayed in the launch dialog, sometimes it isn't?! >> Killing adb, the emulator and Eclipse usually helps ... until it happens >> again. >> >> Any idea why this is? I see this behavior since the launch of Android. >> >> I am running on Mac OS X. And it happened on Leopard as well as Snow >> Leopard. >> >> Cheers, >> Mariano >> >> >> > > > -- > Thanks and Regards > Gurudutt P.S. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Identifying phone hardware
Slightly better answer than mine :) On Sat, Oct 10, 2009 at 2:27 PM, Mark Murphy wrote: > > Jeremy Slade wrote: > > With all the new Android devices around the corner -- how do we > > identify what hardware the app is running on? Specifically for game > > development, I want to find out what input devices might be available > > (keyboard, trackball, dpad, etc), and possibly even how things are > > layed out -- dpad on the left or right, only accessible w/ the > > keyboard open, etc. > > > > So does the API already provide any way to do that? Identifying the > > phone model would be a start, but I'd rather not have to maintain a db > > of phone models and their hardware features. > > If there are hardware features you have to have, there are elements you > can put in the manifest to declare what you need: > > > http://developer.android.com/guide/topics/manifest/supports-screens-element.html > > http://developer.android.com/guide/topics/manifest/uses-configuration-element.html > > http://developer.android.com/guide/topics/manifest/uses-feature-element.html > > If there are hardware features you can live without but want to use if > they are available...I suspect that will be on a feature-by-feature basis. > > If all you want to do is change up layouts and such for keyboards and > the like, you can use resource sets to help with that: > > > http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources > > In terms of identifying the phone model, android.os.Build is what you'll > want -- BRAND, DEVICE, MODEL, and such should give you what you need. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > Android Development Wiki: http://wiki.andmob.org > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Identifying phone hardware
Dan Sherman wrote: > Slightly better answer than mine :) Heh, actually, I was thinking the reverse -- I keep forgetting about Configuration. For things Configuration supports (e.g., keyboard), that's a much better solution than looking at public fields on Build. At some point, we may need to create a DeviceCapabilities class, though, that wraps Configuration and also reports back everything else developers will want: location of the pointer (portrait? landscape? both?), does it have a camera, etc. You can get answers for a lot of those things from the API, but they're scattered. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Need to place Childe view starting from left side
I want to place first image view in gallery view starting from left side of the screen, instead of centre. Right now, it always position of first tem always starts from centre. Any help on this would be highly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need to place Childe view starting from left side
Android_Learner wrote: > I want to place first image view in gallery view starting from left > side of the screen, instead of centre. Right now, it always position > of first tem always starts from centre. > Any help on this would be highly appreciated. Sorry, Gallery does not support that. The selected image is always centered. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Determining the real ROM installed on device
Hi. I'm having trouble programatically determining amount of ROM installed on device. I've tried proc/meminfo, but this file contains only ROM available to OS, not the physical amount of it. Can please someone help me with it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need to place Childe view starting from left side
Selected item can be at center , But I want first image item of gallery view should start from extreme left of the screen instead of center.e.g. when XML is inflated then first image item of gallery should be placed at center. Is it possible by any means? On Oct 11, 12:55 am, Mark Murphy wrote: > Android_Learner wrote: > > I want to place first image view in gallery view starting from left > > side of the screen, instead of centre. Right now, it always position > > of first tem always starts from centre. > > Any help on this would be highly appreciated. > > Sorry, Gallery does not support that. The selected image is always centered. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Looking for Android opportunities?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Should I use Canvas or SurfaceView for a chess game?
Hi, I am developing a chess game, what view should I use for the chessboard, Canvas or SurfaceView? I want to implement some animations like moving a piece, fading the chessboard or maybe rotating the chessboard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Does StreetView work in Android?
Now I tried the following snippet but it doesn't quite work: button3.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { String uriString = "google.streetview:cbll=44.640381,-63.575911&cbp=1,90,,0,1.0"; Uri uri = Uri.parse(uriString); startActivity(new Intent(Intent.ACTION_VIEW, uri)); } } Probably I'm assigning the parameters incorrectly. Any obvious mistake in above? I believe I have 2 commas after the yaw in above, although it is hard to see them. Now the lat/long I gave may be 50 meters from the nearest streetview camera icon. Is this OK? On Oct 9, 11:16 pm, JoaJP wrote: > Streetview's there, you have to call it as an Activity from within > your app. You can find the intents list of Google's apps here, as > published, > anyway:http://developer.android.com/guide/appendix/g-app-intents.html > > This means you can't put an overlay on top of it, so it might not get > you where you want in the first place. For Augmented Reality, you have > to capture a Camera preview; there's a sample app that comes with the > SDK that demonstrates that. There used to be a bug in it, though. I > didn't check whether that's been fixed with the release of 1.6. If you > dig some in this board, you can find the corrected code. > > On Oct 9, 5:41 pm, ian wrote: > > > Hi gang: > > > StreetView just released for Canada this week. I am interested in > > using it to augment one of my apps set in downtown Montreal. > > > Now the mapview method called something like setStreetView(true) does > > highlight the streets where streetview imagery is available, but that > > seems to be all it does. > > > I don't believe that phones run Flash which seems to be a necessity > > for using Streetview. Am I missing something? That is, is there any > > way I can zoom into a Streetview image in one of my location-based > > Android apps just by providing the lat/long? > > > If this isn't already available. I'm sure it is coming soon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Should I use Canvas or SurfaceView for a chess game?
SurfaceView can be either run with a Canvas front-end, or an OpenGL frontend (which I think was your question). For a chess game, you're most likely going to be just fine with Canvas. You won't really need OpenGL until you have 50-100 sprites on the screen moving quite quickly :) - Dan On Sat, Oct 10, 2009 at 5:54 PM, fhucho wrote: > > Hi, > I am developing a chess game, what view should I use for the > chessboard, Canvas or SurfaceView? I want to implement some animations > like moving a piece, fading the chessboard or maybe rotating the > chessboard. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Determining the real ROM installed on device
Huh? /proc/meminfo is RAM. Are you looking for ROM or RAM? For RAM, that is /proc/meminfo (and yes it is only the amount available to the system, and I don't believe there is any other way to find out about memory that is not access by the system). On Sat, Oct 10, 2009 at 12:56 PM, Paul Turchenko wrote: > > Hi. I'm having trouble programatically determining amount of ROM > installed on device. I've tried proc/meminfo, but this file contains > only ROM available to OS, not the physical amount of it. Can please > someone help me with it? > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Does StreetView work in Android?
Now I tried the following snippet but it doesn't quite work: button3.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { String uriString = "google.streetview:cbll=44.640381,-63.575911&cbp=1,90,,0,1.0"; Uri uri = Uri.parse(uriString); startActivity(new Intent(Intent.ACTION_VIEW, uri)); } } Probably I'm assigning the parameters incorrectly. Any obvious mistake in above? I believe I have 2 commas after the yaw in above, although it is hard to see them. Now the lat/long I gave may be 50 meters from the nearest streetview camera icon. Is this OK? On Oct 9, 11:16 pm, JoaJP wrote: > Streetview's there, you have to call it as an Activity from within > your app. You can find the intents list of Google's apps here, as > published, > anyway:http://developer.android.com/guide/appendix/g-app-intents.html > > This means you can't put an overlay on top of it, so it might not get > you where you want in the first place. For Augmented Reality, you have > to capture a Camera preview; there's a sample app that comes with the > SDK that demonstrates that. There used to be a bug in it, though. I > didn't check whether that's been fixed with the release of 1.6. If you > dig some in this board, you can find the corrected code. > > On Oct 9, 5:41 pm, ian wrote: > > > Hi gang: > > > StreetView just released for Canada this week. I am interested in > > using it to augment one of my apps set in downtown Montreal. > > > Now the mapview method called something like setStreetView(true) does > > highlight the streets where streetview imagery is available, but that > > seems to be all it does. > > > I don't believe that phones run Flash which seems to be a necessity > > for using Streetview. Am I missing something? That is, is there any > > way I can zoom into a Streetview image in one of my location-based > > Android apps just by providing the lat/long? > > > If this isn't already available. I'm sure it is coming soon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Identifying phone hardware
Thanks much for the tips. It does indeed seem a bit scattered. On Oct 10, 1:19 pm, Mark Murphy wrote: > Dan Sherman wrote: > > Slightly better answer than mine :) > > Heh, actually, I was thinking the reverse -- I keep forgetting about > Configuration. For things Configuration supports (e.g., keyboard), > that's a much better solution than looking at public fields on Build. > > At some point, we may need to create a DeviceCapabilities class, though, > that wraps Configuration and also reports back everything else > developers will want: location of the pointer (portrait? landscape? > both?), does it have a camera, etc. You can get answers for a lot of > those things from the API, but they're scattered. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Looking for Android opportunities?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Physics engines for Android
It looks like the Space Physic game is using the Box2D lib... Emmanuel http://androidblogger.blogspot.com/ http://www.alocaly.com On Oct 10, 8:24 am, murali raju wrote: > Hey thank u very much Andre its helped me a lot. thank u. > > > > On Fri, Oct 9, 2009 at 11:53 PM, André wrote: > > > I've heard that somebody ported C++ Box2d physics engine to NDK which > > sounds quite good in terms of performance. > > Maybe check the NDK group, too? > > >http://groups.google.com/group/android-ndk/browse_thread/thread/10f2e... > > > -- André > >http://android.rabold.org > > > On 9 Okt., 19:08, Dan Sherman wrote: > > > Which physics engine you use should have nothing to do with which drawing > > > style you want to use (OpenGL vs canvas). As far as I can guess, there > > > might not be much documentation for those, as they're probably direct > > > ports. In the sense that the original documentation should get you 95% > > of > > > the way there... > > > > On Fri, Oct 9, 2009 at 1:52 AM, mmkr wrote: > > > > > Hi, > > > > > I want to try any physics engine for 2D and 3D in Android. So far > > > > I have learnt that JBullet and JBox2d can be used, and JBox2d is a > > > > better one among them. But there in not much available documentation > > > > available and it even uses some concepts which are not supported by > > > > Android like Applets.Even some posts in various forums suggested that > > > > there are still no ideal physics engines available for Android. Are > > > > there any plans for implementing specific physics engines for Android? > > > > Can OpenGL be used for these ? > > > > > Help me out in deciding which physics engine is best suitable > > > > for Android. > > > > > 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: Looper/Handler issue
Thanks Dianne, for the reply. I fixed it by shifting the handler to the background thread, and including the looper quit() inside the handler. On Oct 10, 2:34 am, Dianne Hackborn wrote: > That is simply not how Looper works. You call Looper.loop() to have the > thread enter the message looper, and process messages until it is time for > the thread to exit. > Specific comments: > > The following code illustrates my problem: (pls note the lines > > > referred: 1,2,3,4&5) > > Question 1: After calling looper.loop in line3, line4 and 5 don't run. > > Why is this? I tried quit(), but it doesn't help. > > Where did you try quit()? A looper continues running its loop until you > tell the looper to quit. > > Also note that in the code you have included, your 'handler' is associated > with the main thread (since it was constructed from the main thread), not > the other thread you are creating. You haven't made any handlers to the > secondary thread, so have never sent a message to it, so it has just sat in > the loop and done nothing. > > Question 2: Instead of displaying 0,1,2,3,4 in one blocking call (at > > > line3), I'd like to have 5 different blocking calls for each. > > You can't. > > > Essentially (sorry, if i sound repetitive), I want to be able to use > > looper in such a way that each time, it ensures only one message gets > > handled. Is there a way to do this? > > No. > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there any method to get one view by name
Hi, Is there any method to get one view by name rather than it's ID? because we are composing a common lib, and it's not able for us to know the Resource ID at this time, So is there any method to get one view by name, not by findViewById? Thanks. Regards Larry/Xiangqian.liu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] java.lang.IllegalStateException: Content of adapter changed but ListView didn't
I'm getting an unhandled exception in my class that fills an arrayadapter from items in a database: 10-11 04:05:26.883: ERROR/AndroidRuntime(886): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. At the end of my OnCreate method I fire off a background thread: Thread thread = new Thread(null, doSearchDatabase, "Background"); thread.start(); I fill the array list in the run method of the thread, and use a handler to post a message at the end of the processing: hh.post(postdoSearchDatabase); In the run method of the handler, which I presume is a UIThread, I do: Collections.sort(myArrayList); aa.notifyDataSetChanged(); Here I do let the array adapter know things have changed. Does this exception always mean I'm doing something wrong with the array adapter in a background thread? I don't seem to be manipulating it at all in the background thread; only the array list it is connected to. Any ideas? the exception isn't thrown every time, and if I step slowly through in the debugger it is not thrown. Seems FAR worse running in Android 1.6. thanks, pawpaw17 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] OpenGL on 1.6
Been working with OpenGL a little more recently, and have been noticing pretty bad performance on my G1. Were there any major changes to OpenGL in 1.6 that would change the performance (or made my code incorrect?) on device? As a test, I grabbed the SpriteMethodTest out of Apps-For-Android, and gave it a spin. I had run it a few months ago and noticed pretty decent performance. With a low number of sprites (10-100), every method (Verts, Hardware VBO's, and DrawTex) had easily over 30fps, with drawTex beating out the others. I fired it up on my G1 (recently updated to 1.6), and all 3 methods are giving me performance of around 10-12fps with all methods of OpenGL at 10 sprites. Just for fun, installed the exact same APK on my girlfriends phone, which has yet to be updated to 1.6, and hers shows what I expected to start with, 30-60fps depending on method... So the question is, did anything change in terms of OpenGL, that would make the example code in SpriteMethodTest less than optimal? - Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Logcat on DDMS
Hello. Group Members. I have one question. For viewing log, I used DDMS provided with eclipse. I think the communication between logcat and emulator is done by tcp. therefore, using capture program(ex. wireshark..), I think I can capture the packet about log. I tried . but I could not see anything about android log. Is there anything to set config in wireshark? How can I see the packet about log throught wireshark? please give me a hand. Thank you. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?
Anyone getting a java illegalStateException when running your 1.5 built app on 1.6? Everything has worked fine with my code for months. Get message "the content of the adapter has chagned but Listview did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread." I'm sure my adapter mods are not in the UI thread. Has anyone else seen this? What else could cause this? 1.6 is either finding a problem that 1.5 didn't care about or there's a bug in 1.6. Thanks, pawpaw17 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL on 1.6
Seems OK on mine, ~59fps for "Use VBO Extension" with 10 sprites screenshot: http://imgur.com/N1kNt.png I'm using a T-Mobile G1 running the official OTA 1.6 firmware. I did wipe it recently, so that might be a difference. Not much installed that could be running in the background. Have you tried rebooting? I've read about Android bugs before that led to gradual performance degradation until reboot. Checking the top command in adb shell might be helpful too. On Oct 11, 12:29 am, Dan Sherman wrote: > Been working with OpenGL a little more recently, and have been noticing > pretty bad performance on my G1. > > Were there any major changes to OpenGL in 1.6 that would change the > performance (or made my code incorrect?) on device? > > As a test, I grabbed the SpriteMethodTest out of Apps-For-Android, and gave > it a spin. I had run it a few months ago and noticed pretty decent > performance. With a low number of sprites (10-100), every method (Verts, > Hardware VBO's, and DrawTex) had easily over 30fps, with drawTex beating out > the others. > > I fired it up on my G1 (recently updated to 1.6), and all 3 methods are > giving me performance of around 10-12fps with all methods of OpenGL at 10 > sprites. > > Just for fun, installed the exact same APK on my girlfriends phone, which > has yet to be updated to 1.6, and hers shows what I expected to start with, > 30-60fps depending on method... > > So the question is, did anything change in terms of OpenGL, that would make > the example code in SpriteMethodTest less than optimal? > > - Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?
It's not a bug, it's a message that was added to notify app developers of applications that are doing the wrong thing. > I'm sure my adapter mods are not in the UI thread. Which is exactly the problem. -- 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 -~--~~~~--~~--~--~---