Re: [android-developers] A scrollable widget
You cannot make scrollable widgets, HTC is not using the regular app widget framework. On Mon, Feb 1, 2010 at 11:59 PM, Kumar Bibek coomar@gmail.com wrote: Hello All, Is it possible to make a Scrollable widget ? I have seen HTC has some widgets which are scrollable, but I am guessing that HTC might have modified the source code to extend the widget framework. Can anyone please confirm? Thanks and Regards, Kumar Bibek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: A scrollable widget
Thanks Romain, Any update when we will be able to see this feature ? This looks cool by the way, and is really useful. Kumar Bibek On Feb 2, 1:01 pm, Romain Guy romain...@android.com wrote: You cannot make scrollable widgets, HTC is not using the regular app widget framework. On Mon, Feb 1, 2010 at 11:59 PM, Kumar Bibek coomar@gmail.com wrote: Hello All, Is it possible to make a Scrollable widget ? I have seen HTC has some widgets which are scrollable, but I am guessing that HTC might have modified the source code to extend the widget framework. Can anyone please confirm? Thanks and Regards, Kumar Bibek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Help about Alarm Clock
Hi I want to make an application in which i want to set the alarm, so that my application set the alarm directly... for example I am creating a reminder applicatioin in which i want to set the alarm on a specific time and specific date... please help me to tell me the class use in this case. thanks -- Ali Murtaza BCSF06M021 Research Assistant Data Virtulization Ware House PUCIT, Lahore, Pakistan ali.murt...@pucit.edu.pk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: A scrollable widget
This is not planned for now. On Tue, Feb 2, 2010 at 12:07 AM, Kumar Bibek coomar@gmail.com wrote: Thanks Romain, Any update when we will be able to see this feature ? This looks cool by the way, and is really useful. Kumar Bibek On Feb 2, 1:01 pm, Romain Guy romain...@android.com wrote: You cannot make scrollable widgets, HTC is not using the regular app widget framework. On Mon, Feb 1, 2010 at 11:59 PM, Kumar Bibek coomar@gmail.com wrote: Hello All, Is it possible to make a Scrollable widget ? I have seen HTC has some widgets which are scrollable, but I am guessing that HTC might have modified the source code to extend the widget framework. Can anyone please confirm? Thanks and Regards, Kumar Bibek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Voice to TExt
Hi i want to convert voice into text.. is there any API which will help me? -- Ali Murtaza BCSF06M021 Research Assistant Data Virtulization Ware House PUCIT, Lahore, Pakistan ali.murt...@pucit.edu.pk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Young French Dev need help
No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Market flood prevention
Based on your previous post about floods, I would strongly urge you to rework your app into a single app, remove ALL the 120+ apps you have on the market and republish a single app that makes use of server side data for the location issue you are facing. As several said in your other post, your design is fundamentally flawed and thus causing you this rather embarassing issue of trying to maintain all those apps that are basically identical with the exception of the location specific data each app has to contain. Also, something to think about.. I came across an app the other day that had one version for each language it supported. There were about 20 of them. The english version had a few downloads, the rest had none. You are basically asking your end users to sift through 120 or so apps of yours to find the one that best fits them. That is a horrible design/idea. I personally would give up if it wasn't the first few on the list. Think of your end users.. what you are putting them thru by telling them to basically go search for the specific version of your app they need for their area. Even if they can search on your app name and enter their area.. to have to specifically search with my location to find the right app.. if it even comes up..is ridiculous. Seriously, I am not sure how you have coded your app to access the location data.. but I bet a few days.. a week at most, you could rewrite that portion to download the data from a server, and load it in as needed. You would do your end users a big favor, yourself a huge favor avoiding the issue you now face, and the community/market a massive favor by not seeing your app yet again on the Just in list 120 times. I honestly am surprised your app has not been banned due to the floods. I mean no disrespect, like I said in your other post, you may be a very good developer and your app may be flawless.. but this one issue is plaguging you, your end users and the rest of the community all at once. Fix it.. do the right thing. You'll be a lot happier as will the rest of the end users and those complaining of the flooding for good reason. On Mon, Feb 1, 2010 at 11:23 PM, Bus Brothers busbroth...@gmail.com wrote: Hello We would like to be able to update our apps, but there are a large number of them and we are getting negative responses from other developers regarding market flooding. We would like to resolve this. Originally, we believed that updating the VersionCode WITHOUT updating the VersionName would resolve this and allow us to do a silent update that would not appear in the Just In section, but it seems we were wrong, as an app update just flooded the Just In section. Any ideas? We would like to get this resolved based on feedback from the community. I have a query in the Android Help as well. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] activity cannot be resolved
int mainBackGroundColor = activity .getResources.getColor (R.color.main_back_ground_color); when iam trying to access a color resource iam getting activity cannot be resolved error in eclipse. how can this be resolved. 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
Re: [android-developers] Re: Unable to get map overly to show
Oddly enough, I copied/pasted your code and I am getting a class not found issue.. for some reason I can't get the Launcher to start. Can you paste your layout xml and string resources as well? On Mon, Feb 1, 2010 at 8:32 PM, andrew android andygoldm...@gmail.comwrote: Any example of what I may be missing? Thanks! On Jan 31, 12:10 pm, Kevin Duffey andjar...@gmail.com wrote: Hmm.. I don't know.. I did not set the overlay position.. I just added it to my mapView and mine shows up. Try working with your location settings. I am not sure why the Location is needed tho. I use an ItemizedOverlay for a list of items I pull down from a server, which works fine. My map then responds to a click on an item, and puts another overlay above it with text. On Sun, Jan 31, 2010 at 9:44 AM, andrew android andygoldm...@gmail.com wrote: My map overlay is not showing up after several attempts Here is my Overlay class code: public class myOverlay extends Overlay{ private final int mRadius = 6; @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { super.draw(canvas, mapView, shadow); Projection projection = mapView.getProjection(); // if (shadow == false) { Double latitude = location.getLatitude()*1E6; Double longitude = location.getLongitude()*1E6; GeoPoint geoPoint; geoPoint = new GeoPoint(latitude.intValue(),longitude.intValue ()); Point point = new Point(); projection.toPixels(geoPoint, point); RectF oval = new RectF(point.x - mRadius, point.y - mRadius, point.x + mRadius, point.y + mRadius); // Setup the paint Paint paint = new Paint(); paint.setARGB(250, 255, 0, 0); paint.setAntiAlias(true); paint.setFakeBoldText(true); Paint backPaint = new Paint(); backPaint.setARGB(175, 50, 50, 50); backPaint.setAntiAlias(true); RectF backRect = new RectF(point.x + 2 + mRadius, point.y - 3*mRadius, point.x + 65, point.y + mRadius); // Draw the marker canvas.drawOval(oval, paint); canvas.drawRoundRect(backRect, 5, 5, backPaint); canvas.drawText(noteName, point.x + 2*mRadius, point.y, paint); // } // else { // } } @Override public boolean onTap(GeoPoint point, MapView mapView) { // Return true if screen tap is handled by this overlay return false; } Location location; public Location getLocation() { return location; } public void setLocation(Location location) { this.location = location; } String noteName; public String getNoteName(){ return noteName; } public void setNoteName(String n){ this.noteName = n; } } Here is the call to add the overlay: positionOverlay = new myOverlay(); Location loc = new Location(over); loc.setLatitude(lat); loc.setLongitude(lng); positionOverlay.setLocation(loc); positionOverlay.setNoteName(nm); mapView.getOverlays().add(positionOverlay); mapView.invalidate(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at
Re: [android-developers] Re: Young French Dev need help
Have you tried the SDK docs for the objects you are working with? Perhaps some code that you are using? On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com wrote: No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Suspicious TCP RST packets while device is sleeping.
Hey guys, trying to track down a rather elusive problem here... I've been playing around with long-standing TCP connections to a server. The client opens a TCP connection to the server, sets a timeout at a reasonably long period (30 minutes), and adds an AlarmManager task to ping the server every 15 (a ping is just a junk packet the server responds to with an application-level ack). Nothing fancy, and everything works correctly on the emulator. The client stays connected to the server for as long as I've left it alone (a few hours easily). However, as soon as it runs on device, I receive some interesting behavior when the device is sleeping (CPU completely off if I understand correctly). If I let the device connect, and go to sleep (can't be 100% certain it is asleep, but I wait a good few minutes). And have the server send an un-expected packet to the client, the client most definitely wakes up, processes the packet, and sends a response. The wakeup noticibly takes a few extra seconds, but this isn't an issue. The issue comes in if I let the device sleep for a more extended period of time (somewhere around 5 minutes). At this time, I see the server drop the connection as reset, and the client sit there sleeping. As soon as the device is woken up (by my intervention), and I try to do any network actions, it notices the connection isn't good anymore, and starts a reconnect (hard-coded to reconnect). I've been running tcpdump on both the client, and the server. The interaction is as follows: Server's point of view: - Client connects (a few packets back and forth, application level, etc) - 5ish minutes pass (device is sleeping) - Client sends a reset packet (connection is torn down, expected) From the client's point of view: - Connection startup (a few packets back and forth, application level, etc) - Device goes to sleep The client never sees the TCP reset packet. Once woken by something external (me, the AlarmManager task, etc), the client immediately sees a RST packet from the server, tears down the connection, and starts over. Anyone care to chime in with ideas as to what is happening? My only thoughts are that someone in between is killing the connection due to not seeing any data send between the two after a certain amount of time, however the time between the last packet, and the RST isn't a consistent period... This behavior is happening when running a G1 on Tmobile's 3g US network. It happens when the server code is running both remotely (machine in Texas), as well as when its running on local machine (Florida). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: About calling feature in android
look there is already dialing software in market.So Please tell me if dialing feature(API) is unavailable to developer how people out there developed such dialing software in android. On Feb 2, 1:20 pm, XC He schosnab...@gmail.com wrote: you might reference this Why it is impossible to intercept incoming calls on Android (http://blog.wangling.me/2009/08/why-it-is-impossible-to-intercept-inc... ) but I did not verify the correctness of the content. IMHO, you have to refer the call barring related feature. 2010/2/1 saru sarucs...@gmail.com: Look i need to develop a dialer software(in android-OS) where i need to catch different calling features.So far i get notices of incoming call, outgoing call and different call state. But what is needed to me are * my application can receive the call(Accept button in my application) *my application can reject the call(Cancel button in my application) before posting here probably i searched every where in web but failed.Please if u people out there have any idea how could i implement accept and reject button in my application please let me know. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Particular Tag Parsing
How to parse the tag by my order. Ex:- sample iphonenice/iphone Androidsuper/Android ipad excellent/ipad /sample In this XML file i need to get order as, android, iphone ipad. But i'm getting as iphone , android ipad. How to get like android, iphone ipad. On Tue, Feb 2, 2010 at 10:45 AM, Sasikumar.S sasikumar.it1...@gmail.comwrote: Hi Kevin, Which is more faster and easier to use?. I need to Parse a XML. That file contains more than 12000 lines. First i tried to use DOM but it is very slow. It is taking more than 10 minutes tom parse. Now i'm trying to use SAX. Which one is very fast whether SAX or XMLPull Parser ?.. On Tue, Feb 2, 2010 at 10:40 AM, Kevin Duffey andjar...@gmail.com wrote: Hari, as far as I know you'd usually parse the document into an object, do any updating of the object, then write it back out overwriting the previous version. SAX doesn't store the xml in memory, it streams it, like xmlpull does and you assemble an object tree from the xml as your needs require. You don't have to assmble an object tree that is identical to the xml as well. This is probably part of the reason DOM is so slow and requires as much as 8x the XML size in memory to store. Frankly, I'd go with xmlpull. It's vastly easier to work with and generally as fast if not faster than sax. On Mon, Feb 1, 2010 at 8:34 PM, Sasikumar.S sasikumar.it1...@gmail.comwrote: I don't know Hari. On Tue, Feb 2, 2010 at 10:03 AM, hari harish.cse...@gmail.com wrote: hi Sasikumar.S do you know how to update xml file using Sax parser. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- Thanks Regards Sasikumar.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: Young French Dev need help
yeah , i've read docs for many times , but i haven't found any thing helping me. that's why i'm writing here ;P On Feb 2, 9:58 am, Kevin Duffey andjar...@gmail.com wrote: Have you tried the SDK docs for the objects you are working with? Perhaps some code that you are using? On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com wrote: No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: About calling feature in android
sorry about I misunderstand your request 2010/2/2 saru sarucs...@gmail.com: look there is already dialing software in market.So Please tell me if dialing feature(API) is unavailable to developer how people out there developed such dialing software in android. On Feb 2, 1:20 pm, XC He schosnab...@gmail.com wrote: you might reference this Why it is impossible to intercept incoming calls on Android (http://blog.wangling.me/2009/08/why-it-is-impossible-to-intercept-inc... ) but I did not verify the correctness of the content. IMHO, you have to refer the call barring related feature. 2010/2/1 saru sarucs...@gmail.com: Look i need to develop a dialer software(in android-OS) where i need to catch different calling features.So far i get notices of incoming call, outgoing call and different call state. But what is needed to me are * my application can receive the call(Accept button in my application) *my application can reject the call(Cancel button in my application) before posting here probably i searched every where in web but failed.Please if u people out there have any idea how could i implement accept and reject button in my application please let me know. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Regarding Tv out in Android
Hi All, Is there any TV out feature in Android. Is anyone working on it ? Thanks and Regards, Dileep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: About calling feature in android
you can describe more detail and in which level you want to intercept Using Intent may solve your problem 2010/2/2 XC He schosnab...@gmail.com: sorry about I misunderstand your request 2010/2/2 saru sarucs...@gmail.com: look there is already dialing software in market.So Please tell me if dialing feature(API) is unavailable to developer how people out there developed such dialing software in android. On Feb 2, 1:20 pm, XC He schosnab...@gmail.com wrote: you might reference this Why it is impossible to intercept incoming calls on Android (http://blog.wangling.me/2009/08/why-it-is-impossible-to-intercept-inc... ) but I did not verify the correctness of the content. IMHO, you have to refer the call barring related feature. 2010/2/1 saru sarucs...@gmail.com: Look i need to develop a dialer software(in android-OS) where i need to catch different calling features.So far i get notices of incoming call, outgoing call and different call state. But what is needed to me are * my application can receive the call(Accept button in my application) *my application can reject the call(Cancel button in my application) before posting here probably i searched every where in web but failed.Please if u people out there have any idea how could i implement accept and reject button in my application please let me know. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 achieve ultra smooth OpenGL/ES animation
I also had to fight this problem for a racing game. As Robert suggested, average your delta times, it's the only way you can smooth things out. I use a window of 5 frames per second for which i sum up the delta times and divide by the number of frames. An example 15ms, 15ms, 33ms, 15ms, 15ms will give you an average delta time of 18.6ms for frame 6. The 33ms will also influence the delta time of the next 4 frames after it. To avoid that effect you could use weighted averaging: frame delta times that are newer receive a higher weight (just an example, haven't boughtered using it) On 2 Feb., 06:55, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: I am already doing the animation in a time-based fashion. However, when I scroll the texture at a constant speed across the screen, I can see stuttering when the frame rate changes between 60fps and 30fps. Apparently the human eye is very good at detecting this kind of anomaly. On Feb 1, 4:35 pm, Robert Green rbgrn@gmail.com wrote: What MrChaz said. Use time-based animation and then if you want to smooth out the rough spots, you can tick using a running average. On Feb 1, 1:02 pm, MrChaz mrchazmob...@googlemail.com wrote: The easiest way to achieve a smooth rotation is to multiply the rotation amount by the time difference between the current frame and the last frame - that way the amount moved is constant over time. On Feb 1, 5:18 pm, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: Hello Android OpenGL/real-time gurus, I am drawing a pretty simple scene, with one large texture the about size of the screen (two triangles). I notice that the frame-rate is irregular: in most of cases, a frame finishes in 17 ms. However, in about 1 of 10 times, the frame finishes in 33ms. My guess is probably some background services need to run. However, the Linux scheduler is biased towards my FG app, so the BG services are usually starved, until they can't take it anymore and they grab the CPU from my app I am seeing stuttering in the animation. Is this due to the irregular frame rate? Should I delay each frame so that all frames are rendered with 33ms frame time? If so, what's the best technique of achieving this? Is there an API that I can call to guarantee CPU resources for the render thread I really hope Android runs on some sort of real time kernel ... 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
Re: [android-developers] Re: System Settings
Thanks Bob. On Tue, Feb 2, 2010 at 5:31 PM, Bob Kerns r...@acm.org wrote: The ones you're not allowed to change are defined here: http://developer.android.com/intl/de/reference/android/provider/Settings.Secure.html The ones you ARE allowed to change (with android.permission.WRITE_SETTINGS permission) are defined here: http://developer.android.com/intl/de/reference/android/provider/Settings.System.html You use the static methods on those two classes, together with your applications ContentResolver, to access them: e.g.: return Settings.System.getInt(getContentResolver(), NOTIFICATIONS_USE_RING_VOLUME) Physically, these are stored in a database, but you shouldn't do it that way. On Feb 1, 9:52 pm, android beginner android.beginne...@gmail.com wrote: Hi, How System Settings (eg, volume, brightness) stored in Android and where? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] executing a shell script from Android application
first thought that came to my mind is permission. ofcourse you can confirm that with logcat. On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote: Hi all, I am configuring wifi on my android based board using shell script. Now I want to execute the same script from android application. For that, I had used following code, but it didn't give any success till now, I had executed same script from adb shell prompt and it works nicely. Process exeCommands = Runtime.getRuntime().exec(/data/busybox/ board_script.sh); is there anything else required than this??? Please help.. Asif -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Young French Dev need help
Query the SMS content provider for all the info you need about the SMS Search for it, and you will get a few examples. Thanks and Regards Kumar Bibek On Feb 2, 2:36 pm, Rubixcube tristanyoun...@gmail.com wrote: yeah , i've read docs for many times , but i haven't found any thing helping me. that's why i'm writing here ;P On Feb 2, 9:58 am, Kevin Duffey andjar...@gmail.com wrote: Have you tried the SDK docs for the objects you are working with? Perhaps some code that you are using? On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com wrote: No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: executing a shell script from Android application
which permission?? Can you please elaborate on this? In the logcat, I am not getting much specific information. Thanks, Asif On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com wrote: first thought that came to my mind is permission. ofcourse you can confirm that with logcat. On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote: Hi all, I am configuring wifi on my android based board using shell script. Now I want to execute the same script from android application. For that, I had used following code, but it didn't give any success till now, I had executed same script from adb shell prompt and it works nicely. Process exeCommands = Runtime.getRuntime().exec(/data/busybox/ board_script.sh); is there anything else required than this??? Please help.. Asif -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] forming xml and posting it ...
Hi, I want to form an xml and post it. Can anybody tell me how to form an xml in android.. I m a newbie.. Please help 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] size limit of shared preferences
Hi friends I want to save all the contacts into shared preferences.Is it possible? I mean.. is there any upper size limit of shared preferences??How much data it can save?? Thanks in advance Nemat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] forming xml and posting it ...
Hi , Can anybody tell me how to form an xml file.. means i m taking some data from user through GUI and then form the xml of that data and post it to some api... please help thanx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Young French Dev need help
This link will help you: http://blog.chinaunix.net/u/9577/showart_1850111.html cheers!!! Regards Nemat On Feb 2, 3:26 pm, Kumar Bibek coomar@gmail.com wrote: Query the SMS content provider for all the info you need about the SMS Search for it, and you will get a few examples. Thanks and Regards Kumar Bibek On Feb 2, 2:36 pm, Rubixcube tristanyoun...@gmail.com wrote: yeah , i've read docs for many times , but i haven't found any thing helping me. that's why i'm writing here ;P On Feb 2, 9:58 am, Kevin Duffey andjar...@gmail.com wrote: Have you tried the SDK docs for the objects you are working with? Perhaps some code that you are using? On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com wrote: No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to determine size of a custom view
Hi, I create a custom view MyExpandedView. The size of this view should not be fixed, its size should be calculated at runtime. Shall I use View.measure() and View.onMeasure()? Or other method? Thank for your help! Note this custome view is in a ViewGroup. My layout file is below: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/my_container android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.my.MyExpandedView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/candidates android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignParentTop=true android:layout_weight=1 / LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/floating_container android:orientation=horizontal android:gravity=right android:layout_width=fill_parent android:layout_height=wrap_content Button android:id=@+id/cancel android:layout_width=wrap_content android:layout_height=wrap_content android:text=OK android:background=@drawable/btn_background android:layout_gravity=center_horizontal/ Button android:id=@+id/prevPage android:text=Cancel android:background=@drawable/btn_background android:layout_width=wrap_content android:layout_height=wrap_content/ /LinearLayout /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Move the virtual keyboard to the top of the screen (SIP - IME)
Hello. I'm looking for a way to move the virtual keyboard to the top of the screen, rather than the bottom. Is it possible? Thanks in advance. Fabio. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Young French Dev need help
thx nemat, i'll take a look to your link. On Feb 2, 11:45 am, Nemat nemate...@gmail.com wrote: This link will help you:http://blog.chinaunix.net/u/9577/showart_1850111.html cheers!!! Regards Nemat On Feb 2, 3:26 pm, Kumar Bibek coomar@gmail.com wrote: Query the SMS content provider for all the info you need about the SMS Search for it, and you will get a few examples. Thanks and Regards Kumar Bibek On Feb 2, 2:36 pm, Rubixcube tristanyoun...@gmail.com wrote: yeah , i've read docs for many times , but i haven't found any thing helping me. that's why i'm writing here ;P On Feb 2, 9:58 am, Kevin Duffey andjar...@gmail.com wrote: Have you tried the SDK docs for the objects you are working with? Perhaps some code that you are using? On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com wrote: No one can help me ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem with invalidate
If I have two views in a linear layout, and invalidate one of them, it causes the other view to redraw needlessly. Im my application on view is animated, and the other takes a long time to draw, this is causing problems with the animation. From experimentation it seems that putting the slow layout inside an extra LinearLayout prevents the unnecessary redraw, as does separating the two views by a 1 pixel margin. Looking at the code in the sdk it seems the dirty rectangle for each view is (top, left, top + width, bottom + width), which means neighboring clip and dirty rectangles overlap by one pixel, causing the additional unwanted redraw. Is this a but in the Android SDK, or is it intended. If intended, why? Cheers, Keean. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Dynamic TableLayout problem
No idea? :s On 1 feb, 22:09, David Arm zash...@gmail.com wrote: Sorry, double post. On 1 feb, 18:37, David Arm zash...@gmail.com wrote: Hi! Im having a problem with a tablelayout. Im trying to add rows dinamically and display the content of these rows (there are not content problems as T tested it and the app has all the data that it needs). This is the java code and the xml of the activity: [syntax=java]import java.util.ArrayList; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class DisplayResult extends Activity{ /** Called when the activity is first created. */ �...@suppresswarnings(unchecked) public void onCreate(Bundle savedInstanceState) { System.out.println(2º actividad lanzada); super.onCreate(savedInstanceState); setContentView(R.layout.displayresults); Bundle extras = getIntent().getExtras(); //this.setContentView(R.layout.main); /* Find Tablelayout defined in main.xml */ TableLayout tl = (TableLayout)findViewById (R.layout.displayresults); ArrayList finalResults; if(extras!=null){ finalResults = (ArrayList) (extras.getSerializable (RemoteIR.RESULTS)); Iterator it = finalResults.iterator(); while(it.hasNext()) { SearchResult result = ((SearchResult) it.next()); /* Create a new row to be added. */ TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView title = new TextView(this); title.setText(result.title.toString()); //System.out.println(title.getText()); TextView author = new TextView(this); author.setText(result.author.toString()); TextView file = new TextView(this); file.setText(result.file.toString()); TextView modDate = new TextView(this); author.setText(result.modDate.toString()); TextView size = new TextView(this); size.setText(result.size.toString()); title.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); author.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); file.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); modDate.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); size.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); tr.addView(title); tr.addView(author); tr.addView(file); tr.addView(modDate); tr.addView(size); tl.addView(tr,new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); } } } }[/syntax] This is the xml: [syntax=xml] ?xml version=1.0 encoding=utf-8? TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/DisplayResults android:layout_width=fill_parent android:layout_height=fill_parent TableRow TextView android:layout_column=1 android:text=Title android:padding=3dip / TextView android:text=Author android:padding=3dip / TextView android:text=File android:padding=3dip / TextView android:text=ModDate android:padding=3dip / TextView android:text=Size android:padding=3dip / /TableRow /TableLayout[/syntax] And this is the error that is frustrating me :s ERROR: 02-01 12:10:34.129: ERROR/AndroidRuntime(938): Uncaught handler: thread main exiting due to uncaught exception 02-01 12:10:34.149: ERROR/AndroidRuntime(938): [b] java.lang.RuntimeException: Unable to start activity ComponentInfo {citic.android.remoteir/citic.android.remoteir.DisplayResult}: java.lang.NullPointerException[/b] 02-01 12:10:34.149: ERROR/AndroidRuntime(938): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2496) 02-01
[android-developers] Re: [TransitionDrawable ImageView] Bug fix on android 2.1 ?
Hi Romain, Thanks for taking the time to answer this yourself. You're probably right : the fix was probably made on ListView rather that on TransitionDrawable. The reason I need to know where the fix was is that I have to maintain backward compatibility with Android 1.5, thus I would be happy to find a workaround for this little bug. I looked at the diffs (since Android 2.1 source code was pushed on public git repository today !) but I wasn't able to find the fix yet. I'll keep looking for it. PS : Désolé pour mon anglais, et au passage merci pour ce sympatique framework. :) On Feb 1, 7:37 pm, Romain Guy romain...@android.com wrote: Hi, Why exactly do you need to know what the fix was? I don't remember doing anything to fix TransitionDrawable so it's probably one of the numerous fixes that went into ListView itself that's responsible for the new correct behavior. On Mon, Feb 1, 2010 at 8:39 AM, Worgle lewor...@gmail.com wrote: Hello, It seams to me that a bug was fixed between android 2.0.1 and 2.1 about TransitionDrawable (or maybe ImageView). When using TransitionDrawable in a ListView (with convert view mechanism) in android 2.0.1 and below, I can't see the Transition if I scroll rapidly to the end of the list, and then go back to the middle (even through I'm calling startTransition). Note that my TransitionDrawable is set as the image of an ImageView. (Tested on emulators from 1.6 to 2.1, and on real devices : G2 with 1.5, G2 with 1.6 and Nexuos One with 2.1) But with android 2.1, the bug magically disappeared ! I'm quite happy but I still want backward compatibility... So is there anyone on the android team a bit less busy than the others who could run a diff on TransitionDrawable and ImageView between 2.01 and 2.1 and tell us what's going on ? :) Of course the change could have occured on LayerDrawable or other parent's classes as well... Thanks, Fabien PS : here's part of my code Drawable drawableOld = this.getDrawable(); Drawable drawableNew = new BitmapDrawable (bitmap); Drawable[] layers = {drawableOld, drawableNew}; TransitionDrawable transitionDrawable = new TransitionDrawable(layers); transitionDrawable.setCrossFadeEnabled(true); setImageDrawable(transitionDrawable); transitionDrawable.startTransition (TRANSITION_DURATION); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Help about Alarm Clock
I don't think you can access the phones default alarms in the Alarms app but you could build your own with AlarmManager http://d.android.com/reference/android/app/AlarmManager.html That should help On Feb 2, 8:09 am, Ali Murtaza mralimurt...@gmail.com wrote: Hi I want to make an application in which i want to set the alarm, so that my application set the alarm directly... for example I am creating a reminder applicatioin in which i want to set the alarm on a specific time and specific date... please help me to tell me the class use in this case. thanks -- Ali Murtaza BCSF06M021 Research Assistant Data Virtulization Ware House PUCIT, Lahore, Pakistan ali.murt...@pucit.edu.pk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Droid Video Recorder
Hi Kevin You sure can record videos at that resolution but only with the in- built camcorder app in Droid. Try writing your own recorder app and you will see the difference. Abhi On Feb 1, 7:20 pm, Kevin Duffey andjar...@gmail.com wrote: I believe the video can be taken up to 640 x 480 at 30fps.. but not sure of this. I shot some videos of my kids in the snow yesterday and I gotta say I was very impressed with the quality. It was a bit cloudy, so the end result was a little dark, but short of very fast panning actions, it came out great. On Mon, Feb 1, 2010 at 1:00 PM, Abhi abhishek.r.sha...@gmail.com wrote: Hi, I am trying to create a Video recorder but it looks like the video resolution is limited to 320 x 240. I tried changing it through MediaRecorder.setVideoSize() to something higher (e.g. 640 x 480) but gives me the same result. Is there a way to record video at higher quality? Also, when I try using the CAMERA as VideoSource instead of DEFAULT, the app force closes. MediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT) Am I doing something wrong? Which is the best configuration (encoding options?) to give the best video quality? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 test sample Bluetooth application in Android emulator?
Hi to All, I wanted to test a sample Bluetooth application in android emulator, then i come to know that the android emulator does not have bluetooth support.I read some thing connect external USB Bluetooth dongle to the Mechine and bridge that dongle to android emulator.But they didn't provided the steps.Now i plugged the USB Bluetooth dongle to my System and i do not how to bridge that with android emulator.Is there any way to do this?.I am struggling to achieve this, please some body who knows the solution help me. Regards, Raj -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: executing a shell script from Android application
same script I kept in the ubuntu desktop file system and executed with the normal java code and work nicely... with same APIs In the android application with same APIs when executing same script by putting it in /data/busybox/board_script.sh it does not work and gives following log results..even log doesnt give proper indication of security or permission problem.. 01-01 07:20:36.386: INFO/ActivityManager(684): Starting activity: Intent { flags=0x1000 comp={imats.wifi.script/ imats.wifi.script.WiFiScript} } 01-01 07:20:36.410: INFO/ActivityManager(684): Start proc imats.wifi.script for activity imats.wifi.script/.WiFiScript: pid=12665 uid=10015 gids={} 01-01 07:20:36.410: DEBUG/AndroidRuntime(12656): Shutting down VM 01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM waiting for non-daemon threads to exit 01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM shutting VM down 01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread shutting down 01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread has shut down 01-01 07:20:36.410: DEBUG/jdwp(12656): JDWP shutting down net... 01-01 07:20:36.410: DEBUG/jdwp(12656): Got wake-up signal, bailing out of select 01-01 07:20:36.410: INFO/dalvikvm(12656): Debugger has detached; object registry had 1 entries 01-01 07:20:36.410: DEBUG/dalvikvm(12656): VM cleaning up 01-01 07:20:36.417: DEBUG/dalvikvm(12656): LinearAlloc 0x0 used 639228 of 4194304 (15%) 01-01 07:20:36.449: INFO/jdwp(12665): received file descriptor 10 from ADB 01-01 07:20:36.558: WARN/ResourceType(684): Failure getting entry for 0x7f020060 (t=1 e=96) in package 0: 0xffb5 01-01 07:20:36.847: INFO/ActivityManager(684): Displayed activity imats.wifi.script/.WiFiScript: 464 ms 01-01 07:20:41.894: DEBUG/dalvikvm(7502): GC freed 49 objects / 1968 bytes in 43ms Thanks, Asif On Feb 2, 3:33 pm, Asif k asifk1...@gmail.com wrote: which permission?? Can you please elaborate on this? In the logcat, I am not getting much specific information. Thanks, Asif On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com wrote: first thought that came to my mind is permission. ofcourse you can confirm that with logcat. On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote: Hi all, I am configuring wifi on my android based board using shell script. Now I want to execute the same script from android application. For that, I had used following code, but it didn't give any success till now, I had executed same script from adb shell prompt and it works nicely. Process exeCommands = Runtime.getRuntime().exec(/data/busybox/ board_script.sh); is there anything else required than this??? Please help.. Asif -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] reg AttributeSet
Hello, I'd like to use a non-compiled file (that I get dynamically from my server) in order to fetch the AttributeSet for a component. To put it another way - I'd like to create an AttributeSet at runtime. Is that possible? If the only way to do this is by implementing the AttributeSet interface, then can you please give me some pointers on how to go about it? I thought I might use XmlResourceParser class probably, but I am unable to create an object of XmlResourceParser at runtime with a non- compiled file. I am working on Android 2.0.1. I don't mind even if I have to use a newer SDK(2.1) in order to achieve this. Please feel free to ask for clarifications in case I haven't put across my point clearly. Thanks a lot, Priyanka -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Move the virtual keyboard to the top of the screen (SIP - IME)
It would also be helpful to make the virtual keyboard always be shown in fullscreen. I tried to extend the class InputMethodService overriding onEvaluateFullscreenMode to always return true, but I had the following problems: - My application UI is still shown above the keyboard, even after setting the attribute android:imeFullscreenBackground. - Selecting another control other than the one that activated the keyboard makes the application hang. - Couldn't find a way to show the keyboard with the Done button instead of enter. On Feb 2, 9:16 am, flsobral flsob...@gmail.com wrote: Hello. I'm looking for a way to move the virtual keyboard to the top of the screen, rather than the bottom. Is it possible? Thanks in advance. Fabio. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Temperature Sensors
If I was to make an assumption, I would guess that the temperature reading is up to the hardware device itself if there were one there. Anything in the API that the Android SDK provides would confine the hardware to follow a particular format for sharing the data with people, but it would not define how the hardware gets its reading. Also, make sure that your device actually has one of those sensors. Just because the sensor exists in the API means that the phone you are using actually has that sensor available to you. ~JFrog Debugging something is twice as hard as coding it the first time. Therefore, if we code as cleverly as possible, we are by definition not smart enough to debug 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: soft keyboard does not show when creating EditText inside a TableRow dynamically (programmatically )
If a EditText is created not within the TableLayout, this dynamically created EditText works as expected. The soft keyboard pops up when first clicking into the newly created EditText. This must have something to do with the way the EditText is created inside a new row. Any ideas? Thanks. Code to add an EditText outside the TableLayout works as expected: LinearLayout layout = (LinearLayout)findViewById(R.id.LinearLayout01); layout.addView(new EditText(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: Binding list views to large data sets
Hehe, that was my reply when I started the project sigh. A crude use case example is where the records are like short log entries, and you want to scroll through them to watch events over a time span. You need a big window, since in some time frames, there may be few records; in others, there may be thousands -- the data density varies you can't just give them an index since they may not know what time range will cover what they need to know. I'm doing the query changing the SimpleCursorAdapter cursor in the background via AsyncTask, then binding the adapter to the list in onPostExecute. Binding to the list has to be done in the UI thread, hence the UI freeze during the bind (as the list requests the row count from the adapter). Now, I can avoid the UI freeze by doing a cursor.getCount (source of the delay) before binding to the list, but then I have some cursor management issues when the activity goes away due to a rotate -- either stall the onStop/onDestroy until the cursor.getCount completes the cursor can be closed, or keep the cursor static risk the overhead if it is abandoned. Unless I'm misunderstanding your suggestion, paging won't work because you'd still need to know the row count (incur delay) before deciding if/how to paginate. The iPhone version of our app works without any of these issues, so I'm hoping that I'm just missing something (and that it's not an Android limitation). Other ideas? Thanks Tom On Feb 1, 2:51 pm, Nerdrow troybe...@gmail.com wrote: The standard reply is going to be you'll never actually need to view all 20K rows, so either page it out or filter the results to a more manageable number. Then again, if an end user is willing to scroll through 20K rows, they might be willing to wait 5s for it to load :) Past that, I assume you're extending a CursorAdapter, you can use setEmptyView on the ListView to show a progress dialog, run your query on a background thread (or AsyncTask), then use a Handler (or the AsyncTask) to call changeCursor w/the results of the query. It will at least feel more responsive in that the UI doesn't just freeze while it's working. On Jan 31, 10:01 pm, THill thill.dr...@gmail.com wrote: I need to be able to scroll through alistwith (up to) 20K rows, backed by a cursor on a read-only db. Testing 20K rows on a G1, the query takes approx .02s regardless of table size, while binding the adapter to thelisttakes 4.5s. Note that this is before the view calls used in rendering. What makes the binding delay more troublesome is that it blocks the UI thread, and is incurred on every rotate. Combine these, and doing a rotate just after starting thebindresults in a delay up to 9s. I tried lazy loading with a base adapter, but that hits the same delay in the underlying cursor.getCount(), and the overall user experience isn't ideal. I also considered using an ArrayAdapter, adding synthesized objects from the cursor rows, but then I'd incur the overhead of creating up to 20K objects (not to mention the additional memory requirements). Any recommended alternatives or workarounds? Thanks in advance, Tim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] OpenGL App crashes on Nexus One
Hi All, Do not know anybody could give a hint for the problem I have. Our OpenGL games are built based on SDK 1.2 and runs almost all Android devices (from OS 1.2 ~ 2.0) except Google Nexus One (OS 2.1). On Nexus One, it generates the following exception: 02-01 09:26:28.319: DEBUG/libEGL(2340): loaded /system/lib/egl/ libGLES_android.so 02-01 09:26:28.319: DEBUG/libEGL(2340): loaded /system/lib/egl/ libEGL_adreno200.so 02-01 09:26:28.329: DEBUG/libEGL(2340): loaded /system/lib/egl/ libGLESv1_CM_adreno200.so 02-01 09:26:28.329: DEBUG/libEGL(2340): loaded /system/lib/egl/ libGLESv2_adreno200.so 02-01 09:26:28.349: ERROR/qsd8k.gralloc(2340): invalid gralloc handle (at 0x140a48) 02-01 09:26:28.349: ERROR/Adreno200-EGL(2340): eglLockWindowSurface 439: lock failed 02-01 09:26:28.349: ERROR/qsd8k.gralloc(2340): invalid gralloc handle (at 0x140a48) 02-01 09:26:28.349: ERROR/Adreno200-EGL(2340): eglLockWindowSurface 444: unlock failed 02-01 09:26:28.349: ERROR/Adreno200-EGL(2340): eglLockWindowSurface: failed to map the memory for fd=28 offs=3 02-01 09:26:28.349: ERROR/qsd8k.gralloc(2340): invalid gralloc handle (at 0x140a48) 02-01 09:26:28.349: ERROR/Adreno200-EGL(2340): eglLockWindowSurface 439: lock failed (The same error messages repeats for ever inside the animation loop...) We are using our own SurfaceView (almost same as GLSurfaceView) and I believe we got the correct EGLContext (otherwise a NULL EGLContext error message will pop out). The problem is that the same code runs on about 10 different Android phones from OS 1.2 to 2.0 (including Moto Droid) but failed on Nexus. Any body at Android OpenGL team could give a suggestion on the error message? Hongkun OmnigSoft -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] onKeyUp not getting called after EditText regains focus
I've got a subclass of EditText text that stops receiving KeyEvents after losing and then regaining focus. Here is an example class: class MyEditText extends EditText { public MyEditText(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void onKeyUp(int keyCode, KeyEvent event) { System.out.println(KeyCode: + keyCode); return super.onKeyUp(keyCode, event); } I've got two of these on a page. If I focus one of them and start typing, I receive the KeyEvents just fine. However, if I focus the other EditText, and then refocus the first one, it no longer calls the custom onKeyUp method anymore. I don't understand what I'm doing wrong here, it seems like a fairly simple task. What do I need to do so that it receives the event? -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Help needed with parsing some XML data !
Hi, I am downloading a xml-type file from a webserver which starts out with : ?xml version=1.0 encoding=iso-8859-1 ? afterwards I get a list with loads of countries, some countries do contain some letters like é and á. I have tried to extract the data of the xml in two ways : 1 - simply download the whole thing into a String, which will result in those characters being seen as something like [] or on the Android emulator (and device) I will see a triangle with a ? in it... 2 - fetch the list with the SAXParser and XMLReader which will just throw an exception telling me that there is some content error... specifically at the line where the first country is with such a character... So is there some way to get this to work ? Can I read the iso-8859-1 encoded xml into the Parser ? Or is there some way to encode/decode the received data into something actually usable ? Any idea where the problem might be ? Thanks in advance for any hints, tips, code or explanation :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Moving the cursor to the beginning of an EditText
Using the following code, I am able to move the cursor after the first character on the left in an EditText: EditText editText = new EditText(this); Editable etext = editText.getText(); Selection.setSelection(etext, 1); However, if I change it to Selection.setSelection(etext, 0) with the goal of moving the cursor to the beginning of the text, it moves the cursor (or doesn't move the cursor) to the end of the line instead of the beginning. How can I move the cursor to the beginning of the text? -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: size limit of shared preferences
I've tried to dump some user data into SharedPreferences. Not a good idea, doesn't perform. If you need to store records-based data, the answer is SQLite On Feb 2, 2:35 am, Nemat nemate...@gmail.com wrote: Hi friends I want to save all the contacts into shared preferences.Is it possible? I mean.. is there any upper size limit of shared preferences??How much data it can save?? Thanks in advance Nemat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Segfault in Bitmap.getPixel()
Hi, I have a larger 512x512 32-bit ARGB Bitmap loaded from a PNG in my application. I traverse each pixel in this bitmap as follows: int height = bitmap.getHeight()-1; for( int y = 0; y bitmap.getHeight(); y++ ) { for( int x = 0; x bitmap.getWidth(); x++ ) { int pixel = bitmap.getPixel( x, y); collisionMap[x][height-y] = pixel != -1 ?(byte)BACKGROUND_PIXEL: 0; } } I check each pixel in the bitmap for a specific color value and set a byte in a corresponding 2D array that has the same dimensions as the image. This works perfectly fine on my droid, on my hero as well as on the emulator. I send the app containing this code to some other people that have a g1 and a mytouch and there this few lines fail horribly with a segfault: 02-01 17:47:25.532 I/ActivityManager( 74): Process android.process.media (pid 3920) has died. 02-01 17:47:25.622 I/DEBUG ( 48): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 02-01 17:47:25.622 I/DEBUG ( 48): Build fingerprint: 'tmobile/opal/ sapphire/sapphire:1.6/DRC92/15632:user/ota-rel-keys,release-keys' 02-01 17:47:25.622 I/DEBUG ( 48): pid: 4033, tid: 4039 com.badlogic.doodleescape 02-01 17:47:25.622 I/DEBUG ( 48): signal 7 (SIGBUS), fault addr 02-01 17:47:25.622 I/DEBUG ( 48): r0 44527d84 r1 4622700a r2 0001 r3 02-01 17:47:25.622 I/DEBUG ( 48): r4 0001 r5 4622700a r6 44527d84 r7 4104be78 02-01 17:47:25.622 I/DEBUG ( 48): r8 44527d9c r9 4104be6c 10 4104be5c fp 0001 02-01 17:47:25.622 I/DEBUG ( 48): ip 4622700a sp 44527d70 lr ad346c1f pc ad3469a0 cpsr 0030 02-01 17:47:26.242 I/DEBUG ( 48): #00 pc 000469a0 / system/lib/libandroid_runtime.so 02-01 17:47:26.242 I/DEBUG ( 48): #01 pc 00046c1c / system/lib/libandroid_runtime.so 02-01 17:47:26.242 I/DEBUG ( 48): #02 pc e434 / system/lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): stack: 02-01 17:47:26.252 I/DEBUG ( 48): 44527d30 ad083e1c /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d34 ad0159f4 /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d38 032c 02-01 17:47:26.252 I/DEBUG ( 48): 44527d3c 002a 02-01 17:47:26.252 I/DEBUG ( 48): 44527d40 0054 02-01 17:47:26.252 I/DEBUG ( 48): 44527d44 ad083e1c /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d48 0064 02-01 17:47:26.262 I/DEBUG ( 48): 44527d4c 001a 02-01 17:47:26.262 I/DEBUG ( 48): 44527d50 02-01 17:47:26.262 I/DEBUG ( 48): 44527d54 4104be78 02-01 17:47:26.262 I/DEBUG ( 48): 44527d58 0001 02-01 17:47:26.262 I/DEBUG ( 48): 44527d5c 41c3a728 /system/ framework/framework.odex 02-01 17:47:26.262 I/DEBUG ( 48): 44527d60 0003 02-01 17:47:26.262 I/DEBUG ( 48): 44527d64 41c3a728 /system/ framework/framework.odex 02-01 17:47:26.262 I/DEBUG ( 48): 44527d68 df002777 02-01 17:47:26.262 I/DEBUG ( 48): 44527d6c e3a070ad 02-01 17:47:26.262 I/DEBUG ( 48): #00 44527d70 ad346999 /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): 44527d74 001aae00 [heap] 02-01 17:47:26.262 I/DEBUG ( 48): 44527d78 0001 02-01 17:47:26.262 I/DEBUG ( 48): 44527d7c ad346c1f /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): #01 44527d80 0027 02-01 17:47:26.262 I/DEBUG ( 48): 44527d84 02-01 17:47:26.262 I/DEBUG ( 48): 44527d88 44527dc0 02-01 17:47:26.262 I/DEBUG ( 48): 44527d8c 0004 02-01 17:47:26.262 I/DEBUG ( 48): 44527d90 ad346bed /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): 44527d94 ad00e438 /system/ lib/libdvm.so 02-01 17:47:28.122 I/ActivityManager( 74): Process com.badlogic.doodleescape (pid 4033) has died. The bitmap is loaded successfully otherwise i'd get a NullPointerException when requesting its height in the first line of code. It seems that Bitmap.getPixel() fails with a segfault. I have not the slightest clou of what is happening here. The really frightening part is that it works on the droid,hero and emulator but not on g1 hardware. I'd really appreciate any pointers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Binding list views to large data sets
A crude use case example is where the records are like short log entries, and you want to scroll through them to watch events over a time span. You need a big window, since in some time frames, there may be few records; in others, there may be thousands -- the data density varies you can't just give them an index since they may not know what time range will cover what they need to know. That still doesn't mean you should be loading 20K records in a single query. I'm doing the query changing the SimpleCursorAdapter cursor in the background via AsyncTask, then binding the adapter to the list in onPostExecute. Binding to the list has to be done in the UI thread, hence the UI freeze during the bind (as the list requests the row count from the adapter). Correct. The UI freeze timing is because a query is done lazily -- the query is not truly executed against the database until data is actually needed. A call to getCount() is the likely first statement that will trigger the actual query. Hence, don't load 20K records in a single query. Now, I can avoid the UI freeze by doing a cursor.getCount (source of the delay) before binding to the list, but then I have some cursor management issues when the activity goes away due to a rotate -- either stall the onStop/onDestroy until the cursor.getCount completes the cursor can be closed, or keep the cursor static risk the overhead if it is abandoned. Or handle the UI change yourself by indicating in the manifest you will handle those configuration changes, then override onConfigurationChanged() and adjust your UI as needed. Unless I'm misunderstanding your suggestion, paging won't work because you'd still need to know the row count (incur delay) before deciding if/how to paginate. Use the LIMIT and OFFSET terms on your SELECT statement to obtain data in smaller chunks. Create a wrapping adapter (like my EndlessAdapter) that only loads chunks when the user scrolls to the bottom of the list and therefore needs more data. http://github.com/commonsguy/cwac-endless -- Mark Murphy (a Commons Guy) http://commonsware.com 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: TableLayout will not draw new row addition
Try changing the class type when supplying the LayoutParams, see: http://caguilartech.blogspot.com/2009/08/notes-on-android-tablelayouts-and.html. private TableRow createNewTableRow(TableRow newRow){ newRow.setLayoutParams(new TableLayout.LayoutParams (TableLayout.LayoutParams.WRAP_CONTENT,TableLayout.LayoutParams.WRAP_CONTENT)) ; LinearLayout newLinearLayout = new LinearLayout (appActivity) ; newLinearLayout.setOrientation(LinearLayout.HORIZONTAL); newLinearLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)) ; -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 style
selector ... is a StateListDrawable. This may help http://developer.android.com/intl/fr/reference/android/graphics/drawable/StateListDrawable.html On Jan 29, 5:32 pm, saad bouchehboun bsaad1...@gmail.com wrote: yes , but no explicite speking about selectors !! whiche alow custuming list views On 29 jan, 05:09, NoraBora noranb...@gmail.com wrote: Have you looked at ApiDemos? It has lots of useful code examples. On Jan 26, 7:07 am, saad bouchehboun bsaad1...@gmail.com wrote: hy , I need to use list selector , xml syntax , to custum my listview , can you help me find his full documentation . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TableLayout will not draw new row addition
Try changing the class type when supplying the LayoutParams, see: http://caguilartech.blogspot.com/2009/08/notes-on-android-tablelayouts-and.html private TableRow createNewTableRow(TableRow newRow){ newRow.setLayoutParams(new TableLayout.LayoutParams (TableLayout.LayoutParams.WRAP_CONTENT,TableLayout.LayoutParams.WRAP_CONTEN T)) ; LinearLayout newLinearLayout = new LinearLayout (appActivity) ; newLinearLayout.setLayoutParams(new TableRow.LayoutParams (TableRow.LayoutParams.FILL_PARENT,TableRow.LayoutParams.WRAP_CONTENT)) ; -justin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: docs for shape xml syntax
a little info here. http://developer.android.com/intl/fr/reference/android/graphics/drawable/ShapeDrawable.html On Jan 30, 1:22 am, jotobjects jotobje...@gmail.com wrote: I did find a handful of examples in samples/ApiDemos/res/drawable. The xml files in that directory are all examples of using shapes and related xml elements. Some of this is mentioned in the javadocs for android.graphics.drawable. Some xml elements like corners and gradient are not documented anywhere that I know of. The attributes for shape are listed in GradientDrawable but then these apparently are also the attributes for gradient according some of the examples. So I guess it is at least supported as part of the API, even if you have to reverse engineer it to figure out the features. On Jan 29, 5:59 am, Flying Coder av8r.st...@gmail.com wrote: Docs for this would be awesome! Nedrow: thanks for the link -- that was very helpful. Steve On Jan 28, 10:31 pm, jotobjects jotobje...@gmail.com wrote: Thanks - this sure looks like it might be useful if there was more documentation :( On Jan 28, 3:38 pm, Nerdrow troybe...@gmail.com wrote: Not a lot of good, workable documentation about this. This helped me out a lot:http://escomic.net/217 On Jan 27, 3:59 pm, jotobjects jotobje...@gmail.com wrote: Where is there information about the syntax of shape xml files. These can be used to define 2D graphics as I understand it. There are few spotty examples in the samples directory but that is all I have found. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Querying the contacts content provider for values with accent
Hello, I'm trying to search contacts in addressbook with the 1.5 API : c = managedQuery(People.CONTENT_URI, new String[] { People._ID, People.NAME }, People.NAME+ LIKE ?, new String[] { %+filter+% }, People.DEFAULT_SORT_ORDER); Where filter is a String. When I search for fred I find : Frederic A When I search for fréd I find : Frédéric B How can I make my search to find with fred : Frederic A Frédéric B Just like typing in the Contacts app. 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: Problem with expandable list view
I had a cannot-click-item problem with ListView. In my case the android:inputType in TextView was the problem. You should try removing attributes in text2. Maybe start with 'android:numeric=integer'? On Jan 30, 4:33 am, tikky tiku...@gmail.com wrote: I have an expandable list view, where the child view is a custom layout consisting of 2 text views within a RelativeLayout as follows: RelativeLayout . TextView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/text1 android:layout_width=fill_parent android:layout_height=wrap_content android:paddingLeft=?android:attr/ expandableListPreferredItemPaddingLeft android:textAppearance=?android:attr/textAppearanceMedium android:gravity=center_vertical / TextView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/text2 android:layout_height=fill_parent android:layout_width=wrap_content android:textAppearance=?android:attr/textAppearanceSmall android:layout_alignParentRight=true android:layout_centerInParent=true android:numeric=integer android:text=@string/text2/ /RelativeLayout However, when I click on the child view the onChildClick() is not getting called. If I remove the second text view text2 above, then it works fine and onChildClick() is called. Can anyone help me identify the problem here? This is the outline of my code: ExpandableListView list = (ExpandableListView) findViewById (R.id.expandableListView); list.setVisibility(View.VISIBLE); Cursor groupCursor = managedQuery(Category.CONTENT_URI, null, null, null, Items.DEFAULT_SORT_ORDER); // Set up our adapter mAdapter = new ShoppingListAdapter(groupCursor, ShoppingListActivity.this, R.layout.categories_list,// android.R.layout.simple_expandable_list_item_1, R.layout.items_list,// android.R.layout.simple_expandable_list_item_1, //android.R.layout.simple_list_item_multiple_choice, new String[] {Category.NAME}, // Name for group layouts new int[] {android.R.id.text1}, new String[] {Items.NAME}, // Number for child layouts new int[] {android.R.id.text1}); list.setAdapter(mAdapter); list.setOnChildClickListener(new OnChildClickListener(){ public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { // TODO Auto-generated method stub showEditQuantityDialog(); return true; } }); } public class ShoppingListAdapter extends SimpleCursorTreeAdapter{ private String mItemsProjection[] = new String[] { Items._ID, Items.NAME }; private static final String ITEMS_SELECTION = Items.CATEGORY_ID + =?; public ShoppingListAdapter(Cursor cursor, Context context, int groupLayout, int childLayout, String[] groupFrom, int[] groupTo, String[] childrenFrom, int[] childrenTo) { super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childrenFrom, childrenTo); } @Override protected Cursor getChildrenCursor(Cursor groupCursor) { // Given the group, we return a cursor for all the children within that group Long groupId = groupCursor.getLong (groupCursor.getColumnIndexOrThrow(Category._ID)); String strGroupId = Long.toString(groupId); String[] selectionArgs = new String[] { strGroupId }; // The returned Cursor MUST be managed by us, so we use Activity's helper // functionality to manage it for us. return managedQuery(Items.CONTENT_URI, mItemsProjection, ITEMS_SELECTION, selectionArgs, Items.DEFAULT_SORT_ORDER); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 implement the long click event for the ExpandableListView
Hi, can any one please suggest me how to implement the long click (onItemLongClick()) for the Expandable list view? Thanks, Manoj. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Droid Video Recorder
Ahh..interesting. That would REALLY suck if Google/Android is allowed to access that resolution but our own apps can't. That wouldn't make much sense to me. On Tue, Feb 2, 2010 at 4:26 AM, Abhi abhishek.r.sha...@gmail.com wrote: Hi Kevin You sure can record videos at that resolution but only with the in- built camcorder app in Droid. Try writing your own recorder app and you will see the difference. Abhi On Feb 1, 7:20 pm, Kevin Duffey andjar...@gmail.com wrote: I believe the video can be taken up to 640 x 480 at 30fps.. but not sure of this. I shot some videos of my kids in the snow yesterday and I gotta say I was very impressed with the quality. It was a bit cloudy, so the end result was a little dark, but short of very fast panning actions, it came out great. On Mon, Feb 1, 2010 at 1:00 PM, Abhi abhishek.r.sha...@gmail.com wrote: Hi, I am trying to create a Video recorder but it looks like the video resolution is limited to 320 x 240. I tried changing it through MediaRecorder.setVideoSize() to something higher (e.g. 640 x 480) but gives me the same result. Is there a way to record video at higher quality? Also, when I try using the CAMERA as VideoSource instead of DEFAULT, the app force closes. MediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT) Am I doing something wrong? Which is the best configuration (encoding options?) to give the best video quality? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] getChildAt sometimes giving wrong child at particular position?
Hi, I have a listactivity in which i am displaying list of items more than 8 items.Thus there is scroll bar eneabled. When i click on list items some times getChildAt returing wrong View from the list. Why is it happening like that and how can i prevent from happening? 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: Segfault in Bitmap.getPixel()
Well, there seems to be a bug when specifying a different Format in the Options of BitmapFactory.decodeStream(). I specified ARGB and it didn't complain. On 2.0 it worked, on the G1/MyTouch it didn't. Maybe i'll file a bug about this. On 2 Feb., 15:46, Mario Zechner badlogicga...@gmail.com wrote: Hi, I have a larger 512x512 32-bit ARGB Bitmap loaded from a PNG in my application. I traverse each pixel in this bitmap as follows: int height = bitmap.getHeight()-1; for( int y = 0; y bitmap.getHeight(); y++ ) { for( int x = 0; x bitmap.getWidth(); x++ ) { int pixel = bitmap.getPixel( x, y); collisionMap[x][height-y] = pixel != -1 ?(byte)BACKGROUND_PIXEL: 0; } } I check each pixel in the bitmap for a specific color value and set a byte in a corresponding 2D array that has the same dimensions as the image. This works perfectly fine on my droid, on my hero as well as on the emulator. I send the app containing this code to some other people that have a g1 and a mytouch and there this few lines fail horribly with a segfault: 02-01 17:47:25.532 I/ActivityManager( 74): Process android.process.media (pid 3920) has died. 02-01 17:47:25.622 I/DEBUG ( 48): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 02-01 17:47:25.622 I/DEBUG ( 48): Build fingerprint: 'tmobile/opal/ sapphire/sapphire:1.6/DRC92/15632:user/ota-rel-keys,release-keys' 02-01 17:47:25.622 I/DEBUG ( 48): pid: 4033, tid: 4039 com.badlogic.doodleescape 02-01 17:47:25.622 I/DEBUG ( 48): signal 7 (SIGBUS), fault addr 02-01 17:47:25.622 I/DEBUG ( 48): r0 44527d84 r1 4622700a r2 0001 r3 02-01 17:47:25.622 I/DEBUG ( 48): r4 0001 r5 4622700a r6 44527d84 r7 4104be78 02-01 17:47:25.622 I/DEBUG ( 48): r8 44527d9c r9 4104be6c 10 4104be5c fp 0001 02-01 17:47:25.622 I/DEBUG ( 48): ip 4622700a sp 44527d70 lr ad346c1f pc ad3469a0 cpsr 0030 02-01 17:47:26.242 I/DEBUG ( 48): #00 pc 000469a0 / system/lib/libandroid_runtime.so 02-01 17:47:26.242 I/DEBUG ( 48): #01 pc 00046c1c / system/lib/libandroid_runtime.so 02-01 17:47:26.242 I/DEBUG ( 48): #02 pc e434 / system/lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): stack: 02-01 17:47:26.252 I/DEBUG ( 48): 44527d30 ad083e1c /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d34 ad0159f4 /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d38 032c 02-01 17:47:26.252 I/DEBUG ( 48): 44527d3c 002a 02-01 17:47:26.252 I/DEBUG ( 48): 44527d40 0054 02-01 17:47:26.252 I/DEBUG ( 48): 44527d44 ad083e1c /system/ lib/libdvm.so 02-01 17:47:26.252 I/DEBUG ( 48): 44527d48 0064 02-01 17:47:26.262 I/DEBUG ( 48): 44527d4c 001a 02-01 17:47:26.262 I/DEBUG ( 48): 44527d50 02-01 17:47:26.262 I/DEBUG ( 48): 44527d54 4104be78 02-01 17:47:26.262 I/DEBUG ( 48): 44527d58 0001 02-01 17:47:26.262 I/DEBUG ( 48): 44527d5c 41c3a728 /system/ framework/framework.odex 02-01 17:47:26.262 I/DEBUG ( 48): 44527d60 0003 02-01 17:47:26.262 I/DEBUG ( 48): 44527d64 41c3a728 /system/ framework/framework.odex 02-01 17:47:26.262 I/DEBUG ( 48): 44527d68 df002777 02-01 17:47:26.262 I/DEBUG ( 48): 44527d6c e3a070ad 02-01 17:47:26.262 I/DEBUG ( 48): #00 44527d70 ad346999 /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): 44527d74 001aae00 [heap] 02-01 17:47:26.262 I/DEBUG ( 48): 44527d78 0001 02-01 17:47:26.262 I/DEBUG ( 48): 44527d7c ad346c1f /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): #01 44527d80 0027 02-01 17:47:26.262 I/DEBUG ( 48): 44527d84 02-01 17:47:26.262 I/DEBUG ( 48): 44527d88 44527dc0 02-01 17:47:26.262 I/DEBUG ( 48): 44527d8c 0004 02-01 17:47:26.262 I/DEBUG ( 48): 44527d90 ad346bed /system/ lib/libandroid_runtime.so 02-01 17:47:26.262 I/DEBUG ( 48): 44527d94 ad00e438 /system/ lib/libdvm.so 02-01 17:47:28.122 I/ActivityManager( 74): Process com.badlogic.doodleescape (pid 4033) has died. The bitmap is loaded successfully otherwise i'd get a NullPointerException when requesting its height in the first line of code. It seems that Bitmap.getPixel() fails with a segfault. I have not the slightest clou of what is happening here. The really frightening part is that it works on the droid,hero and emulator but not on g1 hardware. I'd really appreciate any pointers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options,
[android-developers] How to close one task in special
Hi All How to close one task in special. I can see the task with ActivityManager manager = (ActivityManager)this.getSystemService (ACTIVITY_SERVICE ); ; ListRunningTaskInfo list = manager.getRunningTasks(10); if (list.get(1).baseActivity.getShortClassName().equalsIgnoreCase (.)) thanks David -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to close one task in special
How to close one task in special. Please don't. -- Mark Murphy (a Commons Guy) http://commonsware.com 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
Re: [android-developers] How to close one task in special
How does made the Advanced Task Killer or other app in the market? Thanks 2010/2/2 Mark Murphy mmur...@commonsware.com How to close one task in special. Please don't. -- Mark Murphy (a Commons Guy) http://commonsware.com 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Wakelock and phone restarts
What can cause the phone to restart ? On Jan 28, 11:18 am, nikhil nik...@gmail.com wrote: Hello Friends, I have a service which holds on to a wakelock and the code is similar to this, public class WakeLockService extends Service { PowerManager.WakeLock wl; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } public void onCreate() { PowerManager pm = (PowerManager) getSystemService (Context.POWER_SERVICE); wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK, My Tag); wl.acquire(); } public void onDestroy() { wl.release(); } For past two days, myphonehas been restarting randomly...Today it was worse, it kept restarting untill I uninstalled the app. I tried to search about this behaviour online and found that too many wakelocks may coz thephonetorestart. Can there be any other reason? Is the above code right? Should make wl as a final variable? Does the service call onDestroy method whenphoneshuts down? I am using a broadcastreceiver to start my service at boot up as well. Any help would be appreciated. Thank You So 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: BitmapFactory.decodeByteArray gives pixelated bitmap
Hi again, So I finally figured out that the problem is due to my mobile network operator doing image compression to save bandwidth. I discussed the problem further at the following URL, in case it could be of help to anybody: http://stackoverflow.com/questions/2183808/android-bitmapfactory-decodebytearray-gives-pixelated-bitmap/2185694#2185694 I don't suppose there is anything I can do to get around this, but if anybody has an idea, it would be much welcome (-: Best, Michael. On Feb 1, 10:22 pm, michael michael.d.peder...@googlemail.com wrote: Hi, You are resaving a JPEG. You'll be compressing twice. Why don't you try to directly save the data obtained from the URL to a file on the SDCard. Don't do any compressing. Just a direct save of the JPG file from Flickr. Thanks for the suggestion! However, saving the bitmap to a JPEG file was really just to illustrate thepixelationproblem - I assumed there would be no quality loss with the quality parameter set to 100. What I'm actually doing is to draw the bitmap downloaded from Flickr onto a canvas in the onDraw method of my View class: Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); canvas.drawBitmap(bitmap, 0, 0, paint); Pixelationsimilar to that shown in my example pictures then occurs. Any idea why this would be the case? Note that bitmaps loaded from my project resources draw just fine using this approach; although if I downscale using the Bitmap.createScaledBitmap() method, a similarpixelationproblem occurs. This problem was discussed e.g. here: http://stackoverflow.com/questions/2041207/android-quality-of-the-ima... but none of the suggested solutions seem to improve the situation in my case. Thanks again for your suggestions, I really hope there is a solution to this issue. Best, Michael. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem with TabActivity and ListActivity
Hi all, I am having a problem.I want to explain in detail. 1)I am Having an TabActivity with 5 tabs. I loaded content as follows. class MainScreen extends TabActivity{ public static TabHost mTabHost; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tab); TabHost mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec(excercise) .setIndicator(excercise,getResources().getDrawable (R.drawable.exr)) .setContent(new Intent(this,Excercise.class))); mTabHost.addTab(mTabHost.newTabSpec(graphs) .setIndicator(graphs,getResources().getDrawable (R.drawable.graph)) .setContent(new Intent(this,Graphs.class))); mTabHost.addTab(mTabHost.newTabSpec(gymlocator) .setIndicator(gym locator,getResources().getDrawable (R.drawable.gym)) .setContent(new Intent(this,Gymlocator.class))); mTabHost.addTab(mTabHost.newTabSpec(my account) .setIndicator(my account,getResources().getDrawable (R.drawable.my)) .setContent(new Intent(this,Myaccount.class))); mTabHost.addTab(mTabHost.newTabSpec(Music) .setIndicator(Music,getResources().getDrawable (R.drawable.music)) .setContent(new Intent(this,Music.class))); mTabHost.setCurrentTab(0); } tab.xml ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:orientation=vertical android:background=@drawable/ innerbg android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:paddingTop=55px android:layout_width=fill_parent android:layout_height=wrap_content / FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent /FrameLayout /LinearLayout /TabHost And the Problem is If i want to start activity which is not specified in tabhost in above Java code,it is going out of tabactivity. ie.,It is not coming in tabactivity. 2)But i want to have all the activities under tabActivity. Please i nee dthe solution urgent. If any one knows please tell me . I hope you i am clear with my problem. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: soft keyboard does not show when creating EditText inside a TableRow dynamically (programmatically )
Looks like this is being caused by the call to txt.requestFocus(). Changing to txt.requestFocusFromTouch() solves this problem. -justin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Wakelock and phone restarts
It seems there is some conflict between my service and call forwarding. Whenever I have my service running in the background, after I enable call forwarding the phone restarts and the keeps restarting. Has anyone experienced this? On Feb 2, 10:26 am, nikhil nik...@gmail.com wrote: What can cause thephoneto restart ? On Jan 28, 11:18 am, nikhil nik...@gmail.com wrote: Hello Friends, I have a service which holds on to a wakelock and the code is similar to this, public class WakeLockService extends Service { PowerManager.WakeLock wl; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } public void onCreate() { PowerManager pm = (PowerManager) getSystemService (Context.POWER_SERVICE); wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK, My Tag); wl.acquire(); } public void onDestroy() { wl.release(); } For past two days, myphonehas been restarting randomly...Today it was worse, it kept restarting untill I uninstalled the app. I tried to search about this behaviour online and found that too many wakelocks may coz thephonetorestart. Can there be any other reason? Is the above code right? Should make wl as a final variable? Does the service call onDestroy method whenphoneshuts down? I am using a broadcastreceiver to start my service at boot up as well. Any help would be appreciated. Thank You So 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: device shaked? accelerometer once more
yes, my device wasn't entirely horizontal or vertical. However what I am looking for is function that will give me the same value when the device is not in movement, but in any position, it can be on a slant, it can be almost vertically, or in unknown position in some pocket, but without movement. The problem is that I would like to be able to create a universal function here, that would fit all accelerometer-enabled phones, not my device. I guess I will let the user calibrate it by putting it horizontal without movement and calculating maximum 'real force', multiplying it by some constant like 1.2. Or additionally ignore first/second 'shakes' and process next one, which fill be kind-of filter for the peaks. Because I can't let myself accept any false positives. If somebody have a better solution - please tell. On 31 Sty, 23:11, Streets Of Boston flyingdutc...@gmail.com wrote: I'm not that familiar with how the sensor works, but judging from the values you report, i looks like the device is not entire horizontal or vertical. Your computeRealForce hovers around 0.4 (horizontally) or -1 (vertically). I guess you have to find a proper 'baseline' against which you can measure any deviation. In the horizontal case that would be around 0.4, in the vertical case that would be around -1. However, it could be that your device was not precisely horizontal or precisely vertical. How would you know the 'baseline'? I don't know... Maybe 0 or -1 is precisely horizontal or vertical and you can't assume that your device will be ever exactly horizontal or vertical... I guess you have to measure over a period of time and see what the deviation is. If it's small enough, your phone is in rest. On Jan 31, 4:19 pm, kretes kretesena...@gmail.com wrote: There has been a few discussions about it, but there is still not a good solution. Simple problem - recognize when the device is laying somewhere not moving (in relation to earth) and when is moving. Accelerometer seems to be a good sensor to use. First suprise came to me, when I logged data from the sensor events. When the device (htc hero) is laying on the table - the values are changing! sth. like -0.7, -0.7, 10.1 -0.6, -0.8, 10.0 and so on - fluctuating I haven't expected that, but let's go on - I thought I woudl compute the real force, and went with private double computeRealForce(SensorEvent event) { return Math.sqrt(Math.pow(event.values[0], 2) + Math.pow(event.values[1], 2) + Math.pow(event.values[2], 2)) - SensorManager.GRAVITY_EARTH; } very similiar approach as seen inhttp://github.com/commonsguy/cw-advandroid/blob/master/Sensor/Shaker/... and similiar inhttp://www.anddev.org/example_detecting_-und-quotshake-und-quot_with_... and the computed value also fluctuates, 0,35 0,39 0,4 but I can apply force treshold like 0,5 as a kind of filter and everything is ok. But when I put my phone to stand vertically - suddenly my computed force turned out to be -1,01 -1,05 I give up - I don't know what is the good enough solution - the one that would give around zero value when the device isn't moving in relation to earth - is there any? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Nexus 1 Vendor id?
Hello, I am trying to test my app on Nexus 1 but do not have the Vendor Id and could not find it. Can anyone tell what the Vendor ID for nexus one is. thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dynamic TableLayout problem
David, The output shows you have a null pointer at line 93 of your activity. Look there for a solution. Also, I noticed you have System.out.println. Where are you expecting the println output to appear? You might want to replace that with Android.util.log. Regards, Beth On Feb 2, 3:41 am, David Arm zash...@gmail.com wrote: No idea? :s On 1 feb, 22:09, David Arm zash...@gmail.com wrote: Sorry, double post. On 1 feb, 18:37, David Arm zash...@gmail.com wrote: Hi! Im having a problem with a tablelayout. Im trying to add rows dinamically and display the content of these rows (there are not content problems as T tested it and the app has all the data that it needs). This is the java code and the xml of the activity: [syntax=java]import java.util.ArrayList; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class DisplayResult extends Activity{ /** Called when the activity is first created. */ �...@suppresswarnings(unchecked) public void onCreate(Bundle savedInstanceState) { System.out.println(2º actividad lanzada); super.onCreate(savedInstanceState); setContentView(R.layout.displayresults); Bundle extras = getIntent().getExtras(); //this.setContentView(R.layout.main); /* Find Tablelayout defined in main.xml */ TableLayout tl = (TableLayout)findViewById (R.layout.displayresults); ArrayList finalResults; if(extras!=null){ finalResults = (ArrayList) (extras.getSerializable (RemoteIR.RESULTS)); Iterator it = finalResults.iterator(); while(it.hasNext()) { SearchResult result = ((SearchResult) it.next()); /* Create a new row to be added. */ TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView title = new TextView(this); title.setText(result.title.toString()); //System.out.println(title.getText()); TextView author = new TextView(this); author.setText(result.author.toString()); TextView file = new TextView(this); file.setText(result.file.toString()); TextView modDate = new TextView(this); author.setText(result.modDate.toString()); TextView size = new TextView(this); size.setText(result.size.toString()); title.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); author.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); file.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); modDate.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); size.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); tr.addView(title); tr.addView(author); tr.addView(file); tr.addView(modDate); tr.addView(size); tl.addView(tr,new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); } } } }[/syntax] This is the xml: [syntax=xml] ?xml version=1.0 encoding=utf-8? TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/DisplayResults android:layout_width=fill_parent android:layout_height=fill_parent TableRow TextView android:layout_column=1 android:text=Title android:padding=3dip / TextView android:text=Author android:padding=3dip / TextView android:text=File android:padding=3dip / TextView android:text=ModDate android:padding=3dip / TextView android:text=Size android:padding=3dip / /TableRow /TableLayout[/syntax] And this is the error that is frustrating me :s ERROR: 02-01 12:10:34.129:
[android-developers] Re: ANDROID_ID always null on devices
Found the cause: The android_id is not available unless you have logged onto the android market at least once from a device. Once you've done that, the ID is populated and returned by the device. Using the android_id does raise a couple of privacy questions though, but that's food for another thread. Hope this helps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: docs for shape xml syntax
On Feb 2, 7:24 am, NoraBora noranb...@gmail.com wrote: a little info here. http://developer.android.com/intl/fr/reference/android/graphics/drawa... Yes, as mentioned in my post above most of the classes in android.graphics.drawable provide some information. You can get a long way with that plus some examples such as the ones in samples/ApiDemos/ res/drawable. I found some errors (apparently not regression tested in new releases) in those examples and created this bug - http://code.google.com/p/android/issues/detail?id=6368 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Particular Tag Parsing
SAX Parsers, both push and pull, follow document order. Your problem is what makes programming fun. It takes creativity. There are many ways you could solve it, for example, by using java.util.SortedMap. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: executing a shell script from Android application
My guess is that adb is a development tool and probably not present on the device or available on the emulator at runtime. On Feb 2, 5:35 am, Asif k asifk1...@gmail.com wrote: same script I kept in the ubuntu desktop file system and executed with the normal java code and work nicely... with same APIs In the android application with same APIs when executing same script by putting it in /data/busybox/board_script.sh it does not work and gives following log results..even log doesnt give proper indication of security or permission problem.. 01-01 07:20:36.386: INFO/ActivityManager(684): Starting activity: Intent { flags=0x1000 comp={imats.wifi.script/ imats.wifi.script.WiFiScript} } 01-01 07:20:36.410: INFO/ActivityManager(684): Start proc imats.wifi.script for activity imats.wifi.script/.WiFiScript: pid=12665 uid=10015 gids={} 01-01 07:20:36.410: DEBUG/AndroidRuntime(12656): Shutting down VM 01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM waiting for non-daemon threads to exit 01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM shutting VM down 01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread shutting down 01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread has shut down 01-01 07:20:36.410: DEBUG/jdwp(12656): JDWP shutting down net... 01-01 07:20:36.410: DEBUG/jdwp(12656): Got wake-up signal, bailing out of select 01-01 07:20:36.410: INFO/dalvikvm(12656): Debugger has detached; object registry had 1 entries 01-01 07:20:36.410: DEBUG/dalvikvm(12656): VM cleaning up 01-01 07:20:36.417: DEBUG/dalvikvm(12656): LinearAlloc 0x0 used 639228 of 4194304 (15%) 01-01 07:20:36.449: INFO/jdwp(12665): received file descriptor 10 from ADB 01-01 07:20:36.558: WARN/ResourceType(684): Failure getting entry for 0x7f020060 (t=1 e=96) in package 0: 0xffb5 01-01 07:20:36.847: INFO/ActivityManager(684): Displayed activity imats.wifi.script/.WiFiScript: 464 ms 01-01 07:20:41.894: DEBUG/dalvikvm(7502): GC freed 49 objects / 1968 bytes in 43ms Thanks, Asif On Feb 2, 3:33 pm, Asif k asifk1...@gmail.com wrote: which permission?? Can you please elaborate on this? In the logcat, I am not getting much specific information. Thanks, Asif On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com wrote: first thought that came to my mind is permission. ofcourse you can confirm that with logcat. On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote: Hi all, I am configuring wifi on my android based board using shell script. Now I want to execute the same script from android application. For that, I had used following code, but it didn't give any success till now, I had executed same script from adb shell prompt and it works nicely. Process exeCommands = Runtime.getRuntime().exec(/data/busybox/ board_script.sh); is there anything else required than this??? Please help.. Asif -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: activity cannot be resolved
Do you have a res/values/color.xml file with main_back_ground_color defined? Are you cleaning and rebuilding your project? It is necessary that bin and gen directories are recreated any time there is a change to resources such as colors.xml On Feb 2, 12:55 am, rakesh rakeshrap...@gmail.com wrote: int mainBackGroundColor = activity .getResources.getColor (R.color.main_back_ground_color); when iam trying to access a color resource iam getting activity cannot be resolved error in eclipse. how can this be resolved. 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
Re: [android-developers] Problem with TabActivity and ListActivity
And the Problem is If i want to start activity which is not specified in tabhost in above Java code,it is going out of tabactivity. ie.,It is not coming in tabactivity. 2)But i want to have all the activities under tabActivity. That is not possible, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com 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
Re: [android-developers] Market flood prevention
On Mon, Feb 1, 2010 at 11:23 PM, Bus Brothers busbroth...@gmail.com wrote: Hello We would like to be able to update our apps, but there are a large number of them and we are getting negative responses from other developers regarding market flooding. I think the other comments about usability were more important that the issue of market flooding. We would like to resolve this. Originally, we believed that updating the VersionCode WITHOUT updating the VersionName would resolve this and allow us to do a silent update that would not appear in the Just In section, It's highly doubtful that there's any way to do a silent update. We would like to get this resolved based on feedback from the community. What feedback have you gotten that supports your idea that there have to be 120+ separate applications? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: TextView scrollHorizontally doesn't work
Actually I have tried both marquee and scrollHorizontally. There was a previous topic that I responded to a couple of days ago with the marquee layout code (that also doesn't work). http://groups.google.com/group/android-developers/msg/5f466bd386877029 I was suspecting that some of the TextView attributes are only valid for EditText views. Is that right - and if so how do you know which TextView attributes are only valid for EditText views? This seems pretty basic - how to use a wide line of text on a small screen device. What are good ways to deal with this use case? On Feb 1, 5:31 pm, Romain Guy romain...@android.com wrote: scrollHorizontally enables user scrolling for editable text fields. If you want automatic scrolling, use android:ellipsis=marquee On Mon, Feb 1, 2010 at 3:11 PM, jotobjects jotobje...@gmail.com wrote: Is there a way to put a single line of static text into a TextView and allow the user to scroll over the part that is not initially visible? I have tried scrollHorizontally, but I get text that is truncated. This is the layout (that doesn't scroll). TextView android:id=@+id/wanttoscrollt android:layout_width=fill_parent android:layout_height=wrap_content android:singleLine=true android:ellipsize=end android:scrollHorizontally=true android:text=Blah blah andlongwordandmore /TextView I tried setting requestFocus/ in the layout and also tried calling requestFocus() in onCreate(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Splitting connections?
I have an app that runs on a closed network with no internet access. I connect to it through wifi. My app also uses Google Maps. Is there a way to make the MapView still pull from my 3G connection while the rest of the app uses the wifi? The issue is once connected to the wifi, maps tries to pull from the internet and can't get there so my MapView is always blank. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ANDROID_ID always null on devices
Hi, Is there a way to populate the id without having to get into the market? This sounds a very strange policy. Seems that google only thinks that the consumer will use Android, and they forgot about the companies that will just install their applications and nothing else (example: Sales Force Application). :-( thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: device shaked? accelerometer once more
Try a band-pass filter. Remove the low frequencies (such as the constant 1 g falling) and the high frequencies (such as bumping and vibrating). Look up digitial filters. Chances are some simple 24 line algorithm will do the trick. I'm going to try myself using the accelerometer demo app when I get some time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ANDROID_ID always null on devices
That's interesting. Is ANDROID_ID only null on the emulator because the market application is not available on the emulator? On Feb 2, 9:42 am, guich guiha...@gmail.com wrote: Hi, Is there a way to populate the id without having to get into the market? This sounds a very strange policy. Seems that google only thinks that the consumer will use Android, and they forgot about the companies that will just install their applications and nothing else (example: Sales Force Application). :-( thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Play Mp3 while on Camera Vie
Hey guys and gals, I am trying to add a bit of a narration in the form of augmented reality to the application I am building. In essence the user will be looking through his/her handset to a location X and I want an MP3 file or WAV or whatever format to play while the camera view finder is up (like the augmented reality apps except instead of overlaying images and widgets I need to overlay audio) Anyone know a way to do this? Thanks! Sincerely Jose C Gomez http://www.josecgomez.com Sent from Jacksonville, Florida, United States -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Aligning webview and buttons...
Anyone have anything? On Feb 1, 8:37 pm, Breezy mbre...@gmail.com wrote: I want to put two buttons (not HTML) at the top of my view and the webview below it... Almost like frames in HTML, except the top frame is android XML code, not an HTML frame. I can get it somewhat like I want, but whenever the HTML page is too big it goes up and under my buttons, but at the bottom of the buttons I want the top of the webview to start, all the time. And the webview can scroll if necessary. Here's what I got, but it's not doing exactly what I was hoping for RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent RelativeLayout android:id=@+id/webviewbox android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignParentBottom=true WebView android:id=@+id/webview android:layout_width=wrap_content android:layout_height=wrap_content android:scrollbars=none / /RelativeLayout Button android:id=@+id/button1 android:text=B1 android:layout_height=wrap_content android:layout_width=100px android:layout_alignParentLeft=true / Button android:id=@+id/button2 android:text=B2 android:layout_height=wrap_content android:layout_width=100px android:layout_alignParentRight=true / /RelativeLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Play Mp3 while on Camera Vie
Hey guys and gals, I am trying to add a bit of a narration in the form of augmented reality to the application I am building. In essence the user will be looking through his/her handset to a location X and I want an MP3 file or WAV or whatever format to play while the camera view finder is up (like the augmented reality apps except instead of overlaying images and widgets I need to overlay audio) Anyone know a way to do this? It should just work, assuming you're creating your own camera preview. Just use MediaPlayer or AsyncPlayer or something for the voiceover. -- Mark Murphy (a Commons Guy) http://commonsware.com 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] Writing files SDCard on Emulator
Hello, I'm a beginner in Android and request any help on the following. I'm trying to use an SDCard loaded on to the Emulator and store files programmatically. The code snippet is as below public class Downloader { public Downloader(String path) { this.path=sanitize(path); Log.d(DEBUG,The File Path is + path); } public String sanitize(String path) { if (!path.startsWith(/)) { path = / + path; } return Environment.getExternalStorageDirectory().getAbsolutePath() +path; } public void start() throws IOException { // Check if Media is mounted else throw IOException String state = Environment.getExternalStorageState(); if(state != Environment.MEDIA_MOUNTED) { Log.d(DEBUG, The Card is Not Mounted + state +--); throw new IOException (SD Card is not Mounted. It is in + state); } } With the above code I'm able to see the The Card is Not Mounted -- message in the logcat. I'm making use of the following permissions in the manifest.xml uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ Questions 1. Are there additional permissions to be included? 2. The Downloader.java is a helper class whose object is being used in a Receiver. Does giving the receiver the WRITE_EXTERNAL_STORAGE would also enable Downloader.java to access the SDCard 3. Any other suggestions Best Regards Acer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Writing files SDCard on Emulator
1. Are there additional permissions to be included? No. 2. The Downloader.java is a helper class whose object is being used in a Receiver. Does giving the receiver the WRITE_EXTERNAL_STORAGE would also enable Downloader.java to access the SDCard The permission should be for your application, not for an individual component. Moreover, I don't think you would get this message just for this permission being missing. 3. Any other suggestions Are you sure your emulator has an SD card image? They don't by default. -- Mark Murphy (a Commons Guy) http://commonsware.com 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: Droid Video Recorder
that is what it is. It doesn't make sense to me either. There has to be a way around this from Google (if you guys are hearing). Abhi On Feb 2, 10:41 am, Kevin Duffey andjar...@gmail.com wrote: Ahh..interesting. That would REALLY suck if Google/Android is allowed to access that resolution but our own apps can't. That wouldn't make much sense to me. On Tue, Feb 2, 2010 at 4:26 AM, Abhi abhishek.r.sha...@gmail.com wrote: Hi Kevin You sure can record videos at that resolution but only with the in- built camcorder app in Droid. Try writing your own recorder app and you will see the difference. Abhi On Feb 1, 7:20 pm, Kevin Duffey andjar...@gmail.com wrote: I believe the video can be taken up to 640 x 480 at 30fps.. but not sure of this. I shot some videos of my kids in the snow yesterday and I gotta say I was very impressed with the quality. It was a bit cloudy, so the end result was a little dark, but short of very fast panning actions, it came out great. On Mon, Feb 1, 2010 at 1:00 PM, Abhi abhishek.r.sha...@gmail.com wrote: Hi, I am trying to create a Video recorder but it looks like the video resolution is limited to 320 x 240. I tried changing it through MediaRecorder.setVideoSize() to something higher (e.g. 640 x 480) but gives me the same result. Is there a way to record video at higher quality? Also, when I try using the CAMERA as VideoSource instead of DEFAULT, the app force closes. MediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT) Am I doing something wrong? Which is the best configuration (encoding options?) to give the best video quality? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Writing files SDCard on Emulator
Hello Mark, Thank You for your reply. Regarding your question .Are you sure your emulator has an SD card image? They don't by default Yes I think it has SD card image as I'm able to see the same through DDMS File Explorer when I startup the emulator. However, when I try and access it through Downloader.java I get Card Not Mounted. Best Regards Acer On Tue, Feb 2, 2010 at 11:33 PM, Mark Murphy mmur...@commonsware.comwrote: 1. Are there additional permissions to be included? No. 2. The Downloader.java is a helper class whose object is being used in a Receiver. Does giving the receiver the WRITE_EXTERNAL_STORAGE would also enable Downloader.java to access the SDCard The permission should be for your application, not for an individual component. Moreover, I don't think you would get this message just for this permission being missing. 3. Any other suggestions Are you sure your emulator has an SD card image? They don't by default. -- Mark Murphy (a Commons Guy) http://commonsware.com 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: device shaked? accelerometer once more
Print out a sensor name and google up the datasheet ( it's bosh sensortec BM 150 or like it ) - as you may guess it's not the best and finest chip out there. Resolution is pretty low, and it is noisy ( +- 8g is pressed into 8 bit ) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: BitmapFactory.decodeByteArray gives pixelated bitmap
But that restriction is only for your mobile network. Chances are it works well for your customers who are not bound to such a restriction. Maybe your network tries to have you sign up for a better data-package plan, that does not have this restriction... ? :-) On Feb 2, 11:32 am, michael michael.d.peder...@googlemail.com wrote: Hi again, So I finally figured out that the problem is due to my mobile network operator doing image compression to save bandwidth. I discussed the problem further at the following URL, in case it could be of help to anybody: http://stackoverflow.com/questions/2183808/android-bitmapfactory-deco... I don't suppose there is anything I can do to get around this, but if anybody has an idea, it would be much welcome (-: Best, Michael. On Feb 1, 10:22 pm, michael michael.d.peder...@googlemail.com wrote: Hi, You are resaving a JPEG. You'll be compressing twice. Why don't you try to directly save the data obtained from the URL to a file on the SDCard. Don't do any compressing. Just a direct save of the JPG file from Flickr. Thanks for the suggestion! However, saving the bitmap to a JPEG file was really just to illustrate thepixelationproblem - I assumed there would be no quality loss with the quality parameter set to 100. What I'm actually doing is to draw the bitmap downloaded from Flickr onto a canvas in the onDraw method of my View class: Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); canvas.drawBitmap(bitmap, 0, 0, paint); Pixelationsimilar to that shown in my example pictures then occurs. Any idea why this would be the case? Note that bitmaps loaded from my project resources draw just fine using this approach; although if I downscale using the Bitmap.createScaledBitmap() method, a similarpixelationproblem occurs. This problem was discussed e.g. here: http://stackoverflow.com/questions/2041207/android-quality-of-the-ima... but none of the suggested solutions seem to improve the situation in my case. Thanks again for your suggestions, I really hope there is a solution to this issue. Best, Michael.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: getChildAt sometimes giving wrong child at particular position?
The getChildAt(x) method of a list-view does not return the view of item number 'x'. It returns, more or less, the 'x'th visible child- view of your list-view. If you want to access an item amongst all your possible items that can be shown in your list-view, you have to access it throug the list- view's adapter (ListAdapter class, BaseAdapter class, etc). On Feb 2, 10:42 am, pink 444 pnk...@gmail.com wrote: Hi, I have a listactivity in which i am displaying list of items more than 8 items.Thus there is scroll bar eneabled. When i click on list items some times getChildAt returing wrong View from the list. Why is it happening like that and how can i prevent from happening? 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: APK not visible in market for HTC Tattoo Android Phone ?
Hi, I'm having the same issue. Is it needed any additional configuration? thanks in advance, Pablo On 7 ene, 13:25, Mark Wyszomierski mar...@gmail.com wrote: Hi, I'm trying to verify this - my app has the following in its manifest: supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / uses-sdk android:minSdkVersion=3 android:targetSdkVersion=5 / uses-feature android:name=android.hardware.camera / but it still does not appear fortattoo. Is there something else we need to add? It does have a camera, right? Thanks On Dec 30 2009, 11:15 am, Sena Gbeckor-Kove s...@imkon.com wrote: Hi, It does indeed only show apps which are compatible with the device. S On 30 Dec 2009, at 17:13, croco wrote: moneytoo thanks, You exactly answered what i want to know!! because android would have been the first software to not ensure ascending compatibility if i had to have to build ;) I just hope is the unique reason why it does not appear ontattoo. Saying that just because i would be surprised that the market search done by users check on the fly only the apk compatible with device. If it is able to do that on the fly WoW this is the god OS. Thank you. Croco On Dec 30, 12:40 pm, moneytoo m...@seznam.cz wrote: Just build your app using 1.6 SDK and add the supports-screens tag. Your app will be visible on devices 1.5 and later if you use uses-sdk android:minSdkVersion=3 / and will work as long you don't use 1.6 specific API. On Dec 30, 12:23 pm, croco zeug...@gmail.com wrote: Thank you Sena for your hint, i developped my app on version 3 uses-sdk android:minSdkVersion=3 / the supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / is for 1.6 + sdk Does it mean a 1.5 based APK is not visible on market for low density device? If the device are 1.6 + android based no problem i will update the APK sdk but if some remain on 1.5 does it mean i need to version of my app which i think it is impossible for package name rule on Android Market. Thank you. Croco On Dec 30, 10:54 am, Sena Gbeckor-Kove s...@imkon.com wrote: Thetattoohas a low density screen if I remember correctly. Your application would have to support low density screens explicitly for it to show up in the market. Regards S On 30 Dec 2009, at 10:38, croco wrote: Hi all, I'm reporting byTattoousers than my game World of Bombs author zeugame is not available onTattoo+ Android Market 1.6? I really don't have idea what's wrong with this configuration? Personally i'veHTCmagic + Android Market 1.6 and it rocks like for severals thousands registered account on the game. If some otherTattoousers could confirm please? And over all why it is not visible in the market and how to solve this? Need to contact Google? Thank you for your help. Best Regards Croco -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- Sena Gbeckor-Kove CTO/Founder - imKon UK : +44 7788 146652 NL : +31 62 434 1290 s...@imkon.com | www.imkon.com Asia (Singapore) : 35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, Singapore Europe (London) : 145-157 St John's St, EC1V 4PY London, UK smime.p7s 3KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- Sena Gbeckor-Kove CTO/Founder - imKon UK : +44 7788 146652 NL : +31 62 434 1290 s...@imkon.com | www.imkon.com Asia (Singapore) : 35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, Singapore Europe (London) : 145-157 St John's St, EC1V 4PY London, UK smime.p7s 3KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What does a good app review look like?
I'm biased since you guys actually have reviewed my app, but I think you have some interesting ideas. Here are some of my observations with respect to reviews. 1. Reviews always result in a significant bump up in sales/downloads. It actually doesn't matter whether the review was positive or negative all that much. I've sometimes seen more early play from a review that is mostly negative in tone than from one that is gushing. Definitely balance between the pros and cons helps to lend legitimacy. 2. Format of the review DOES seem to matter. I've noticed that longer more detailed reviews tend to have more legs in the long run. Also, reviews that are well organized with lots of screen shots or other media seem to deliver more hits. 3. Reviews that include interviews help to personalize the application and the brand. I think that more devs need to put their face on their apps and develop personal loyalty. Schwimmer, Coryat and others come to mind as doing this successfully. It's not vanity, it's branding. On Jan 30, 2:11 am, AppRoasters revi...@approasters.com wrote: What does a good application review look like? From a dev's perspective, it's whatever brings the users. From the user's perspective, things need to be informative and entertaining at the same time. We're trying to carve a niche out for app reviews at approaster.com, but I'm really interested in hearing devs perspectives on what makes a good review. What's the right length? How much information is too much? How long do you get activity out of a review? Thanks for your input! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Writing files SDCard on Emulator
Regarding your question .Are you sure your emulator has an SD card image? They don't by default Yes I think it has SD card image as I'm able to see the same through DDMS File Explorer when I startup the emulator. However, when I try and access it through Downloader.java I get Card Not Mounted. A better test is to bring up the AVD Manager (run tools/android from your SDK, or Windows|Android and AVD Manager from Eclipse). From there, highlight your AVD and click the [Details...] button. If the emulator has an SD card image, it will appear just above the horizontal line. -- Mark Murphy (a Commons Guy) http://commonsware.com 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: Speech Recognition Problem
Hello Sai, I tested it using wifi and I tested for only english. I tried changing the default to be french and I tested it in Toronto and it worked fine. So I don't think the default language is the reason. The issue, I believe, is the communication with the google server. Once I start the speech recognition in Paris and say a word I do not get any responses back using the getStringArrayListExtra (RecognizerIntent.EXTRA_RESULTS) method. I also do not get any error. Is there any other setting I need to change because I am in France instead of North America? I will be heading back to Paris in a couple of weeks to do some more testing hopefully I will find the root of the problem before this. Any suggestions would be great. Thanks, Petar K On Jan 27, 4:31 pm, nutricheck sai...@gmail.com wrote: Hi Petar As far I know the Recognizer intent has a default language setting to EN_US and talks to google servers forspeechdata. So two questions arise 1) Did you have internet connectivity (wifi or 3G) when you did this ? 2) You tested yourspeechfor English and not French ? I would like to know what you find.. Have a great day ! Sai On Jan 26, 3:29 pm, Petar K. petar.krama...@gmail.com wrote: Hello, I have an issue that I have ran into and was wondering if anyone can help. I recently developed an app (Android 1.6) that uses speechrecognitionto detect what the user is saying. Based on what the user says certain options are displayed. When I ran my app in North America (Toronto, Canada to be exact) everything runs fine and there is no issue.SpeechRecognitionworks perfectly and it detects exactly what I say. However I recently went to Paris, France and tested my app, this time unfortunately theSpeechRecognitiondid not work. I did not receive any error or anything, it simply did not recognize what I was saying. If anyone can provide me with any assistance that would be great. Thanks. Petar K. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] 3 dots at the end of the string in strings.xml
I saw a strings.xml file and one of the entries in the xml was as follows string name=testStringthis is a long string to test .../string Why is there a space followed by 3 dots in the entry? Is that a shortcut for ellipsizing the 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: 3 dots at the end of the string in strings.xml
I think it's just three dots (periods). As far as i know, these mean nothing special. On Feb 2, 2:37 pm, Rohit mord...@gmail.com wrote: I saw a strings.xml file and one of the entries in the xml was as follows string name=testStringthis is a long string to test .../string Why is there a space followed by 3 dots in the entry? Is that a shortcut for ellipsizing the 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: Wakelock and phone restarts
It seems there is a conflict between call forwarding and wakelock... Can someone test this out please? If you have a service which implements a wakelock (partial for my case), try enabling the call forward option in the settings when the service is running in the background... and please let me know here if the phone keeps restarting.. Please help people... On Feb 2, 10:51 am, nikhil nik...@gmail.com wrote: It seems there is some conflict between my service and call forwarding. Whenever I have my service running in the background, after I enable call forwarding the phone restarts and the keeps restarting. Has anyone experienced this? On Feb 2, 10:26 am, nikhil nik...@gmail.com wrote: What can cause thephoneto restart ? On Jan 28, 11:18 am, nikhil nik...@gmail.com wrote: Hello Friends, I have a service which holds on to a wakelock and the code is similar to this, public class WakeLockService extends Service { PowerManager.WakeLock wl; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } public void onCreate() { PowerManager pm = (PowerManager) getSystemService (Context.POWER_SERVICE); wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK, My Tag); wl.acquire(); } public void onDestroy() { wl.release(); } For past two days, myphonehas been restarting randomly...Today it was worse, it kept restarting untill I uninstalled the app. I tried to search about this behaviour online and found that too many wakelocks may coz thephonetorestart. Can there be any other reason? Is the above code right? Should make wl as a final variable? Does the service call onDestroy method whenphoneshuts down? I am using a broadcastreceiver to start my service at boot up as well. Any help would be appreciated. Thank You So 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: scrollHorizontal problem on TextView
I also want to know how to scroll a textview without it getting the focus. I was just thinking - what if there is a purely touch device that has no trackball - how will a user be able to focus on anything then? Rohit On Jan 31, 4:18 pm, jotobjects jotobje...@gmail.com wrote: I have run into a similar problem. Apparentlyfocusis required to get ellipsize=marquee or scrollHorizontal=true to operate. I haven't found where that is documented? Can anyone point that out? Bigger problem is I have one line TextView and even giving itfocus doesn't allow it to scroll. What am I doing wrong here: TextView android:id=@+id/wanttoscrollt android:layout_width=fill_parent android:layout_height=wrap_content android:singleLine=true android:ellipsize=marquee android:text=Blah blah andlongwordandmore /TextView I tried setting requestFocus/ in the layout and also tried calling requestFocus() in onCreate(). I always wind up with static text that is truncated. :( My objective is to put some wide text into a narrow TextView and allow the user to see (but not change) the part that is not initially visible. On Dec 17 2009, 9:47 pm, sathya subbiah sathya.subbia...@gmail.com wrote: Hi, I am trying to draw a text view which always scroll though it does not have focusin it. But the text view does not support the same. Have any one tried such thing? Pls let me know if any thing can be done for the same. Thanks Regards, Sathya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Start Call Log Activity Using Intent
Hi, Please help me, can we start Call Log Activity using the Intent. Below is the my code i try to start Call Log Activity using the Intent but not able to success. Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setData(android.provider.CallLog.CONTENT_URI); //*Not Working* // i.setData(android.provider.CallLog.Calls.CONTENT_URI); *//Working* * Fine*, *It will open Dialer* // i.setData(android.provider.Contacts.People.CONTENT_URI); *//Working **Fine, It will open Favorites* startActivity(i); Please help me if you have any solution.. Thanks Jaydip -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en