[android-developers] ListView issue (Editors?)
Hi all, I would like to have a listview (or a spinner) that uses an EditText as it's view. This appears to work well until I click on the editText and the soft keyboard is displayed. What results is that the screen is now redisplayed using the remaining part of the screen but the focus always jumps to a field outside of the list view. I assume from this, that whilst the keyboard is popping up, the listView has removed my EditText and then redisplays it after the keyboard has popped up and moved the focus. Swing had the concept of editor cells which were always available to counteract this issue. Is there a similar concept in Android? Or is there a better way to do what I'm trying to do? I appreciate your comments, Peter Carpenter. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 icons of Menu items
Hi, I have a problem with showing icons for menu items. The items which appear when I click on menu button are having icons but When I click on More option in Menu, The newly shown menu items are not having any icons even though I have set the icons for these items in my xml. Thanks, Shashidhar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Simple Key Event Questions
okay thanks Dianne. You have been great help! One more question(sorry to keep troubling you): Is there any way to have my OWN softkeyboard just for one application. Eg: I have an EditText. I want a custom softkeyboard to show only when I edit this text box only in my app. I dont want it to be used for any other apps. OR is there is way to disable the popping up of the system IME when I click an EditText? Cheers, Earlence On Sep 7, 10:34 am, Dianne Hackborn hack...@android.com wrote: I've told you what there is. On Mon, Sep 6, 2010 at 9:25 PM, Tez earlencefe...@gmail.com wrote: I mean to say that is there any other measurable parameter the IM framework provides? On Sep 7, 9:08 am, Dianne Hackborn hack...@android.com wrote: I have been try to say -- no. The information you are asking for doesn't even exist. There are no key events. On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote: Thank you for the quick reply. So now, coming back to my original problem, is there ANY way that you can think of to receive the information I need without writing a custom IME? Cheers, Earlence On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote: KeyListener is (generally) only for physical keyboards. It may not even be used for those -- an IME has first crack at hard key events and may do its own massaging of them and do calls on its InputConnection. (Consider for example a Chinese IME that converts input on a hard keyboard to Chinese text.) As far as where data goes... it depends on what you are talking about. The general flow for touch input is: - MotionEvent delivered to IME window. - IME makes calls on the target InputConnection based on the touch data. - The InputConnection calls appear in the target app, which for a TextView performs the appropriate editing of its text. On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote: and another thingin all these key interactions, (physical or IME), am I correct in assuming that all data must pass thru the Framework classes like WindowManagerService, KeyInputQueue etc? Cheers, Earlence On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote: You can't get that from the IME. What you get is edit operations via calls on InputConnection. You will need to implement your own keyboard in your app if you want to monitor individual interactions with it. On Sun, Sep 5, 2010 at 4:18 AM, Tez earlencefe...@gmail.com wrote: Biometric Measure with neural nets: Key stroke patterns. For that I need data about how something was typed in: Eg: EARLENCE 1. time for which each key was pressed. 2. interval between consecutive key presses. Cheers, Earlence On Sep 4, 10:44 pm, Dianne Hackborn hack...@android.com wrote: You can override EditText to return your own InputConnection. But... if you want KeyEvents, you won't get KeyEvents. Period. There are no KeyEvent objects involved in this ANYWHERE. At all. The user is touching on the screen (that is a touch event). The IME turns that into an edit operation on the TextView (that is a call to InputConnection). No KeyEvent. What you are claiming to want to do simply doesn't make sense. Let's back up here and see what you are actually trying to accomplish? Not timing between two key events. What is the goal you are trying to achieve? On Sat, Sep 4, 2010 at 6:55 AM, Tez earlencefe...@gmail.com wrote: How do I intercept the InputConnection Calls? Would I have to modify the IME or use a custom one? Having text change listeners would not be of use as I need key timing information. This I can only get thru KeyEvents. Cheers, Earlence On Sep 4, 12:39 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com wrote: 1. I have registered a KeyListener on an EditText. When I use the soft keyboard to input text, my listener is not called. How Do I intercept these events? InputConnection is how edit operations are delivered through an IME. These will appear as direct edits of the text in the EditText, so to watch that you either need to intercept the InputConnection calls or have listeners for text changes. 2. How do I measure time interval between KeyEvents. The methods
[android-developers] Disconnect Incoming Call in Android
hello frnds i m trying to disconnect incoming call from my application. i have done with Automatic Answer with this code Intent new_intent = new Intent(Intent.ACTION_MEDIA_BUTTON); new_intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent( KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_HEADSETHOOK)); getApplicationContext().sendOrderedBroadcast(new_intent, null); but now i want to disconnect call in some situation. how can achieve this in android. Plz help me... Thanks and Regrads bhavesh -- B!-!/-\\/!=$!-! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Recommendation for an Application with tons of media files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/6/10 18:50 , Frank Weiss wrote: I was thinking in using the sd card storage. That's a good idea. But, I don't want the user to accidentally remove the media files. I want it to be private, not accesible to possible deletions. How might a user accidently remove them? Why is this a concern? Definitely a 160MB apk is not a good idea. Go for the sdcard, and add just a consistency check for all the stuff, if you're worried about deletions. Keep in mind that most users won't use a file manager and thus it's not probable that they mess around with your data. - -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. java.net/blog/fabriziogiudici - www.tidalwave.it/people fabrizio.giud...@tidalwave.it -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyFKoQACgkQeDweFqgUGxcyKwCgie6CTEeIY77K9kkWMaMYXROh 3LwAnRQG4IneGWRStazk9Jtsykv1P+rS =hk3x -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] location NOT working correctly in droid after the upgrade to 2.2
Now I'm going to guess, but if you open www.google.com from your phone's browser, you can see your location info below the search input (and I think that's what he is talking about). Best regards, Filip Havlicek 2010/9/7 Frank Weiss fewe...@gmail.com However, when I use the google search or use the browser and check for the location . It shows a different a zipcode ( city). Sorry, I don't understand those two use cases (google search and browser) how they relate to location? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: PhotoViewer
I am new in Android. Can you help me how to put GridView ? ~Dhrumil On Tue, Sep 7, 2010 at 11:07 AM, AJ ajeet.invinci...@gmail.com wrote: If you want to display photo one by one then take FrameLayout, else you can take GridLayout. Hope this helps. Thanks, AJ On Sep 7, 10:26 am, dhrumil dhrumilsh...@gmail.com wrote: Hello, Is there anybody who has a knowledge about Photo Viewer in Android. If I want to develop one photo viewer then how can I do this?? ~Dhrumil -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Upgrade my Game Application
Hello, Hope you all got what I mean to develop. Please give me suggestions for upgrading my game. ~Dhrumil On Mon, Sep 6, 2010 at 6:45 PM, { Devdroid } webnet.andr...@gmail.comwrote: On 6 September 2010 14:42, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hi Sandeep, I try to change it, but it shows an error like this: error: Error: Float types not allowed (at 'versionCode' with value '1.1'). You should not change things you do not understand in hope it will work even you do not know why. There's clear error message quoted above and there's manual you shall read to get what value is valid there: http://developer.android.com/guide/publishing/versioning.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: Do someone know which application controls USB connected notification
BTW .. what do you mean with USB connection notification ? I assume you meant USB Debugging connected ? This means that you have a running usb profile with adb support. But you can also have a device with different profiles without adb .. i.e mtp or pictbridge. If want to learn more about the notification look into the new redesigned vold, he listens for a sysfs entry and informs other parts of the system. Good luck ! Frank On 7 Sep., 04:01, I-Sheng Lin ckjboy2...@gmail.com wrote: Hi all, i am not trying to disable the notification just want to know which application controls it. Does this application come with every android phone? i assume the answer is yes. correct me if i am wrong. Thanks Regards -- I-Sheng Lin(Sam) +886-929-052-222 For every action, there is an equal and opposite criticism. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: List Item (a view) order changes unexpextedly while (fast) scrolling in a ListView
Hi 1) I'm still not sure why you're doing the measuring yourself (as I'd use a layout xml file to declare the list item's View, and then inflate it/set the values in the adapter's getView() call. 2) I'm guessing that since you are using an adapter and the view holder, that there's an issue with how your getView() method is implemented (or perhaps another implementation of an adapter method). That is, as you know the view holder allows object reuse; that doesn't mean to say that the object that you're re-using has the correct values in it. It's only there to avoid the expensive inflation/ construction; after that point you're expected to set the values in that object (for the list item) as per the data in the array/list/ structure that is backing the adapter. On Sep 7, 3:55 am, rious.delie rious.de...@gmail.com wrote: thank you, 1) yes, it is anitemon alistview, i populate some numbers of it on alistview. 2) i need to set the height of theviewon runtime, because the height of theviewis the variable of width (height = f(width)), it is just as simple as the TextView, which can determine how many lines needed to show the text based on a function of display width, each font width, and the text to be displayed. Yes, i have implemented an adapter (an extends of ArrayAdapter) and have used ViewHolder (static class ViewHolder()), my point is, why bitmap1changesorderrandomlywhilebitmap2 stays where it should be, something like this: alistview= view1 = bitmap1 = hai i am bitmap1 in view1 bitmap2 = hai i am bitmap2 in view1 view2 = bitmap1 = hai i am bitmap1 in view2 bitmap2 = hai i am bitmap2 in view2 view3 = bitmap1 = hai i am bitmap1 in view3 bitmap2 = hai i am bitmap2 in view3 view4 = bitmap1 = hai i am bitmap1 in view4 bitmap2 = hai i am bitmap2 in view4 view5 = bitmap1 = hai i am bitmap1 in view5 bitmap2 = hai i am bitmap2 in view5 i scroll fastly, then theorderof bitmap1changes: view1 = bitmap1 = hai i am bitmap1 in view4 bitmap2 = hai i am bitmap2 in view1 view2 = bitmap1 = hai i am bitmap1 in view5 bitmap2 = hai i am bitmap2 in view2 view3 = bitmap1 = hai i am bitmap1 in view2 bitmap2 = hai i am bitmap2 in view3 view4 = bitmap1 = hai i am bitmap1 in view1 bitmap2 = hai i am bitmap2 in view4 view5 = bitmap1 = hai i am bitmap1 in view3 bitmap2 = hai i am bitmap2 in view5 moreover, theorderrandomchangesappearwhilei scroll thelistview fastly, if i gently scroll it slowly the problem is not occured, it seems that the problem is not on the code, (is it a bug on android platform?) On Sep 6, 2:17 pm, jamesc jame...@gmail.com wrote: OK. I've had a quick look. 1) I take it that yourView(MyView) is theitemin theListView? 2) Why are you doing the measuring (and implementing onDraw())? I would have thought that you should be using a layout to declare the ListViewitemand then backing that with a BaseAdapter implementation (where you should look at using the viewholder pattern to allow re- use of inflated objects. On Sep 6, 5:15 am, rious.delie rious.de...@gmail.com wrote: somebody please... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Verification of a signed apk
Hi all, I have signed my apk using the command keytool –genkey –v –keystore sourcebits.keystore –alias CoolApp – keyalg RSA –validity 1 and I want to verify the signature when ever my application runs. Is there any code for verifying the signature of the apk? thanks and regards Jyothi Swaroop Dantu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Upgrade my Game Application
I'm having trouble understanding your question, what isn't being upgraded? The code? Have you tried logging some debug text? Are you using the emulator? How are you installing your app. Also, please use pastebin to post code. On Mon, Sep 6, 2010 at 11:55 PM, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hello, Hope you all got what I mean to develop. Please give me suggestions for upgrading my game. ~Dhrumil On Mon, Sep 6, 2010 at 6:45 PM, { Devdroid } webnet.andr...@gmail.com wrote: On 6 September 2010 14:42, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hi Sandeep, I try to change it, but it shows an error like this: error: Error: Float types not allowed (at 'versionCode' with value '1.1'). You should not change things you do not understand in hope it will work even you do not know why. There's clear error message quoted above and there's manual you shall read to get what value is valid there: http://developer.android.com/guide/publishing/versioning.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] parsing kml
hi all, i change my kml to xml and place it at Res/xml/test.xml. I tried this XmlResourceParser x = this.getResources().getXml(R.xml.test); but it return null. So how do i parse a kml? I want to display it as listview. and also ulimately use it on a map. below is a copy of the kml.http://maps.google.com/maps/ms? ie=UTF8hl=envps=1jsv=260doe=UTF8msa=0msid=106069377598790155454.0004720325247dc0c953aoutput=kml bryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problems with library projects
I've been looking everywhere and can't find a solution. I am using Eclipse to develop an Android app which links to two Android Library Projects in the same workspace. But every time I start eclipse it goes inactive (grey overlay) and says in the status bar: Android Library link creation: (0%) They way I found it solves it is by deleting the links manually from the default.properties file and then adding them. It seems to work but it's not ideal to have to do that everyday. Anybody knows a solution for this issue? Many thanks in advance. PD: I also found this error in the logs that may have something to do with this: org.eclipse.core.runtime.CoreException: Project target not loaded yet. at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source) at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source) at com.android.ide.eclipse.adt.internal.build.ResourceManagerBuilder.build(Unknown Source) at org.eclipse.core.internal.events.BuildManager $2.run(BuildManager.java:627) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: 170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: 201) at org.eclipse.core.internal.events.BuildManager $1.run(BuildManager.java:253) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: 256) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java: 309) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java: 341) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java: 140) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java: 238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 icons of Menu items
AFAIK, in the More option the icons are never shown. You can see that also in several apps (Google Map, the browser, etc.). On Tue, Sep 7, 2010 at 8:19 AM, Shashidhar shashi.zep...@gmail.com wrote: Hi, I have a problem with showing icons for menu items. The items which appear when I click on menu button are having icons but When I click on More option in Menu, The newly shown menu items are not having any icons even though I have set the icons for these items in my xml. Thanks, Shashidhar -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Reading precomputed vertex arrays in application?
One bizarre option you might want to consider is pre-generating Java files with arrays in them. It benchmarked faster than reading files in via Java NIO when I tested it for my purposes. I'm only doing 2D, though. I use a script that takes a bunch of individual graphics files and puts them into a couple atlas textures, then pre-generates the texture coordinates for the two triangles needed to draw each graphic. So each pre-generated atlas texture has a pre-generated Java file with an array of all the useful texture coordinate sets for it, and constants for the offset into the array to use to get them for a particular graphic. On Sep 6, 7:33 pm, SChaser crotalistig...@gmail.com wrote: My app has large vertex arrays that are pre-computed before I even build the app for distribution. I'd like to store these in assets (recognizing the size limits of asset files) and read them in with minimal computation. Can I store them in binary, and just read them into an NIO buffer, and then wrap it for GL, or do I have to go through the whole compute intensive (?) process of reading it in, making a byte array, and converting that to an integer (in this case) array? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MatrixCursor accross process impossible to parceleable.
Hello, How it's possible to use AIDL to create a MatrixCursor in the server, and retrive the cursor in client ? 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] ClassNotFoundException crash reports from Market
The user messages are not really helpful sadly :( closed fails to install properly on my Droid Motorola (tested it on a Droid myself - tried Android 2.1 and 2.2 and it worked just fine) wont let me open etc.. On Tue, Sep 7, 2010 at 6:04 AM, TreKing treking...@gmail.com wrote: On Mon, Sep 6, 2010 at 6:28 AM, Tauno Talimaa tau...@gmail.com wrote: I'm seeing some strange crash reports in Android Market and I can't really tell how this could be caused by our application. I have a single report of java.lang.VerifyError for one of the Activities in my app that's declared in the manifest. I also have one that failed to find the GeoPoint class that's in the Google Maps library. Seems like some crazy sh*t happens on user devices. Do you have any reasonable user messages? Does it say what platform and and Android version? (Mine's just Other, so useful!) - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Error during sms deletion.
I solved it. It was my mistake in app code. Sorry for that. On Sep 1, 12:35 am, San sanees...@gmail.com wrote: Are you facing this problem always? Or is this happening only when you try to delete a message as soon as you receive it. On Aug 31, 3:33 am, Pobudzio pobudkiewicz.mac...@gmail.com wrote: Hi, I have problem with deletion sms with messageId=0. I can't delete such a message. There is no problem with deletion other messages but first message taken from inbox has always message Id=0 and I can't delete it. I use code below for deletion. Uri SMS_CONTENT_URI = Uri.parse(content://sms); Uri deleteUri = Uri.withAppendedPath(SMS_CONTENT_URI, String.valueOf(smsList.get(currentSmsIndex).getId())); int count = context.getContentResolver().delete(deleteUri, null, null); Do you have any idea? Regards, Pobudzio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: CPU usage stats
Hi, Maybe you could have a look at com.android.server.ProcessStats :) Cheng On 6 sep, 17:33, Andy a...@fendley.com wrote: Hi everyone, Does anyone know of a direct api that allows access to CPU usage statistics for different applications/tasks running inside android? All I can find is data available by accessing a file /proc/stat but this seems a little cumbersome. ActivityManager holds data about processes/tasks etc but no CPU usage stats. Many thanks for any help. Andy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Upgrade my Game Application
I send my code. In that code, I want to put Bouncing Ball. But I am not getting how to put it. I am very much thankful for you if you are helping me. ~Dhrumil On Tue, Sep 7, 2010 at 12:41 PM, Miguel Morales therevolti...@gmail.comwrote: I'm having trouble understanding your question, what isn't being upgraded? The code? Have you tried logging some debug text? Are you using the emulator? How are you installing your app. Also, please use pastebin to post code. On Mon, Sep 6, 2010 at 11:55 PM, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hello, Hope you all got what I mean to develop. Please give me suggestions for upgrading my game. ~Dhrumil On Mon, Sep 6, 2010 at 6:45 PM, { Devdroid } webnet.andr...@gmail.com wrote: On 6 September 2010 14:42, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hi Sandeep, I try to change it, but it shows an error like this: error: Error: Float types not allowed (at 'versionCode' with value '1.1'). You should not change things you do not understand in hope it will work even you do not know why. There's clear error message quoted above and there's manual you shall read to get what value is valid there: http://developer.android.com/guide/publishing/versioning.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Wrong format from String.format()
String.format(%1$02d:%2$02d, m, s); values ,m=0, s=11 -- .0:11 expected result : 00:11 Actual result from android for Arabic Language : .0:11 Analysis : The android external\icu4c for locale based number pattern ,It just replacing the zeroDigit() for padding values only ,the input values(m,n) remain same as US locale for arabic decimalPatternChars are below DecimalFormatSymbols- localeData.decimalPatternChars: ٠#٫٬؛٪؉ا٫- from above pattern the zeroDigit is \0660 (Arabic 0 digit) So the output comes as mixed of the arabic US digits - .0:11 Is it a bug in Android?! On Sep 7, 1:18 am, greg sep...@eduneer.com wrote: Did you want the 1$ and 2$ inside the field width specifications? On Sep 6, 3:27 am, GPU gopuraj...@gmail.com wrote: Hi , passing two int values m =0 s = 11, to below function String formatted = String.format(%1$02d:%2$02d, m, s); returning the value like .0:11 ,What could be the problem ? m=0, s=11 -- .0:11 m=0, s=1 -- .0:.1 The 0 added to format the string always coming as '.' (dot). Can anyone know ,from where the number patterns are getting loaded in Android ? I gone thorough the code ,Its related the following file , android\dalvik\libcore\icu\src\main\java\com\ibm\icu4jni\util \Resources.java -localeData.numberPattern How the pattern for particular locale is loaded ,what could be the problem for the above 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
Re: [android-developers] Upgrade my Game Application
You did not answer any of my questons, did you try logging? Are you using the emulator? How are you installing your app? We're not going to waste our time running or reading badly formatted code without a good description of the problem. On Tue, Sep 7, 2010 at 1:30 AM, Dhrumil Shah dhrumilsh...@gmail.com wrote: I send my code. In that code, I want to put Bouncing Ball. But I am not getting how to put it. I am very much thankful for you if you are helping me. ~Dhrumil On Tue, Sep 7, 2010 at 12:41 PM, Miguel Morales therevolti...@gmail.com wrote: I'm having trouble understanding your question, what isn't being upgraded? The code? Have you tried logging some debug text? Are you using the emulator? How are you installing your app. Also, please use pastebin to post code. On Mon, Sep 6, 2010 at 11:55 PM, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hello, Hope you all got what I mean to develop. Please give me suggestions for upgrading my game. ~Dhrumil On Mon, Sep 6, 2010 at 6:45 PM, { Devdroid } webnet.andr...@gmail.com wrote: On 6 September 2010 14:42, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hi Sandeep, I try to change it, but it shows an error like this: error: Error: Float types not allowed (at 'versionCode' with value '1.1'). You should not change things you do not understand in hope it will work even you do not know why. There's clear error message quoted above and there's manual you shall read to get what value is valid there: http://developer.android.com/guide/publishing/versioning.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Turning off Android notifications.(Battery/Bluetooth)
Hi, My first question is about low battery notification. I would like turn off this popup which oocurs when battery is low during my application is on. I can catch of course Intent.ACTION_BATTERY_LOW but additionaly Android show me this popup. Is it possible to turn it off? Second topic is about turning on bluetooth. When I turn it on using API system show me additional popup asking if I agree to turn on bluetooth module by this application. Is it possible to turn off this popup. I have HTC Legend on which popup occures and my friend has Motorola Milestone on which it doesn't occur. So probably it's only in HTC Andoid implementation. regards, Pobudzio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Upgrade my Game Application
Hello Miguel, Sorry for my fault. -I write my code in Eclipse platform and run in Android SDK version = 1. -I tried to debug it but I am not getting my solution. I think the problem is overlapping of CANVAS. How to solve overlapping canvas problem. ~Dhrumil. On Tue, Sep 7, 2010 at 2:07 PM, Miguel Morales therevolti...@gmail.comwrote: You did not answer any of my questons, did you try logging? Are you using the emulator? How are you installing your app? We're not going to waste our time running or reading badly formatted code without a good description of the problem. On Tue, Sep 7, 2010 at 1:30 AM, Dhrumil Shah dhrumilsh...@gmail.com wrote: I send my code. In that code, I want to put Bouncing Ball. But I am not getting how to put it. I am very much thankful for you if you are helping me. ~Dhrumil On Tue, Sep 7, 2010 at 12:41 PM, Miguel Morales therevolti...@gmail.com wrote: I'm having trouble understanding your question, what isn't being upgraded? The code? Have you tried logging some debug text? Are you using the emulator? How are you installing your app. Also, please use pastebin to post code. On Mon, Sep 6, 2010 at 11:55 PM, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hello, Hope you all got what I mean to develop. Please give me suggestions for upgrading my game. ~Dhrumil On Mon, Sep 6, 2010 at 6:45 PM, { Devdroid } webnet.andr...@gmail.com wrote: On 6 September 2010 14:42, Dhrumil Shah dhrumilsh...@gmail.com wrote: Hi Sandeep, I try to change it, but it shows an error like this: error: Error: Float types not allowed (at 'versionCode' with value '1.1'). You should not change things you do not understand in hope it will work even you do not know why. There's clear error message quoted above and there's manual you shall read to get what value is valid there: http://developer.android.com/guide/publishing/versioning.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] pixel to dpi and scaling question
Hi, I was reading multiple screen support page on SDK doc for solving a pixel to dpi scaling problem in my app. In the doc, it says // Convert the dips to pixels final float scale = getContext().getResources().getDisplayMetrics().density; mGestureThreshold = (int) (GESTURE_THRESHOLD_DIP * scale + 0.5f); My question is why we have to add 0.5f at the end? It indeed works great on high density screen but failed to match the result on medium density screen. For medium density screen, I have to remove the +0.5f. In addition. according to the doc, px - dpi conversion works like px = dpi x (density/160) and there is no mentioning of adding additional 0.5 at the end. Does anybody know why and how it works? 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: ClassNotFoundException crash reports from Market
I also have one that failed to find the GeoPoint class that's in the Google Maps library. Maybe that's related to one that puzzled me too. A knowledgable user informed me that some ROMs just use a stub for the maps package, there isn't actually a library there. Hence your app loads OK but crashes when you try to use map classes apparently. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can I delete the black shadow above framelayout in the tabwidget
Hello everyone, I have a problem with the tab widget. There is a shadow above the framelayout that's part of the tabwidget. How can I modify or delete this shadow. My layout looks like that 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 android:background=@color/ bright_blue LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content android:visibility=invisible android:clickable=false / TextView android:id=@+id/template_description android:layout_marginBottom=10dp android:textColor=@color/ dark_grey android:layout_width=fill_parent android:layout_height=wrap_content/ FrameLayout android:id=@android:id/tabcontent android:padding=0dp android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/bright_blue android:tabStripEnabled=false / /LinearLayout /TabHost I tried a couple of thinks like deleting the padding, changing the background, the parameter android:tabStripEnabled=false and setting up the tabhost tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 0; tabHost.getTabWidget().getChildAt(0).getLayoutParams().width = 0; tabHost.getTabWidget().getChildAt(0).setVisibility(TabHost.INVISIBLE); tabHost.getTabWidget().getChildAt(0).setHorizontalFadingEdgeEnabled(false); tabHost.getTabWidget().getChildAt(0).setPadding(0, 0, 0, 0); tabHost.getTabWidget().getChildAt(0).setBackgroundColor(R.color.bright_blue); but nothing worked at all. Can someone help me out. Thats would be great. I invest two days in this stuff. Thanks a lot Phil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Applanet
I don't know how many are aware of this: http://www.applanet.net/Forums/ Some guys developed an application which is an alternative Market. They pride themselves in being able to allow users to install paid app without spending money. They also ask for donations to keep developing it. I'm quite sure there is the ground for sueing them... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to check if a user defined service is already running
In ActivityManager there's a getRunningServices call. However, someone will likely soon appear on this thread to say that you shouldn't use it because 'that's not the intended use'. Shortly after, someone else will chip in with 'maybe the fact that your having difficulty with this tells you that Android wasn't really designed for this type of thing'. Pent p.s. I can confirm the call is not reliable, I ended up having to use a static flag. On Sep 7, 4:51 am, sunny menon1...@gmail.com wrote: Dear Folks, I have a service that is running within the context of my application. It gets invoked at the start of the activity and then gets update when new data is inserted or deleted from the database. The problem is that everytime I start the activity , it restarts the service. As you may have guessed - not a very intuitive design. Therefore I was wondering if there is a way to determine if the service is already running before starting it. I know I can bind to the service but I do not want that since the main activity needs to exits after the database operation is completed. I know for system services, you can get the service details from the application context. How do you do it for user defined service? thanks for all help here. regards Sunny. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Method to check Mediaplayer in Idle state
Hi, Is there any method to check whether the mediaPlayer is in Idle state. We can check the mediaPlayer in started state by using isPlaying(). Like that any method is there, to check whether the mediaPlayer is in Idle state. Nithin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Reading precomputed vertex arrays in application?
Lance, That's a good idea, though often times for 3D Models you'll need a few different object groups of given name to be loadable. You can simple insert them into a HashMap and serialize the whole thing. It deserializes surprisingly fast, especially if all you're storing are ints or floats for the data. If your data is less structured or more linear, you could certainly write up something to generate a java source file with the data in it like you said. It's probably going to load nearly the fastest, though it requires a little more programming than serialization does. I'm moving on to proprietary binary file formats in C now though since they are the smallest and I ran into a major asset size issue on Deadly Chambers which wouldn't have happened had I used my own format. On Sep 7, 2:48 am, Lance Nanek lna...@gmail.com wrote: One bizarre option you might want to consider is pre-generating Java files with arrays in them. It benchmarked faster than reading files in via Java NIO when I tested it for my purposes. I'm only doing 2D, though. I use a script that takes a bunch of individual graphics files and puts them into a couple atlas textures, then pre-generates the texture coordinates for the two triangles needed to draw each graphic. So each pre-generated atlas texture has a pre-generated Java file with an array of all the useful texture coordinate sets for it, and constants for the offset into the array to use to get them for a particular graphic. On Sep 6, 7:33 pm, SChaser crotalistig...@gmail.com wrote: My app has large vertex arrays that are pre-computed before I even build the app for distribution. I'd like to store these in assets (recognizing the size limits of asset files) and read them in with minimal computation. Can I store them in binary, and just read them into an NIO buffer, and then wrap it for GL, or do I have to go through the whole compute intensive (?) process of reading it in, making a byte array, and converting that to an integer (in this case) array? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I delete the black shadow above framelayout in the tabwidget
It just happend when I use a tabactivity group! On 7 Sep., 11:36, DaPhilz daph...@googlemail.com wrote: Hello everyone, I have a problem with the tab widget. There is a shadow above the framelayout that's part of the tabwidget. How can I modify or delete this shadow. My layout looks like that 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 android:background=@color/ bright_blue LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content android:visibility=invisible android:clickable=false / TextView android:id=@+id/template_description android:layout_marginBottom=10dp android:textColor=@color/ dark_grey android:layout_width=fill_parent android:layout_height=wrap_content/ FrameLayout android:id=@android:id/tabcontent android:padding=0dp android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/bright_blue android:tabStripEnabled=false / /LinearLayout /TabHost I tried a couple of thinks like deleting the padding, changing the background, the parameter android:tabStripEnabled=false and setting up the tabhost tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 0; tabHost.getTabWidget().getChildAt(0).getLayoutParams().width = 0; tabHost.getTabWidget().getChildAt(0).setVisibility(TabHost.INVISIBLE); tabHost.getTabWidget().getChildAt(0).setHorizontalFadingEdgeEnabled(false); tabHost.getTabWidget().getChildAt(0).setPadding(0, 0, 0, 0); tabHost.getTabWidget().getChildAt(0).setBackgroundColor(R.color.bright_blue); but nothing worked at all. Can someone help me out. Thats would be great. I invest two days in this stuff. Thanks a lot Phil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Themes and styles
OK, found a working solution - no idea if it was indented that way, SDK documentation is very fuzzy and incomplete in this area... To stay with my example: In attrs.xml, define the CSS class ;): resources attr name=headline format=reference / /resources In styles.xml, define the style to use for each theme: style name=Theme.Android.Black parent=android:Theme.Black item name=android:textViewStyle@style/textForBlack/item item name=headline@style/headlineForBlack/item /style style name=Theme.Android.Light parent=android:Theme.Light item name=android:textViewStyle@style/textForLight/item item name=headline@style/headlineForWhite/item /style In the layout, refer to the attribute with ?: TextView . style=?headline / Hope this helps other people with similar problems... On a related topic: Does anybody have an idea how to support themes from external (ZIP?) files including the required drawables? Or, in other words, user skins. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ClassNotFoundException crash reports from Market
yeah, that sounds reasonable for GeoPoint - but in my case I'm not using the MapsAPIs at all - Android just can't find my Application class for some reason :/ On Tue, Sep 7, 2010 at 12:36 PM, Pent tas...@dinglisch.net wrote: I also have one that failed to find the GeoPoint class that's in the Google Maps library. Maybe that's related to one that puzzled me too. A knowledgable user informed me that some ROMs just use a stub for the maps package, there isn't actually a library there. Hence your app loads OK but crashes when you try to use map classes apparently. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Stagefright Mediaextractor: how to detect interlaced streams in video files?
Hi, Is it possible to detect scan type (progressive or interlaced) of a video file in stagefright? I see below listed fields are query-able with metadata of file through stagefright, but not scan-type which i guess is avaiable in MP4 file header. Any hint on how to detect scan-type of video file at Stagefright player driver? Or is it available in opencore?? Thanks, Deva PS. From .\frameworks\base\include\media\stagefright\MetaData.h enum { kKeyMIMEType = 'mime', kKeyWidth = 'widt', kKeyHeight= 'heig', kKeyChannelCount = '#chn', kKeySampleRate= 'srte', kKeyBitRate = 'brte', kKeyESDS = 'esds', kKeyAVCC = 'avcc', kKeyVorbisInfo= 'vinf', kKeyVorbisBooks = 'vboo', kKeyWantsNALFragments = 'NALf', kKeyIsSyncFrame = 'sync', kKeyIsCodecConfig = 'conf', kKeyTime = 'time', kKeyDuration = 'dura', kKeyColorFormat = 'colf', kKeyPlatformPrivate = 'priv', kKeyDecoderComponent = 'decC', kKeyBufferID = 'bfID', kKeyMaxInputSize = 'inpS', kKeyThumbnailTime = 'thbT', kKeyAlbum = 'albu', kKeyArtist= 'arti', kKeyAlbumArtist = 'aart', kKeyComposer = 'comp', kKeyGenre = 'genr', kKeyTitle = 'titl', kKeyYear = 'year', kKeyAlbumArt = 'albA', kKeyAlbumArtMIME = 'alAM', kKeyAuthor= 'auth', kKeyCDTrackNumber = 'cdtr', kKeyDiscNumber= 'dnum', kKeyDate = 'date', kKeyWriter= 'writ', }; -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] launching new instance --- Urgent help needed
Hi, I have two activities.A and B. A starts B.Both are running in the screen and both are visible. Say now B is visible. On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front. But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file. Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me. Thanks in advance. Regards, Revathi K J Ramanan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] launching new instance --- Urgent help needed
Have you tried to develop this? If yes, paste ur code ~Dhrumil On Tue, Sep 7, 2010 at 4:15 PM, Revathi K J Ramanan revathiramana...@gmail.com wrote: Hi, I have two activities.A and B. A starts B.Both are running in the screen and both are visible. Say now B is visible. On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front. But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file. Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me. Thanks in advance. Regards, Revathi K J Ramanan -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] launching new instance --- Urgent help needed
See this: http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT -- Kostya 07.09.2010 14:45, Revathi K J Ramanan пишет: Hi, I have two activities.A and B. A starts B.Both are running in the screen and both are visible. Say now B is visible. On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front. But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file. Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me. Thanks in advance. Regards, Revathi K J Ramanan -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: java.lang.NullPointerException when trying to edit strings.xml
try using eclipse 3.5 it is more stable and faster than 3.6, some times 3.6 is freezes for 3-6 sec. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: PhotoViewer
Where are you want to put GridView, you want add images to grid or display grid in Activity? Look here: http://developer.android.com/resources/tutorials/views/hello-gridview.html On 7 Вер, 09:52, Dhrumil Shah dhrumilsh...@gmail.com wrote: I am new in Android. Can you help me how to put GridView ? ~Dhrumil On Tue, Sep 7, 2010 at 11:07 AM, AJ ajeet.invinci...@gmail.com wrote: If you want to display photo one by one then take FrameLayout, else you can take GridLayout. Hope this helps. Thanks, AJ On Sep 7, 10:26 am, dhrumil dhrumilsh...@gmail.com wrote: Hello, Is there anybody who has a knowledge about Photo Viewer in Android. If I want to develop one photo viewer then how can I do this?? ~Dhrumil -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Re: Black spinner in progressbar
Just an update relating to this subject. The color of the the spinners depends on the theme you're using. So when you use a Black theme (default) the Inverse Spinners will be white and vice-versa, not exactly the way i said before. On Aug 30, 5:27 pm, fr4gus fggar...@gmail.com wrote: Thanks! :) On Aug 26, 12:28 pm, Gonçalo Ferreira monx...@gmail.com wrote: Check out here. http://developer.android.com/reference/android/R.attr.html#progressBa... Just change thestylefor one of those in that link. The attributes with the suffix Inverse are black spinners, usually for light backgrounds. On Aug 19, 7:15 pm, fr4gus fggar...@gmail.com wrote: Hi all, I want to use a small spinner for an indeterminate progress bar. So I added this to my screen: ProgressBar android:id=@+android:id/ConnectionProgress style=?android:attr/progressBarStyleSmallTitle android:layout_width=wrap_content android:layout_height=wrap_content / But it shows a white spinner. I looked at SDK folder, and I saw there is also a black spinner. Is it possible to indicate to user the black spinner instead of white spinner?. I want an elegant form of using that spinner that already exists in Android, but looks I may have to copy the image to my proyect and create the animation, and set it in indeterminate drawable Any ideas? Thanks in advance for any help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How does Android determine whether to move the layout up when showing the softkeyboard?
Hi Dianne, thanks for your reply. You'd need to set your view hierarchy to not correctly resize to adjust to its window How can I 'achieve' that (setting a view hierarchy that wouldn't correctly resize)? But even if the view hierarchy would be correctly set, why would it resize at all? It shall not. I definitely didn't set any flag regarding window resizing, neither in code nor in xml. What's especially weird here: if I hide my ListView by setting it to View.INVISIBLE, so that it even takes the same space(!) as if it would when View.VISIBLE, the behaviour is different: the window does *not* resize. And all I did here was changing the visibility-attribute, no changes to any window attribute or flag regarding resizing. You can see an updated screenshot here - to compare the activity when the ListView is visible(1) and invisible(2) and it's behaviour when I press the search button. http://img819.imageshack.us/img819/9330/screenshotsearch.png As you can see, there are definitely also other elements in the layout that require some space (i.e. the black footer bar), and also since I just set the listView to 'invisible' rather than 'gone', I cannot find a logic explanation for the different behaviour. Possibly a bug? XML Layout: http://pastebin.com/5zzVxjbK (ListView has android:id=@+id/category_questions) Thanks, Mathias On Sep 7, 11:28 am, Dianne Hackborn hack...@android.com wrote: The window is just resized if you set it to resize mode. You'd need to set your view hierarchy to not correctly resize to adjust to its window, which is... questionable. On Mon, Sep 6, 2010 at 7:57 PM, Mathias Lin m...@mathiaslin.com wrote: Hi Ed, On Sep 7, 6:25 am, Ed edscha...@gmail.com wrote: Instead of View.INVISIBLE try View.GONE. Sorry, you misunderstood. View.INVISIBLE was just for testing purposes to see if it makes any differences. In my app I cannot hide the elements of course, I need them there to be visible to the user. I just wanted to point out that by setting View.INVISIBLE to the listView, the behaviour I want (the layout to stay fix) can be achieved, but I am wondering *why* ? What's the logic behind it? (So both View.INVISIBLE and View.GONE already have the same desired effect; but I *do* want to show the element to the user of course.) http://developer.android.com/reference/android/view/View.html Also in your scroll view layout try setting android:fillViewport=true on the scroll view. The scroll view works fine, with the scrollView, the layout remains fix (what I want); I want the layout that uses the *ListView* to stay fixed as well when I press the search button. I also already tried to set android:isScrollContainer=false to the list view, but it makes no difference either. (ListView doesn't have a fillViewport attribute) Mathias Ed On Sep 7, 12:03 am, Mathias Lin m...@mathiaslin.com wrote: Interestingly though: when I set my ListView visibility to View.INVISIBLE in my first activity, then the layout doesn not get moved up anymore! This is my layout/xml: 1)http://pastebin.com/5zzVxjbK ListView where layouts is been moved up by the softkeyboard 2)http://pastebin.com/KFtPuHvP ScrollView/LinearLayout, where layout remains fix by the softkeyboard On Sep 6, 8:48 pm, Mathias Lin m...@mathiaslin.com wrote: How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode=adjustResize|adjustResize| adjustUnspecified exists, as described herehttp:// developer.android.com/guide/topics/manifest/activity-element.h... , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea:http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout:http://i.imgur.com/UNXPz.png (I'm not
Re: [android-developers] Problem with icons of Menu items
Correct. The overflow menu, like context menus, do not show icons. On Tue, Sep 7, 2010 at 3:46 AM, YuviDroid yuvidr...@gmail.com wrote: AFAIK, in the More option the icons are never shown. You can see that also in several apps (Google Map, the browser, etc.). On Tue, Sep 7, 2010 at 8:19 AM, Shashidhar shashi.zep...@gmail.com wrote: I have a problem with showing icons for menu items. The items which appear when I click on menu button are having icons but When I click on More option in Menu, The newly shown menu items are not having any icons even though I have set the icons for these items in my xml. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: CPU usage stats
On Tue, Sep 7, 2010 at 4:25 AM, CHENG LUO stand...@gmail.com wrote: Maybe you could have a look at com.android.server.ProcessStats :) That is not part of the Android SDK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Gallery popup menu
Hi, In common Android Gallery you can see nice popup menu, Gallery--- menu(More) or menu (Share). Enyone know how to implement such kind of menu? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Turning off Android notifications.(Battery/Bluetooth)
On Tue, Sep 7, 2010 at 4:39 AM, Pobudzio pobudkiewicz.mac...@gmail.com wrote: My first question is about low battery notification. I would like turn off this popup which oocurs when battery is low during my application is on. I can catch of course Intent.ACTION_BATTERY_LOW but additionaly Android show me this popup. Is it possible to turn it off? I see no evidence that ACTION_BATTERY_LOW is an ordered broadcast, in which case you cannot turn it off. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Gallery popup menu
On Tue, Sep 7, 2010 at 7:37 AM, viktor victor.scherb...@gmail.com wrote: In common Android Gallery you can see nice popup menu, Gallery--- menu(More) or menu (Share). Enyone know how to implement such kind of menu? I assume you are referring to the context menu you get from long-tapping on an item. You can add such a menu to any widget you want in your activity: http://developer.android.com/guide/topics/ui/menus.html#context-menu -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dynamic Buttons Onclick
Hi. I have some dynamic buttons that are being generated inside a for loop. for (int i = 0; i 5 ; i++) { Button aUIXButton = new Button (SecondPage.this); aUIXButton.setClickable(true); aUIXButton.setText(X); aUIXButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { aUIXButton.setText(Y); }}); } This is not working. It says Cannot refer to a non-final variable aUIXButton inside an inner class defined in a different method wants to change the modifier of aUIXButton to final I don't want to do that. Does anyone know how can I fix this? Thank you, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to abort slow array sorting
I sort very long array with Collections.sort method. This is done in a worker thread. I need to abort the sort. I didn't find how I can do this, Comparator.compare does not seem to allow throwing any exception and I didn't find how I can set any flag to abort the sort. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] launching new instance --- Urgent help needed
Or you can simply call finish() in your activity B. This will close activity B and will bring back the old activity A. On Tue, Sep 7, 2010 at 12:45 PM, Revathi K J Ramanan revathiramana...@gmail.com wrote: Hi, I have two activities.A and B. A starts B.Both are running in the screen and both are visible. Say now B is visible. On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front. But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file. Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me. Thanks in advance. Regards, Revathi K J Ramanan -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dynamic Buttons Onclick
Right. The scope of aUIXButton is the inside of the loop, it does not persist until the later point in time when OnClickListener subclass is invoked. Moreover, the value of aUIXButton refers to all five buttons, one by one, as the loop rolls. Use this instead: aUIXButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { * Button button = (Button) arg0; button.setText(Y); *}}); -- Kostya 07.09.2010 16:00, Sara Khalatbari ?: Hi. I have some dynamic buttons that are being generated inside a for loop. for (int i = 0; i 5 ; i++) { Button aUIXButton = new Button (SecondPage.this); aUIXButton.setClickable(true); aUIXButton.setText(X); aUIXButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { aUIXButton.setText(Y); }}); } This is not working. It says Cannot refer to a non-final variable aUIXButton inside an inner class defined in a different method wants to change the modifier of aUIXButton to final I don't want to do that. Does anyone know how can I fix this? Thank you, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to abort slow array sorting
07.09.2010 16:00, ls02 пишет: I sort very long array with Collections.sort method. This is done in a worker thread. I need to abort the sort. I didn't find how I can do this, Comparator.compare does not seem to allow throwing any exception and I didn't find how I can set any flag to abort the sort. You can throw a subclass of RuntimeException, even if the method signature doesn't allow it. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Audio Track play music problem
Once you address the file not found issue, you will discover that there is currently no API that allows you to read in audio files and decode them into a format that AudioTrack understands. Try MediaPlayer instead unless you really need to work at the sample level. On Sep 6, 6:52 pm, melo fredchou0...@gmail.com wrote: Hi all I'm an android starter I tused AudioTrack to play music But it just tell me filenotfoundexeception I try to play mp3 wav ogg (all in raw dir) I've no idea where is wrong? here are my code ~ Could any one tell me why? TKS in advance :) public class mainActivity extends Activity { private static final String Tag = audioRecorder; private static final boolean log = true; AudioTrack track = null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //if(AudioTrack.MODE_STATIC != mode AudioTrack.MODE_STREAM ! = mode) //throw new InvalidParameterException(); //String audioFilePath = R.raw.music; long fileSize = 0; long bytesWritten = 0; int bytesRead = 0; int bufferSize = 0; byte[] buffer; //AudioTrack track = null; int sampleRateHz = 8000;//22050 int audioFormat = AudioFormat.CHANNEL_CONFIGURATION_MONO; //int audioFormat = AudioFormat.CHANNEL_CONFIGURATION_STEREO; //int audioEncodingFormat= MediaRecorder.AudioEncoder.AMR_NB; int audioEncodingFormat= AudioFormat.ENCODING_PCM_16BIT; //int audioEncodingFormat= AudioFormat.ENCODING_PCM_8BIT; //int mode = AudioTrack.MODE_STATIC; int mode = AudioTrack.MODE_STREAM; File audioFile = new File(R.raw.test.ogg); fileSize = audioFile.length(); if(log)Log.d(Tag,Buffer size(+ mode +)); if(AudioTrack.MODE_STREAM == mode) bufferSize = AudioTrack.getMinBufferSize(sampleRateHz,audioFormat,audioEncodingFormat); else //AudioTrack.MODE_STATIC bufferSize = (int)fileSize; buffer = new byte[(int)bufferSize]; if(log)Log.d(Tag,track setting); track = new AudioTrack(AudioManager.STREAM_MUSIC,sampleRateHz, audioFormat,audioEncodingFormat, bufferSize,mode); // in stream mode, // 1. start track playback // 2. write data to track if(AudioTrack.MODE_STREAM == mode) { if(log)Log.d(Tag,MODE_STREAM:track.play()); track.play(); } FileInputStream audioStream = null; try{ audioStream = new FileInputStream(audioFile);//R.raw.music }catch(FileNotFoundException e) { e.printStackTrace(); Log.e(Tag,Error: + e.toString()); } if(log)Log.d(Tag,audioStream read); while(bytesWritten fileSize) { try { bytesRead = audioStream.read(buffer,0,bufferSize); }catch(IOException e){ Log.e(Tag,Error: + e.toString()); } if(log)Log.d(Tag,track write); bytesWritten += track.write(buffer,0,bytesRead); } // in static mode, // 1. write data to track // 2. start track playback if(AudioTrack.MODE_STATIC == mode) { if(log)Log.d(Tag,MODE_STATIC:track.play()); track.play(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] [Offtopic] I need a car to get to the Android Only! conference in Stockholm, help me win one!!!
Hi i would want to attend the Android Only! Conference in Stockholm but this is hard without a car, why dont you help me win a car? the man with the cigar thats me :D http://www.audia1.nu/Contest/My/586af7756a8c7e588d9432e299042474-1-2412 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: Gallery popup menu
Not exactly context menu, this menu seems like as balloon. I cant see this menu on emulator but on devise 2.2 is there. Go to Gallery, select poto, at bottom you can see option menu, there are More ... Share buttons. Click on any, balloon menu is appear!!! On 7 Вер, 14:41, Mark Murphy mmur...@commonsware.com wrote: On Tue, Sep 7, 2010 at 7:37 AM, viktor victor.scherb...@gmail.com wrote: In common Android Gallery you can see nice popup menu, Gallery--- menu(More) or menu (Share). Enyone know how to implement such kind of menu? I assume you are referring to the context menu you get from long-tapping on an item. You can add such a menu to any widget you want in your activity: http://developer.android.com/guide/topics/ui/menus.html#context-menu -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Place two buttons side by side
you can see an example here : http://soft-dev-pro.blogspot.com/2010/09/android-2-view-elements-side-by-side.html On Sep 5, 4:09 pm, Droid rod...@gmail.com wrote: Thanks for that easy reference, looks like its android:layout_alignParentRight=true or something like that. On Sep 5, 7:11 pm, Frank Weiss fewe...@gmail.com wrote: Try the hello views page:http://developer.android.com/intl/de/resources/tutorials/views/index And please do use the resources before asking questions :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to create a semi transparent image for the camera overlay?
Hello, i want to put a image on the camera overlay. But how to make the image semi-transparent? so that i can still see the camera view? Thanks Bryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] layar's platform
hi all, layar has this platform line-like image (See photo http://lifehacker.com/5357691/layar-brings-semi+augmented-reality-to-your-android-phone) that will adjust as the pitch of the phone increase or decrease. how do i create that image so that i can put on the camera overlay. How do i make it tilt as the sensor data changes? i know how to shift images on camera overlay but really have no idea how to start with this. can someone advise me? thanks bryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 import android.content.IntentReceiver;
Hi, If iam trying to import android.content.IntentReceiver; it shows error symbol not found. In which sdk it is available. I am trying with 2.2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can I stop File write operation when sdcard is going to be umounted
Hi, In my app, I need to do some file writing operations, such as saving bitmap to sdcard file: OutputStream fos = new FileOutputStream(new File(name)); bitmap.compress(Bitmap.CompressFormat.PNG, 0, fos); and it is implemented in a separate thread. I interrupt the thread by calling Thread.interrupt() when unmounting SD card, and receives the following log: E/vold( 1132): Killing process 7646 E/vold( 1132): process com.android.video (8654) has open file / sdcard/Android/data/com.android.video/cache/ _sdcard_video_video-2010-05-09-00-47-07.3gp.png It seems that I didn't close the thumbnail cache file, and it results in my process being killed. So my question is how can I stop File write operation before interrupt the thread? The android document says that using InterruptibleChannel can cause ClosedByInterruptException, so I tried to use: OutputStream fos = Channels.newOutputStream(new FileOutputStream(new File(cachePath)).getChannel()); [ see http://forward.com.au/javaProgramming/HowToStopAThread.html ] but it just didn't work, since no ClosedByInterruptException could be caught... So how can I close the open file before umounting SD card ? I think It's really very common. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView OnItemClickListener not working
Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simões gsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Gallery popup menu
On Tue, Sep 7, 2010 at 9:07 AM, viktor victor.scherb...@gmail.com wrote: Not exactly context menu, this menu seems like as balloon. I cant see this menu on emulator but on devise 2.2 is there. Go to Gallery, select poto, at bottom you can see option menu, there are More ... Share buttons. Click on any, balloon menu is appear!!! Ah. Well, here is a sample project that shows how to create balloons, though in the context of a map: http://github.com/jgilfelt/android-mapviewballoons You might also be able to pinch some code from the implementation of QuickContactBadge from the Android source code. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 import android.content.IntentReceiver;
On Tue, Sep 7, 2010 at 9:39 AM, saikiran n saikiran@gmail.com wrote: If iam trying to import android.content.IntentReceiver; it shows error symbol not found. In which sdk it is available. I am trying with 2.2 IntentReceiver was removed from the Android SDK about two years ago, replaced by BroadcastReceiver. You may wish to find newer sample code to replace wherever you found the reference to IntentReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 press menu key programmatically..
i am trying to open lock in my app . i think pressing menu key by code will do that...but i dont know how to do this so can anybody guide me for that.. -- thanks A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] glReadPixels() crashes on the HTC Desire
I appear to have found a bug in the Adreno 200 OpenGL driver which is used on the HTC Desire (among others). Specifically, if you're using a 32-bit config, and you call glReadPixels(), it crashes. I've got a bug containing a test case here: http://code.google.com/p/android/issues/detail?id=10825 I've tried this on two different kinds of device with the same OpenGL driver and it dies reliably on both --- but on a third device with a different driver it succeeds. It's interesting to note that the Khronos OpenGLES conformance tests use glReadPixels() a lot to check that the tests drew the right thing on the screen; which suggests that this driver never managed to pass the conformance tests in the first place... -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL signature.asc Description: OpenPGP digital signature
[android-developers] Re: Smoothing out a line on a canvas.
Perfect, thanks. On Sep 3, 2:40 pm, Romain Guy romain...@android.com wrote: Turn on antialiasing on the Paint used to draw the lines. On Fri, Sep 3, 2010 at 11:12 AM, tatebn brandonnt...@gmail.com wrote: I'm trying to draw out a race track in a map overlay. I have a series of locations that define the track. I have the drawing working fine just using canvas.drawLine() from one point to the next. But, understandably, this looks kind of choppy. Is there a decent way to smooth the line out? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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
Re: [android-developers] Re: ListView OnItemClickListener not working
Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Crash on gesture recognize
Thanks, I'm developing on 2.1 and 2.2. The gesture file was created on 2.1. It fails rarely on 2.1, but I haven't witnessed it with my 2.2 device, only got to see crash logs. I will investigate further, thanks! On Sep 5, 5:53 pm, Filip Havlicek havlicek.fi...@gmail.com wrote: Hi Mor, if it works with 99%, it's going to be hard. Right now I would try to determine conditions under which the error is thrown. For example, are you using the application on the same version of Android OS as you created the gesture file? I'm pretty sure it shouldn't be a problem, but who knows. Try to recreate the gestures file (on multiple versions of OS if possible). Aren't you using some deprecated methods? They might be fine when developing application on, let's say 1.6, but might be an issue when you deploy the application to 2.2. It might be a bug in the gestures framework, although I wouldn't go that far yet. Best regards, Filip Havlicek 2010/9/5 marmor gaz...@gmail.com Hi, Thanks for the response. I've done all preparations as done by Google's example, including the gesture file in res/raw. 99% of the time everything works fine, onGesturePerformed is called and I get right answers from the recognize function, but in some cases (haven't figured out which yet), I crash on the recognize call. BTW, I'm using a large gestures file, containing about 30 gestures, I don't think it's too big for android, because Google's gesture search contains all English letters and numbers at least. Any idea? Thanks, Mor @ Contapps. On Sep 3, 2:59 pm, Filip Havlicek havlicek.fi...@gmail.com wrote: Hi Mor, do you have your gestures file in res/raw directory? Do you have the necessary preparations done in your onCreate method? They are the same as in the example provided by Google, ie GestureLibraries.fromRawResource, GestureOverlayView gestures = findViewById and addOnGesturePerformedListener? That should be enough, works fine for me in the example. Best regards, Filip Havlicek 2010/9/3 marmor gaz...@gmail.com I got a crash with the following stack trace: E/AndroidRuntime( 6709): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 6709): java.lang.IllegalArgumentException: Comparison method violates its general contract! E/AndroidRuntime( 6709): at java.util.TimSort.mergeHi(TimSort.java: 864) E/AndroidRuntime( 6709): at java.util.TimSort.mergeAt(TimSort.java: 481) E/AndroidRuntime( 6709): at java.util.TimSort.mergeCollapse(TimSort.java:406) E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:210) E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:169) E/AndroidRuntime( 6709): at java.util.Arrays.sort(Arrays.java:2500) E/AndroidRuntime( 6709): at java.util.Collections.sort(Collections.java:1952) E/AndroidRuntime( 6709): at android.gesture.InstanceLearner.classify(InstanceLearner.java:84) E/AndroidRuntime( 6709): at android.gesture.GestureStore.recognize(GestureStore.java:134) E/AndroidRuntime( 6709): at android.gesture.GestureLibrary.recognize(GestureLibrary.java:64) E/AndroidRuntime( 6709): at com.contapps.android.search.SearchResults.onGesturePerformed(SearchResults. java: 130) Line 130 in my code is: ArrayListPrediction predictions = mLibrary.recognize(gesture); and it is the first line in onGesturePerformed(GestureOverlayView overlay, Gesture gesture). Any idea what's wrong and what checks can I perform on gesture before sending it to recognize to avoid this crash? Thanks, Mor @ Contapps. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.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%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
[android-developers] Do static variables of an ApplicationContext subclass left untouched when the process is killed?
Do static variables of an ApplicationContext subclass left untouched when the process is killed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Do static variables of an ApplicationContext subclass left untouched when the process is killed?
On Tue, Sep 7, 2010 at 10:37 AM, Agus agus.sant...@gmail.com wrote: Do static variables of an ApplicationContext subclass left untouched when the process is killed? When the process is killed, the Dalvik VM is also destroyed, and so all static data members or other objects are purged from the device. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ListView issue (Editors?)
On Tue, Sep 7, 2010 at 1:05 AM, Peter Carpenter peter.carpen...@skytechnologies.com wrote: Or is there a better way to do what I'm trying to do? Probably. Having an EditText in a Spinner (in particular) or ListView doesn't really make much sense, IMO. Consider poping up a dialog that has the EditText in it based on the Spinner / ListView item selection. Or better explain what you're trying to accomplish. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 check if a user defined service is already running
returns START_STICKY in your onStartCommand method of your service. On Mon, Sep 6, 2010 at 8:51 PM, sunny menon1...@gmail.com wrote: Dear Folks, I have a service that is running within the context of my application. It gets invoked at the start of the activity and then gets update when new data is inserted or deleted from the database. The problem is that everytime I start the activity , it restarts the service. As you may have guessed - not a very intuitive design. Therefore I was wondering if there is a way to determine if the service is already running before starting it. I know I can bind to the service but I do not want that since the main activity needs to exits after the database operation is completed. I know for system services, you can get the service details from the application context. How do you do it for user defined service? thanks for all help here. regards Sunny. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Mask password in landscape mode
Hi all, I've created custom ui component for pair label-editText. This component has to have possibility to mask password in editText field: InputItem extends LinearLayout { private TextView label; private EditText text; ... boolean isPassword = array.getBoolean(R.styleable.InputItem_isPassword, false); if (isPassword) { text.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); text.setTransformationMethod(new PasswordTransformationMethod()); } It works fine in portrait mode, but in landscape mode letters, entered in special popup form became visible (i.e. unmasked). It's possible just to reject this popup frame appearence text.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); but is it possible to mask password letters in this popup frame? -- Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ClassNotFoundException crash reports from Market
On Tue, Sep 7, 2010 at 2:55 AM, Tauno Talimaa tau...@gmail.com wrote: The user messages are not really helpful sadly :( Yeah, I hear you, pretty hard to get useful information from users without being able to ask them questions. On Tue, Sep 7, 2010 at 4:36 AM, Pent tas...@dinglisch.net wrote: A knowledgable user informed me that some ROMs just use a stub for the maps package, there isn't actually a library there. I did have a comment for that that said FC on Froyo ROM, so that makes more sense. On Tue, Sep 7, 2010 at 5:28 AM, Tauno Talimaa tau...@gmail.com wrote: yeah, that sounds reasonable for GeoPoint - but in my case I'm not using the MapsAPIs at all - Android just can't find my Application class for some reason :/ Yeah, that's weird. You may just have to wait until someone decides to email you about it. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dynamic Buttons Onclick
Thanks Kostya, Does anyone also happen to know how can we make a button that has been created dynamically set to wrap_content (as we do in the static mode) to make the *button fit* neatly around the text? Thank you, Sara On Tue, Sep 7, 2010 at 2:11 PM, Kostya Vasilyev kmans...@gmail.com wrote: Right. The scope of aUIXButton is the inside of the loop, it does not persist until the later point in time when OnClickListener subclass is invoked. Moreover, the value of aUIXButton refers to all five buttons, one by one, as the loop rolls. Use this instead: aUIXButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { *Button button = (Button) arg0; button.setText(Y); *}}); -- Kostya 07.09.2010 16:00, Sara Khalatbari пишет: Hi. I have some dynamic buttons that are being generated inside a for loop. for (int i = 0; i 5 ; i++) { Button aUIXButton = new Button (SecondPage.this); aUIXButton.setClickable(true); aUIXButton.setText(X); aUIXButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { aUIXButton.setText(Y); }}); } This is not working. It says Cannot refer to a non-final variable aUIXButton inside an inner class defined in a different method wants to change the modifier of aUIXButton to final I don't want to do that. Does anyone know how can I fix this? Thank you, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] Do static variables of an ApplicationContext subclass left untouched when the process is killed?
Thanks for the prompt reply Mark. If a Service is not running in the same process as the ApplicationContext, then the system will not try hard to keep the main process running (ApplicationContext) under low memory? Does the Service's onDestroy get called prior to the ApplicationContext's onTerminate() method? On Tue, Sep 7, 2010 at 7:49 AM, Mark Murphy mmur...@commonsware.com wrote: On Tue, Sep 7, 2010 at 10:37 AM, Agus agus.sant...@gmail.com wrote: Do static variables of an ApplicationContext subclass left untouched when the process is killed? When the process is killed, the Dalvik VM is also destroyed, and so all static data members or other objects are purged from the device. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Killi Process with files on SD card
i think the problem here is that you really do not known when the user is going to unmount the sdcard.. it can happen at any moment. so the only way is to make those open file closed, which seams to be difficult, especially for files read/written in a separate thread async... since i met with the the same problems, see http://groups.google.com.ni/group/android-developers/browse_thread/thread/a5ee991af46fd256?hl=en# and i searched in the group, but just did nou find any satisfying solution. i wounder is there any way to make open files closed? just to avoid the process being killed problems... 2010/9/7, Frank Weiss fewe...@gmail.com: Can this data be written sooner rather than later? Can you put it or part of it in SQLite, where it's quicker to update just a part of a large data model? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Do static variables of an ApplicationContext subclass left untouched when the process is killed?
On Tue, Sep 7, 2010 at 11:19 AM, Agus agus.sant...@gmail.com wrote: If a Service is not running in the same process as the ApplicationContext, then the system will not try hard to keep the main process running (ApplicationContext) under low memory? Each process has its own Application object. Unless you have really really really good reasons for it, do not run your service in a separate process, please. There is no ApplicationContext class in Android. Does the Service's onDestroy get called prior to the ApplicationContext's onTerminate() method? If something stops the service, yes. If Android kills the process, no. Having services linger in memory for no good reason is a quick path to one-star ratings on the Market, so hopefully you are promptly shutting down your services. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 press menu key programmatically..
i think pressing menu key Not sure what you mean by open lock, but the way to call the menu programmatically is : Activity.openOptionsMenu(); Good luck. Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Implicit intent - Same action for mutiple component how it works ?
Hi all, I am sorry that i may ask known questions to you all. But i couldnt figure out the exact understanding of implicit intents. When i was going through the tutorial i read about it. here are some important points to remember: 1 - Implicit Intents do not specify a target component 2 - Components willing to receive implicit intents have to declare their ability to handle a specific intent by declaring intent filters 3 - A component can declare any number of Intent Filters 4 - There can be more than one component that declares the same Intent Filters and hence can respond to the same implicit intent. In that case the user is presented both the component options and he can choose which one he wants to continue with 5- You can set priorities for the intent filters to ensure the order of responses. I read this about Implicit Intents. I couldnt get visualisation of 4th point. So wanted to try it out by writing some examples. I tested this like below. Wrote two apps. I had written two activities in one app, CallingActivity anotherActivity. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.localguide application activity class=.CallingActivity android:label=callingactivity intent-filter action android:value=android.intent.action.MAIN / category android:value=android.intent.category.LAUNCHER / /intent-filter /activity activity class=.anotherActivity android:label=anotheractivity intent-filter action android:value=com.android.localguide.GET_RESULT / category android:value=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest One more app,which has two activities like below. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.test android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.testmain android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.results intent-filter action android:name=com.android.localguide.GET_RESULT/ category android:name=android.intent.category.DEFAULT/ /intent-filter /activity /application /manifest I ran the first app in emulator and pressed home screen, it mean it runs in the background.(Not exited ) Then i opened the second app and clicked a button in frirst activity(testmain) and tried to call setAction com.android.localguide.GET_RESULT i.setAction(com.android.localguide.GET_RESULT); But it is opening the activity results.. It dint showed a options to choose which components( i expected first app ) activity i need to use ? Am i right in executing in the right context to understand that point no 4 ? Could anyone please elloborate on that point ? thanks, Mani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dynamic Buttons Onclick
07.09.2010 19:26, Sara Khalatbari пишет: Does anyone also happen to know how can we make a button that has been created dynamically set to wrap_content (as we do in the static mode) to make the /button fit/ neatly around the text? Use button.setLayoutParams http://developer.android.com/reference/android/view/View.html#setLayoutParams(android.view.ViewGroup.LayoutParams) with a subclass of LayoutParams appropriate for the button's parent layout (i.e. LinearLayout.LayoutParams or RelativeLayout.LayoutParams). Specify width and height as ViewGroup.LayoutParams.WRAP_CONTENT -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView OnItemClickListener not working
Hey Kostia, Thanks for your reply. I´ve already done it, but the method onItemClick is never called! I´ve read some stuff about focus, onTouchfocus but nothing changed the result. Each item in the listview is a view inflated from a layout which has TextViews and a button (in a relative layout). Any ideas why clicking on an item (view) doesn´t fire onItemClick? Thanks! On 7 set, 11:37, Kostya Vasilyev kmans...@gmail.com wrote: Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { �...@override public void onItemClick(AdapterView? parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ClassNotFoundException crash reports from Market
Hi all, I had both theses errors : ClassNotFound and VerifyError. Turns out I was using a class and/or a function that was not available in the 1.5 framework. In my manifest I have : uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/ uses-sdk And in my project properties I have checked the 1.6 framework. With both of these it did not trigger compiler error since the function existed in the 1.6 framework. I just went in the properties, checked the 1.5 framework. Errors were detected by the compiler, I found a way around them, then checked back 1.6 in the properties. It did the trick. Good luck. Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ListView OnItemClickListener not working
Gabriel, For what it's worth, here is my ListItem layout xml: http://pastebin.com/ZUDjF06r And this is the list adapter's getView method: http://pastebin.com/JWt5Wb40 Nothing special here, including any code to mess with view focus. I call setOnItemClickListener before setAdapter in the ListView. -- Kostya 07.09.2010 19:41, Gabriel Simões пишет: Hey Kostia, Thanks for your reply. I´ve already done it, but the method onItemClick is never called! I´ve read some stuff about focus, onTouchfocus but nothing changed the result. Each item in the listview is a view inflated from a layout which has TextViews and a button (in a relative layout). Any ideas why clicking on an item (view) doesn´t fire onItemClick? Thanks! On 7 set, 11:37, Kostya Vasilyevkmans...@gmail.com wrote: Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView?parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.comwrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] a bug in android gmail application
I have an implementation that just like gmail application, but have met some problem in some case. And I tested it on the real device of the gmail application. Seems they are caused by the same reason. ListView. Just go to the gmail application, scroll down to the last visible mail, and at this time, make sure the loading conversation at the bottom is still on. Then long press the last one mail, and the context menu show up. Then wait for the background email loading finish ( you can see that the scrollbar move up ). Then you do some action in the context menu, say read the mail. However, the show up mail is not the one that I long pressed. After some debug, I found that this should be related to ListView and its adapter's getView method, the convert view is reused when the context menu is shown, and in that case the listItemview has some field to record the index of the mail, while getView method is invoked, the field has been changed. Any one can provide a better way to solve this problem ? 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: ListView OnItemClickListener not working
Tried calling setOnItemClickListener before setAdapter but nothing :( final ListView lvList = (ListView) dialog.findViewById(R.id.lvList); lvList.setOnItemClickListener(new OnItemClickListener(){ @Override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { removeDialog(DIALOG_LOAD_ID); } }); lvList.setAdapter(new DBAdapter(this.getApplicationContext())); thanks once again, Gabriel On 7 set, 12:48, Kostya Vasilyev kmans...@gmail.com wrote: Gabriel, For what it's worth, here is my ListItem layout xml: http://pastebin.com/ZUDjF06r And this is the list adapter's getView method: http://pastebin.com/JWt5Wb40 Nothing special here, including any code to mess with view focus. I call setOnItemClickListener before setAdapter in the ListView. -- Kostya 07.09.2010 19:41, Gabriel Simões пишет: Hey Kostia, Thanks for your reply. I´ve already done it, but the method onItemClick is never called! I´ve read some stuff about focus, onTouchfocus but nothing changed the result. Each item in the listview is a view inflated from a layout which has TextViews and a button (in a relative layout). Any ideas why clicking on an item (view) doesn´t fire onItemClick? Thanks! On 7 set, 11:37, Kostya Vasilyevkmans...@gmail.com wrote: Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ListView OnItemClickListener not working
Ah, it seems you are using a dialog. I wonder if this makes any difference vs. an activity. -- Kostya 07.09.2010 19:58, Gabriel Simões пишет: Tried calling setOnItemClickListener before setAdapter but nothing :( final ListView lvList = (ListView) dialog.findViewById(R.id.lvList); lvList.setOnItemClickListener(new OnItemClickListener(){ @Override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { removeDialog(DIALOG_LOAD_ID); } }); lvList.setAdapter(new DBAdapter(this.getApplicationContext())); thanks once again, Gabriel On 7 set, 12:48, Kostya Vasilyevkmans...@gmail.com wrote: Gabriel, For what it's worth, here is my ListItem layout xml: http://pastebin.com/ZUDjF06r And this is the list adapter's getView method: http://pastebin.com/JWt5Wb40 Nothing special here, including any code to mess with view focus. I call setOnItemClickListener before setAdapter in the ListView. -- Kostya 07.09.2010 19:41, Gabriel Simões пишет: Hey Kostia, Thanks for your reply. I´ve already done it, but the method onItemClick is never called! I´ve read some stuff about focus, onTouchfocus but nothing changed the result. Each item in the listview is a view inflated from a layout which has TextViews and a button (in a relative layout). Any ideas why clicking on an item (view) doesn´t fire onItemClick? Thanks! On 7 set, 11:37, Kostya Vasilyevkmans...@gmail.comwrote: Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Trying to diagnose a Resource Not Found exception
I'm getting the following exception message: android.content.res.Resources$NotFoundException: Resource ID #0x7f070004 type #0x12 is not valid First, I'm not sure if this error is due to a bad resource ID or a bad resource type. The resource that is associated with this error is: R.id.chooseTableRowTextView, which I verified is equal to #0x7f070004. The id comes from the following xml: ?xml version=1.0 encoding=utf-8? LinearLayout android:id=@+id/chooseTabelRowLinearLayout android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; TextView android:text=None set android:id=@+id/ chooseTableRowTextView android:layout_width=wrap_content android:layout_height=wrap_content/TextView /LinearLayout I'm building a ListView which gets data from an ArrayAdapter. Since the ArrayAdapter data comes from a remote database query that can take a long time, I'm building the ArrayAdapter in an AsyncTask then calling setListAdapter from within AsyncTask.onPostExecute. The ArrayAdapter is built like this: tableListAdapter = new ArrayAdapterString(this,R.id.chooseTableRowTextView,tableNames); Where tableNames is the actual array of strings returned from the remote database. The exception comes sometime after I've done all the setup when the system is trying to draw the ListView. I'm at a loss how to debug from here. Any suggestions? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Monkey Questions
Hi, Once I start up monkey from the shell like: adb shell monkey --port 1080 Then, If I write normal java code to establish a connection to 127.0.0.1:1080 (on the device itself) and then issue monkey commands from there? I have tried this and I am able to create a socket, but to get the response, I wait for an awfully long time and nothing happens. Why this behavior? Cheers, Earlence -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: how to press menu key programmatically..
maybe he means unlock the screen by pressing the menu key. i think you cannot achieve it by your app, since the key event is poped up by the system and delivered to upper layer apps. 2010/9/7, Yahel kaye...@gmail.com: i think pressing menu key Not sure what you mean by open lock, but the way to call the menu programmatically is : Activity.openOptionsMenu(); Good luck. Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ClassNotFoundException crash reports from Market
That can't be the problem in my case because people have reported it on Droid but we've tested it on Droid from the day it came out till the 2.2 update - and never seen a problem. Also there are a LOT of Droid users of the app and it apparently happens just for 0.X% of them :/ On Tue, Sep 7, 2010 at 6:42 PM, Yahel kaye...@gmail.com wrote: Hi all, I had both theses errors : ClassNotFound and VerifyError. Turns out I was using a class and/or a function that was not available in the 1.5 framework. In my manifest I have : uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/ uses-sdk And in my project properties I have checked the 1.6 framework. With both of these it did not trigger compiler error since the function existed in the 1.6 framework. I just went in the properties, checked the 1.5 framework. Errors were detected by the compiler, I found a way around them, then checked back 1.6 in the properties. It did the trick. Good luck. Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [Offtopic] I need a car to get to the Android Only! conference in Stockholm, help me win one!!!
On 7 September 2010 14:47, Rijad Sacirovic rij...@gmail.com wrote: Hi i would want to attend the Android Only! Conference in Stockholm but this is hard without a car, why dont you help me win a car? the man with the cigar thats me :D http://www.audia1.nu/Contest/My/586af7756a8c7e588d9432e299042474-1-2412 First, stop smoking - that would save you couple of bucks. Then get yourself a train ticket and after 4 hours your are in Stockholm. And don't spam here again. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] stringindexoutofboundsexception in ViewRoot.draw(boolean)
So in my application, I receive an SMS which contains GPS coordinates. I have a receiver that handles the SMS and parsing. I also have a map activity that plots those points. In the map activity I create/plot a placemark of the point and I also have a balloon overlay that pops up when the user clicks on the placemark. Sometimes when clicking on this placemark, there is a StringIndexOutofBoundsException being thrown. I'm not sure how to view the stack trace but I've stepped through my code and cannot view the code where this is happening. This is what my Debug window looks like at the time of the crash: Thread [3 main] (Suspended (exception StringIndexOutOfBoundsException)) ViewRoot.draw(boolean) line: 1378 ViewRoot.performTraversals() line: 1119 ViewRoot.handleMessage(Message) line: 1638 ViewRoot(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 130 ActivityThread.main(String[]) line: 4425 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 860 ZygoteInit.main(String[]) line: 618 NativeStart.main(String[]) line: not available [native method] Does anybody know where ViewRoot is being called? I have an OnTap() method and the overlay classes which I've stepped through and everything seems fine but I can only step through it to a certain point. Any suggestions on how to debug this is greatly appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView OnItemClickListener not working
yes, I´m asking myself the same Anyone here ever faced this? Thanks On 7 set, 13:05, Kostya Vasilyev kmans...@gmail.com wrote: Ah, it seems you are using a dialog. I wonder if this makes any difference vs. an activity. -- Kostya 07.09.2010 19:58, Gabriel Simões пишет: Tried calling setOnItemClickListener before setAdapter but nothing :( final ListView lvList = (ListView) dialog.findViewById(R.id.lvList); lvList.setOnItemClickListener(new OnItemClickListener(){ �...@override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { removeDialog(DIALOG_LOAD_ID); } }); lvList.setAdapter(new DBAdapter(this.getApplicationContext())); thanks once again, Gabriel On 7 set, 12:48, Kostya Vasilyevkmans...@gmail.com wrote: Gabriel, For what it's worth, here is my ListItem layout xml: http://pastebin.com/ZUDjF06r And this is the list adapter's getView method: http://pastebin.com/JWt5Wb40 Nothing special here, including any code to mess with view focus. I call setOnItemClickListener before setAdapter in the ListView. -- Kostya 07.09.2010 19:41, Gabriel Simões пишет: Hey Kostia, Thanks for your reply. I´ve already done it, but the method onItemClick is never called! I´ve read some stuff about focus, onTouchfocus but nothing changed the result. Each item in the listview is a view inflated from a layout which has TextViews and a button (in a relative layout). Any ideas why clicking on an item (view) doesn´t fire onItemClick? Thanks! On 7 set, 11:37, Kostya Vasilyevkmans...@gmail.com wrote: Gabriel, This is how it's done: ListView listView = ..whatever; listView.setOnItemClickListener(new OnItemClickListener() { �...@override public void onItemClick(AdapterView? parent, View view, int position, long id) { do your thing here } }); -- Kostya 07.09.2010 17:39, Gabriel Simões пишет: Sorry for the bump but I´m still stuck into this and that is the only feature not ready. Could you guys please give me a hand here? thanks! On 6 set, 14:29, Gabriel Simõesgsim...@gmail.com wrote: Hello guys After a long time away, got back to coding on this brazilian independency holiday. What I´m trying to do is to create a list (using a listview) of items (which are views inflated from the same layout) what must be clickable. At first I thought that all I had to do was to add an onItemClickListener to the ListView so if the used clicked on any of the views that composed this Item the listener would react. Well, I was wrong. I´ve tried a lot of things, including setting focus and focusontouchmode off for each of the views that compose the item´s view but it still doesn´t work. Any tips here? Can I archive this result? Oh, also ... this listview is in a dialog and the listener is in the activity that builds the dialog. Hope to hear from you soon. Thanks, Gabriel Simões -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Implicit intent - Same action for mutiple component how it works ?
- You don't need multiple apps to test this. Just more than two activities, in any apps, matching the launched intent. - You this behavior in various places in the base system (for example clicking on a map link in the browser). - The standard chooser dialog (such as what is brought up when you select a share menu) is actually a form of this. - To see an example, just install a home screen replacer app. When you press home, an implicit intent to launch the home app is started, and at that point you will go into the intent resolver to select which home app you want. - Use Intent.FLAG_DEBUG_LOG_RESOLUTION to see debug information printed in the log while your intent is being resolved. On Tue, Sep 7, 2010 at 8:37 AM, mani smanikanda...@gmail.com wrote: Hi all, I am sorry that i may ask known questions to you all. But i couldnt figure out the exact understanding of implicit intents. When i was going through the tutorial i read about it. here are some important points to remember: 1 - Implicit Intents do not specify a target component 2 - Components willing to receive implicit intents have to declare their ability to handle a specific intent by declaring intent filters 3 - A component can declare any number of Intent Filters 4 - There can be more than one component that declares the same Intent Filters and hence can respond to the same implicit intent. In that case the user is presented both the component options and he can choose which one he wants to continue with 5- You can set priorities for the intent filters to ensure the order of responses. I read this about Implicit Intents. I couldnt get visualisation of 4th point. So wanted to try it out by writing some examples. I tested this like below. Wrote two apps. I had written two activities in one app, CallingActivity anotherActivity. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.localguide application activity class=.CallingActivity android:label=callingactivity intent-filter action android:value=android.intent.action.MAIN / category android:value=android.intent.category.LAUNCHER / /intent-filter /activity activity class=.anotherActivity android:label=anotheractivity intent-filter action android:value=com.android.localguide.GET_RESULT / category android:value=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest One more app,which has two activities like below. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.test android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.testmain android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.results intent-filter action android:name=com.android.localguide.GET_RESULT/ category android:name=android.intent.category.DEFAULT/ /intent-filter /activity /application /manifest I ran the first app in emulator and pressed home screen, it mean it runs in the background.(Not exited ) Then i opened the second app and clicked a button in frirst activity(testmain) and tried to call setAction com.android.localguide.GET_RESULT i.setAction(com.android.localguide.GET_RESULT); But it is opening the activity results.. It dint showed a options to choose which components( i expected first app ) activity i need to use ? Am i right in executing in the right context to understand that point no 4 ? Could anyone please elloborate on that point ? thanks, Mani -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] Re: OpenGL - 3D rotation from a 2D input
your first stop for all opengl questions should be NeHe open gl lessons: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48 On Sep 6, 9:58 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: This is a 3D Minesweeper. Instead of searching mines on that rectangular field, you must search them on several 3D fields (8 in total) by looking in all faces/planes. So you must rotate the objects to see all sides. (search for: *3D Mines*) I got the idea about different movements for each axis, but I really wanted to use dragging for all axis. Thanks, Thiago On Mon, Sep 6, 2010 at 17:42, Droid rod...@gmail.com wrote: Suggest dragging for x, y and tapping for z axis movement. But its not clear exactly what your end-game is You could also use accelerometer for tipping (see Breakout Legend in the App in mkt) :) Droid On Sep 6, 7:04 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Hi, I have a cube on the center of the screen and the user can rotate it using the touchscreen. The problem: For example, when I rotate the cube 180 degrees (vertical), the horizontal rotation gets inverted (i mean, when moving right the cube rotates left and vice-versa). The issue is that I'm using 2D coordinates (touchscreen) to rotate the 3D cube. I'm always rotating around the cube's X and Y axis and never around the Z axis. The question is: How do I calculate how much and which axis to rotate from a 2D coordinate input? Thanks, Thiago -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Trying to diagnose a Resource Not Found exception
I've used ListViews before but what's really different in this case is the fact that my ArrayAdapter is being built in an AsyncTask. When I call the constructor for the ArrayAdapter, I'm using the context MyActivity.this, which is the context of the parent of the AsyncTask. I wonder if this is allowed. Other than an AsyncTask, I can't think of any other way to use a ListView with a data source that takes a while to return data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ClassNotFoundException crash reports from Market
On Tue, Sep 7, 2010 at 10:42 AM, Yahel kaye...@gmail.com wrote: I had both theses errors : ClassNotFound and VerifyError. Turns out I was using a class and/or a function that was not available in the 1.5 framework. The one Activity for which the VerifyError is thrown in my bug report does not use any new APIs. I did what you suggested anyway and found no errors. Next idea? =) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Maps with directions.
Is it possibly to have a button in my app that switches to the phone's Maps application while passing in a destination for directions? And how would I do that? Haven't been able to find anything about it. 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