[android-developers] Re: ActionBar forward compatibility
Thanks Zsolt, I missed it when looking over the docs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] cancel Notification
Hi guys, I need one help.. I need to cancel a notification when the event is over. can anybody help me.. -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.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] Web view performance
In one of our application we are using web view to show some html content(we have some css and so may not be able to use Textview). But it seems the loading of web view is very slow.(atleast when the first time we launch this page).is there any way we can optimise this or any other suggestion.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC JNI Error on Nexus S
I do face similiar kind of errors 05-24 15:00:41.765: INFO/ActivityManager(113): Starting: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } from pid -1 05-24 15:00:41.781: INFO/Foreground dispatch(1587): Discovered tag with intent: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } 05-24 15:00:41.785: WARN/NfcService(211): Handle not found ! 05-24 15:00:42.656: DEBUG/NativeNfcTag(211): Tag lost, restarting polling loop 05-24 15:00:44.910: WARN/InputManagerService(113): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40785700 05-24 15:00:46.300: INFO/ActivityManager(113): Starting: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } from pid -1 05-24 15:00:46.320: INFO/Foreground dispatch(1587): Discovered tag with intent: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } 05-24 15:00:46.328: WARN/NfcService(211): Handle not found ! 05-24 15:00:47.187: DEBUG/NativeNfcTag(211): Tag lost, restarting polling loop 05-24 15:00:47.679: WARN/InputManagerService(113): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@406ee9c8 05-24 15:00:48.843: INFO/ActivityManager(113): Starting: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } from pid -1 05-24 15:00:48.859: INFO/Foreground dispatch(1587): Discovered tag with intent: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x3000 cmp=com.example.andorid.apis.mifare/.MainActivity (has extras) } 05-24 15:00:48.867: WARN/NfcService(211): Handle not found ! 05-24 15:00:49.875: DEBUG/NativeNfcTag(211): Tag lost, restarting polling loop On May 12, 8:23 am, fordeveloper pritiatv...@gmail.com wrote: Ya, am having the same issue with one particular card everytime. The transcieve fails, and the nfcpollingrestarts everytime. On Apr 20, 1:25 pm, Myroslav Bachynskyi bachyns...@gmail.com wrote: 04-16 15:46:22.809: INFO/ActivityManager(118): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.myro/.NFCTestActivity bnds=[5,231][115,349] } from pid 201 04-16 15:46:22.914: VERBOSE/RenderScript_jni(201): surfaceDestroyed 04-16 15:46:23.242: INFO/ActivityManager(118): Displayed com.myro/.NFCTestActivity: +355ms 04-16 15:46:27.191: INFO/NfcService(567): Dispatching to override intent PendingIntent{40529548: android.os.BinderProxy@40528cc0} 04-16 15:46:27.195: INFO/ActivityManager(118): Starting: Intent { act=android.nfc.action.TAG_DISCOVERED flg=0x3000 cmp=com.myro/.NFCTestActivity (has extras) } from pid -1 04-16 15:46:27.422: INFO/NFC Reader(539):Tagsuccessfully scanned, and information read 04-16 15:46:28.660: DEBUG/NativeNfcTag(567):Taglost,restartingpolling loop 04-16 15:46:34.930: INFO/NfcService(567): Dispatching to override intent PendingIntent{4052b470: android.os.BinderProxy@40528cc0} 04-16 15:46:34.934: INFO/ActivityManager(118): Starting: Intent { act=android.nfc.action.TAG_DISCOVERED flg=0x3000 cmp=com.myro/.NFCTestActivity (has extras) } from pid -1 04-16 15:46:43.504: WARN/System.err(539): java.io.IOException 04-16 15:46:43.504: WARN/System.err(539): at android.nfc.tech.BasicTagTechnology.connect(BasicTagTechnology.java:81) 04-16 15:46:43.508: WARN/System.err(539): at android.nfc.tech.IsoDep.connect(IsoDep.java:40) 04-16 15:46:43.508: WARN/System.err(539): at com.myro.NFCTestActivity.processTag(NFCTestActivity.java:73) 04-16 15:46:43.508: WARN/System.err(539): at com.myro.NFCTestActivity.access$0(NFCTestActivity.java:66) 04-16 15:46:43.516: WARN/System.err(539): at com.myro.NFCTestActivity$1.run(NFCTestActivity.java:60) 04-16 15:46:43.520: WARN/System.err(539): at java.lang.Thread.run(Thread.java:1019) 04-16 15:46:43.629: ERROR/NFC JNI(567): phLibNfc_RemoteDev_CheckPresence() returned 0x0095[NFCSTATUS_INVALID_HANDLE] 04-16 15:46:43.629: DEBUG/NativeNfcTag(567):Taglost,restartingpolling loop 04-16 15:46:43.629: ERROR/NFC JNI(567): phLibNfc_RemoteDev_Disconnect(293e90) returned 0x0095[NFCSTATUS_INVALID_HANDLE] 04-16 15:46:44.117: ERROR/NFC JNI(567): phLibNfc_RemoteDev_Connect(RW) returned 0x00ff[NFCSTATUS_FAILED] 04-16 15:46:44.117: WARN/NfcService(567): Failed to connect totag 04-16 15:46:44.117: ERROR/NFC JNI(567): doDisconnect() - Target already disconnected 04-16 15:46:44.574: ERROR/NFC JNI(567): phLibNfc_RemoteDev_Connect(RW) returned 0x00ff[NFCSTATUS_FAILED] 04-16 15:46:44.574: ERROR/NFC JNI(567): phLibNfc_RemoteDev_Connect(RW) returned 0x00ff[NFCSTATUS_FAILED] 04-16
[android-developers] is anybody there having interest to reverse engineer the spotify code?
hi, Is there anybody having interest to reverse engineer the spotify code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Many apps disappeared in Android Market this morning
The Simplified Chinese option also disapeared from the description part. It seems it's not just a bug. On 5月18日, 下午2时57分, feng tjs...@gmail.com wrote: I found the same issue. On May 17, 9:19 am, john huang john.h...@gmail.com wrote: I have try clear everything I can clear, and reboot several times, no luck :( On Tue, May 17, 2011 at 9:14 AM, Maps.Huge.Info cor...@gmail.com wrote: No need to panic! I see all the apps you mentioned including something like 13 of your ones. Try clearing the cache for the market on your device. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] First item in Gridview has null mAttachInfo
Or, it may well be a bug in GridView. I've confirmed to my own satisfaction a somewhat similar bug in a GridView that I use: the view attached to the first item returns (0,0) for getHitRect(). Only the first item, but I'm not doing *anything* different in its creation or handling. Makes for a PITA when trying to handle touch events. So, quite possibly it's a bug in GridView, not your code, and you'll need to work around it yourself. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to unmount SD card with java code on android?
Hi Vicky, The i.e. teh Settings App uses an AIDL Interface ( IMountService ) to mount/unmount the sdcard finally via vold. But I think only as part of the system build and signed with the platform key your are able to use it. But you can check this for your own. Good luck ! Frank On 23 Mai, 07:57, Vicky Wang kewy...@gmail.com wrote: Hi, guys There is a question about how to unmount SD card with java code on android. Right now, i found if want to unmount SD card with java, it need super permission. But i don't know the details how to do it. Who can help me ? Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App will not Install/Move to SD Card on HTC Desire HD
See Android issue 9593: http://code.google.com/p/android/issues/detail?id=9593 On May 19, 10:01 am, Valery valery.bogda...@gmail.com wrote: Our users reporting same problems, same devices: HTC Desire, HTC Legend There can be some bug or restriction with HTC devices that blocks apps to moving to SD card. Did your app use Google C2DM service, for example? Did your app contains some broadcast receivers or services? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] RatingBar
hi I want to create custom rating bar with image choosed by me instead of stars. Can anyone provide me code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Timer
Hi guys, i need to show the stop watch when i clicks the button.. can anybody help me.. -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.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: Key capture background
I wonder why this capability is closed when there are lot of genuine use cases. You are welcome to write your own mobile operating system that enables spyware to monitor key presses from other applications. In that case why cant u allow a single key to be accesible? not all the keysrokes from the keyboard just that MAIN key or Menu key , what is wrong with it? its not goiong to steal ur password or credicard details. On May 20, 1:09 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, May 19, 2011 at 3:01 AM,coder_symsaj...@gmail.com wrote: I saw a post saying key capturing in the background is not possible .. is this still the case? Yes. or was thre any recent changes to make this happen ? No. I wonder why this capability is closed when there are lot of genuine use cases. You are welcome to write your own mobile operating system that enables spyware to monitor key presses from other applications. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Timer
http://developer.android.com/resources/articles/timed-ui-updates.html http://developer.android.com/resources/articles/timed-ui-updates.html http://steve.odyfamily.com/?p=12 On Tue, May 24, 2011 at 1:16 PM, shanmu nathan win.sha...@gmail.com wrote: Hi guys, i need to show the stop watch when i clicks the button.. can anybody help me.. -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.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 -- *-- Mohammed Hossain Doula Software Engineer desme INC.* *www: http://www.hossaindoula.com @: ron...@desme.com* *facebook: http://www.facebook.com/ROnyWorld* *twitter: http://www.twitter.com/hossaindoula* *blogspot: hossaindoula.blogspot.com GSM: 00880-167-4347101* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC - Custom Tag Dispatching
yes you can. use your own mimeType and then the intent filter: intent-filter action android:name=android.nfc.action.NDEF_DISCOVERED/ data android:mimeType=mime/type / /intent-filter ass well in the forgroundDispatch you can define for which mime type to listen. On May 5, 2:13 am, Troy Steinbauer troysteinba...@gmail.com wrote: I am writing an app that will use the P2P part of the NFC package, and I would like no other android app possibly handel the intent generated from my tag being pushed. I want to prevent the Application Chooser from being launched. But if a user has an app that attempts to catch all tags (like a generic tag reader app), then it will show the Application Chooser. Can I use 'android.nfc.action.NDEF_DISCOVERED' with a unique data field for my application only? or Can I use 'android.nfc.action.TECH_DISCOVERED' with a custom Tech inside the tech-list? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Career as an Andoid developer. Is there any point?
Well, before you rashly declare web inferior to native, you might want to watch this talk from Google I/O: http://www.google.com/events/io/2011/sessions/html5-versus-android-apps-or-web-for-mobile-development.html Doug On May 23, 5:20 pm, Miguel Morales therevolti...@gmail.com wrote: Sorry, that was a bit too brief and actually not completely related. But, what I meant was that because of the layers of non-complexity the browsers and app makers provide there are limits to their use. Even though a browser implements javascript and you can do many things with it, it's non complexity adds layers/paths of cpu instructions. So, to clarify my statement, being good at programming is ultimately the most desired skill. These technologies, no matter how good and easy they get, have their limitations. On Mon, May 23, 2011 at 5:14 PM, Doug beafd...@gmail.com wrote: On May 23, 3:43 pm, Miguel Morales therevolti...@gmail.com wrote: This is because those interfaces are not turing complete. They're useless once you reach a certain level of complexity. This is why browser apps are only for the most basic of apps. Care to elaborate on that last statement? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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://solrpg.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] Re: Timer
hey You can use Handler class or chronometer. On May 24, 8:16 am, shanmu nathan win.sha...@gmail.com wrote: Hi guys, i need to show the stop watch when i clicks the button.. can anybody help me.. -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.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: Career as an Andoid developer. Is there any point?
On May 24, 1:49 pm, Justin Anderson magouyaw...@gmail.com wrote: @Zsolt Now I'm curious... What apps have you published so far? I publish a personal finance app. It took me a 1 1/2 years to develop it from the point I first downloaded the Android SDK to whenI first published it. And it's been under development ever since. So, for somebody with no other income whatsoever, it's not a lot of money. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Career as an Andoid developer. Is there any point?
I'd go further: http://www.reddit.com/r/programming/comments/hdcc1/qemu_has_been_ported_to_javascript_linux_now_runs/ 2011/5/24 Doug beafd...@gmail.com Well, before you rashly declare web inferior to native, you might want to watch this talk from Google I/O: http://www.google.com/events/io/2011/sessions/html5-versus-android-apps-or-web-for-mobile-development.html Doug On May 23, 5:20 pm, Miguel Morales therevolti...@gmail.com wrote: Sorry, that was a bit too brief and actually not completely related. But, what I meant was that because of the layers of non-complexity the browsers and app makers provide there are limits to their use. Even though a browser implements javascript and you can do many things with it, it's non complexity adds layers/paths of cpu instructions. So, to clarify my statement, being good at programming is ultimately the most desired skill. These technologies, no matter how good and easy they get, have their limitations. On Mon, May 23, 2011 at 5:14 PM, Doug beafd...@gmail.com wrote: On May 23, 3:43 pm, Miguel Morales therevolti...@gmail.com wrote: This is because those interfaces are not turing complete. They're useless once you reach a certain level of complexity. This is why browser apps are only for the most basic of apps. Care to elaborate on that last statement? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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://solrpg.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
[android-developers] Five-In-Row Tic-Tac-Toe
Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Orientation change and setRender
the problem was with cleaning up the textures upon orientation change. After I added that, it is working fine. On May 20, 12:37 am, qwesthead qwesth...@gmail.com wrote: I've a region on an activity that uses GLSurfaceView. When the Activity is resumed, I call the setRenderer and then the content of the screen. They work fine. But, the problem arise when I change orientation (configurationChange.) Upon orientation change, I need to change the layout. After orientation change, surfaceChanged is getting called. However, even when I call GLSurfaceview.requestrender, Renderer.onDrawFrame is not getting called. What are all the things I need to do when there is an orientation change. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: View.GONE but still accepts UI events
Okay, so what is the rationale behind the animation null check? Why would a view that is either GONE or INVISIBLE receive events just because its animating (or more correctly, has a reference to a Animation object, regardless of whether it is actively animating)? Nothing I see in the Animation interface influences the view's visibility state directly. In the current code, we left animation objects attached to views to we could reuse them. Instead of setting the reference to null, we had set the Animation startTime to Long.MAX_VALUE, and later called start(). This also avoided a invalidate/reset cycle for views that were always the same size. On May 23, 3:24 pm, Dianne Hackborn hack...@android.com wrote: If you are receiving down events, then the view is almost certainly not set to GONE or it is still animating. The code for this part of dispatching in ViewGroup is pretty simply, and just immediately skips any non-visible views: for (int i = childrenCount - 1; i = 0; i--) { final View child = children[i]; if ((child.mViewFlags VISIBILITY_MASK) != VISIBLE child.getAnimation() == null) { // Skip invisible child unless it is animating. continue; } So be sure the view is actually gone, and that you haven't left an animation in it. On Mon, May 23, 2011 at 1:31 PM, Anm andrew.n.marsh...@gmail.com wrote: This morning, I'm trying to animate the various state of a simple game. I have a transparent cover ViewGroup with a start and other buttons. When the user hits start, the entire cover animates away. At the end of the animation, I set the cover View to GONE which looks correct, but the start button is still grabbing touch events instead of the game's view. I had to manually iterate over all the start button and other views within the cover to setClickable( false ) and setEnabled( false ) (not sure if both were really needed) before I started receiving my touch events again on the layers below the GONE ViewGroup. On May 23, 12:33 pm, Justin Anderson magouyaw...@gmail.com wrote: I have never run into this... What situations have you come across where this happens? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 1:13 PM, Anm andrew.n.marsh...@gmail.com wrote: This is something that I've run into a couple of times, and I'm just curious about the thought process behind such design, if intentional: When a view has visibility GONE, it is still allowed to accept UI events. This is especially strange in positional UI events like touch, where any positional state it likely an artifact of past/ invalidated state. My colleagues and I cannot come up with any scenario where this behavior would be desirable. Quite the opposite, it would seem to be an easy way to limit the view tree traversal for event handling. Any insight would be 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Five-In-Row Tic-Tac-Toe
sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.com wrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Does Ads can't compatible with requestWindowFeature command?
Hi , Today, I try to add the Ads in my activity. I found that it throw error. After trial and error, I found if I not turn off the title bar. The activity can run in perfect. But if I really hope to hidden the title bar with Ad, what can I do? Also, who can teach me about this problem come from? Thanks a lot! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Five-In-Row Tic-Tac-Toe
Hi, May I have a copy too? Thanks! On 5月24日, 下午4時35分, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi(tm) khanhqh20...@gmail.com wrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AdSence Publisher ID and Android Developer Console
Has anyone encountered a similar bug in Android Developer Console? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Five-In-Row Tic-Tac-Toe
you guys make me chuckle in the morning... I am happy to provide a full source code of said game in 3D + very sleek graphics and branding *Tic-Tac-Toe-Tac-Tic*(TM) upon receiving of a valid credit card number + CVV + name_as_on_the_card. Thanks! On Tue, May 24, 2011 at 9:47 AM, khanh_qhi™ khanhqh20...@gmail.com wrote: Oh, Great! Please, send me and Thank a lots! On Tue, May 24, 2011 at 3:35 PM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.com wrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 listen at ports for some network events?
hi, can anybody tell me how can i listen at particular ports for some network events? i.e when server send some data client is enable to procees it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Mobile Payment API
Hi Is there any good Mobile Payment Gateway API available? Thanks Siva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Five-In-Row Tic-Tac-Toe
I just received it! Thanks Robin! Regards, Marcin Orlowski On 24 May 2011 10:35, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.comwrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Five-In-Row Tic-Tac-Toe
Oh, Great! Please, send me and Thank a lots! On Tue, May 24, 2011 at 3:35 PM, Robin Talwar r.o.b.i.n.abhis...@gmail.comwrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.comwrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] xml parser generator
is there any android specific xml generator ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] xml parser generator
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser On Tue, May 24, 2011 at 3:30 PM, Sudha sudha...@gmail.com wrote: is there any android specific xml generator ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --Jitesh .V. Dedhiya--- Don't Learn To Hack but Hack To Learn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Five-In-Row Tic-Tac-Toe
Hi Marcin, Could you send me the source code? On Tue, May 24, 2011 at 4:53 PM, Marcin Orlowski webnet.andr...@gmail.comwrote: I just received it! Thanks Robin! Regards, Marcin Orlowski On 24 May 2011 10:35, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.comwrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] emulator error
Hi, I implemented demo application in android,i got error like , An unhandled win32 exception occured in emulator.exe can anyone please help me what might be the problem. With regards, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Some questions about the driver and library..
Hi all, I'm new in android. We got a big project and a tight schedule. So I need some help. Description We have a sensor and we want to use it in android. Currently we have the source code of the* driver* and the *framework *in LINUX, and the DLL files of the *middle ware*. We also need an* interactive program* at last. The framework got data from sensor then pass them to the middle ware. After the middle ware processed the date, the framework sent them to application. At first we thought we have to rewrite all those parts in JAVA and package them in an application. But it seems impossible.. Then I read the document of android. In the android architecture I found it relies on LINUX. Questions Since we have got the source code of *driver* in LINUX. So we don't have to do much work about the driver? The *framework* seems like the abstraction layer. We should rewrite it in JAVA? The *middle ware* is actually a library. Can we put it in the libraries layer in android? The* interactive program *is an application. It will use the middle ware as a library? Seems like we have to modify the source code of android system. So the application can only be used in the android system which we have modified? Or there's some methods similar to the things we do in PC, we can install the driver and the library, then we can run the application? PS: Are there some good books about android system? I didn't find many things about the architecture in the document. I know little about android. I may have asked some stupid questions and my English is limited. Please forgive me if I made any mistake.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Camera App
On my Zoom's home Screen it has the camera app, which has a button for front and back camera and then a slider/button for video or photo When it saves a photo is it IMG_mmDDhhMMss.jpg All of which is great / perfect Using the following code ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fName); values.put(MediaStore.Images.Media.DESCRIPTION, Image Capture by ME); imageUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); 1) I get no front / back button 2) I get no slider video / photo 3) It uses what I pass a fName. How do I just plainly call the Camera app that exists on the home screen with all it's standard features and functions. I want the front/back video/photo and the file naming is perfect. So how do I just all it from my app? thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to listen at ports for some network events?
Use a ServerSocket. This is standard Java. http://exampledepot.com/egs/java.net/CreateServerSocket.html On Tue, May 24, 2011 at 5:24 AM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi, can anybody tell me how can i listen at particular ports for some network events? i.e when server send some data client is enable to procees it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] cancel Notification
Call cancel() or cancelAll() on NotificationManager. On Tue, May 24, 2011 at 2:06 AM, shanmu nathan win.sha...@gmail.com wrote: Hi guys, I need one help.. I need to cancel a notification when the event is over. can anybody help me.. -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need Help
Can anyone provide me code to add RatingBar in alert box. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: View.GONE but still accepts UI events
My experience is that animation (at least pre-Honeycomb) overrides the equivalent properties of the view being animated. For instance, if you're animating a view's position, what will be shown on screen is the position from the animation, not what you may have set on that View's layout. Similarly, I think an AlphaAnimation will override any setVisibility() you've called on the View. If this is the case, it's entirely possible that an invisible View will still be visible on screen if it's being animated, and the user will expect to be able to interact with it. Now that you know the cause, it seems to me you could keep your Animation objects around somewhere else (and still reuse them), rather than leaving them attached to the Views. Just reattach them when you want to use them again. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need Help
Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to listen at ports for some network events?
hi mark, thankx for ur reply.but can u give me some elaborative example. i have never done it before. -- Regards, Hitendrasinh Gohil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 listen at ports for some network events?
You will need a server part and a client part for this. Try setting up a chat server and client application based on Sockets and you would know. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, May 24, 2011 at 4:53 PM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi mark, thankx for ur reply.but can u give me some elaborative example. i have never done it before. -- Regards, Hitendrasinh Gohil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Five-In-Row Tic-Tac-Toe
Thanks, Robin, for the full 100% source. You even had instructions on how to load it and compile it. Great game. On May 24, 6:13 pm, khanh_qhi™ khanhqh20...@gmail.com wrote: Hi Marcin, Could you send me the source code? On Tue, May 24, 2011 at 4:53 PM, Marcin Orlowski webnet.andr...@gmail.comwrote: I just received it! Thanks Robin! Regards, Marcin Orlowski On 24 May 2011 10:35, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: sure :) do you want that in 3D?? On Tue, May 24, 2011 at 1:47 PM, khanh_qhi™ khanhqh20...@gmail.comwrote: Hi all, Could anyone give me full source code of this game in Android? -- Regards, Khanh. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Khanh.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting contacts with phone number only
Cursor Contactos = getContentResolver().query(RawContactsEntity.CONTENT_URI, new String[]{ RawContactsEntity.DATA_ID, RawContactsEntity.MIMETYPE, RawContactsEntity.DATA1, RawContactsEntity.DATA2, RawContactsEntity.DATA3, RawContactsEntity.DATA4, RawContactsEntity.DATA5, RawContactsEntity.DATA6, RawContactsEntity.DATA8 }, null, null, null); Hi everyone, i have this function to get all the contacts in the device but i want to get only those with phone number, how can i do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to listen at ports for some network events?
Hi, You will need a server part and a client part for this. Try setting up a chat server and client application based on Sockets and you would know. server is already there which sends data to android client.but at android side how can i handle this. whether i need to create both client-server at client side,if yes than how? and if i need to create only client at android client side than how? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Help
thank you.. my problem has solved. On Tue, May 24, 2011 at 12:20 PM, Mark Murphy mmur...@commonsware.comwrote: Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Help
but how?? can u suggest me? On Tue, May 24, 2011 at 5:05 PM, neha jain neha.05...@gmail.com wrote: thank you.. my problem has solved. On Tue, May 24, 2011 at 12:20 PM, Mark Murphy mmur...@commonsware.comwrote: Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] how to listen at ports for some network events?
ServerSocket is standard Java. Had you even bothered to search Google for: java serversocket tutorial you would have found nearly 100,000 hits, including: http://download.oracle.com/javase/tutorial/networking/sockets/clientServer.html http://zerioh.tripod.com/ressources/sockets.html http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html http://oreilly.com/catalog/javanp2/chapter/ch11.html http://www.kodejava.org/examples/216.html And so on. From an Android standpoint, you will need your ServerSocket to be managed by a Service with its own background thread, most likely. Also, bear in mind that what you are trying to do will not work unless you and the server are on the same local network. Android devices are not designed to be servers in this fashion. A more general-purpose solution would be to use push services, like C2DM, Xtify, and Urban Airship. On Tue, May 24, 2011 at 7:34 AM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: Hi, You will need a server part and a client part for this. Try setting up a chat server and client application based on Sockets and you would know. server is already there which sends data to android client.but at android side how can i handle this. whether i need to create both client-server at client side,if yes than how? and if i need to create only client at android client side than how? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Toggling BT A2DP audio routing
There used to be some functions in AudioManager to route audio to BT. Remaining these days is only setBluetoothScoOn(). For some reason there is no setBluetoothA2DPOn(). I get a lot of requests to enable / disable routing of audio (notifications, media etc) to A2DP devices. It seems that currently if such a device is connected audio goes there, otherwise not (lets exclude the in-call case). Is it possible to cause Android to connect/disconnect to BT devices as a way of controlling the audio routing ? Or another means of controlling the audio routing as setBluetoothScoOn() does ? Thanks, 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
Re: [android-developers] Need Help
i need ur suggestion that how u manage to create custom rating bar with images choosed by u. i need help in that . Thank u in advance hi I want to create custom rating bar with image choosed by me instead of stars. Can anyone provide me code On Tue, May 24, 2011 at 5:09 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: but how?? can u suggest me? On Tue, May 24, 2011 at 5:05 PM, neha jain neha.05...@gmail.com wrote: thank you.. my problem has solved. On Tue, May 24, 2011 at 12:20 PM, Mark Murphy mmur...@commonsware.comwrote: Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Force Killing Application
Hi, I am getting below message from logcat. On Force closing of application, what function will be called in application? OnDestroy (or) OnPause? If we do not have this implementation on application what will happen in activity manager? what is meaning of Channel is unrecoverably broken and will be disposed!? Any binder connection failed? Any idea on the above questions? Force finishing activity com.android.camera/.Camera I/ActivityManager( 142): Killing com.android.camera (pid=7392): user's request E/InputDispatcher( 142): channel '40af3d88 com.android.camera/ com.android.camera.VideoCamera (server)' ~ Consumer closed input channel or an error occurred. events=0x8 E/InputDispatcher( 142): channel '40af3d88 com.android.camera/ com.android.camera.VideoCamera (server)' ~ Channel is unrecoverably broken and will be disposed! E/InputDispatcher( 142): channel '407afb50 com.android.camera/ com.android.camera.Camera (server)' ~ Consumer closed input channel or an error occurred. events=0x8 E/InputDispatcher( 142): channel '407afb50 com.android.camera/ com.android.camera.Camera (server)' ~ Channel is unrecoverably broken and will be disposed! I/WindowManager( 142): WINDOW DIED Window{40af3d88 com.android.camera/ com.android.camera.VideoCamera paused=false} I/WindowManager( 142): WIN DEATH: Window{407afb50 com.android.camera/ com.android.camera.Camera paused=true} I/ActivityManager( 142): Process com.android.camera (pid 7392) has died. Thanks Regards, Pandi K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need Help
Follow this link ..u will get answer... http://stackoverflow.com/questions/5800657/how-to-create-custom-ratings-bar-in-android On Tue, May 24, 2011 at 12:42 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: i need ur suggestion that how u manage to create custom rating bar with images choosed by u. i need help in that . Thank u in advance hi I want to create custom rating bar with image choosed by me instead of stars. Can anyone provide me code On Tue, May 24, 2011 at 5:09 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: but how?? can u suggest me? On Tue, May 24, 2011 at 5:05 PM, neha jain neha.05...@gmail.com wrote: thank you.. my problem has solved. On Tue, May 24, 2011 at 12:20 PM, Mark Murphy mmur...@commonsware.comwrote: Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Performance issues drawing on a canvas
I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots: http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Help
Follow this link ..u will get answer... http://stackoverflow.com/questions/5800657/how-to-create-custom-ratings-bar-in-android On Tue, May 24, 2011 at 12:42 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: i need ur suggestion that how u manage to create custom rating bar with images choosed by u. i need help in that . Thank u in advance hi I want to create custom rating bar with image choosed by me instead of stars. Can anyone provide me code On Tue, May 24, 2011 at 5:09 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: but how?? can u suggest me? On Tue, May 24, 2011 at 5:05 PM, neha jain neha.05...@gmail.com wrote: thank you.. my problem has solved. On Tue, May 24, 2011 at 12:20 PM, Mark Murphy mmur...@commonsware.comwrote: Use AlertDialog.Builder. Call setView() on the Builder with a RatingBar, or some layout you inflated that contains a RatingBar. On Tue, May 24, 2011 at 7:17 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code to add RatingBar in alert box. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Performance issues drawing on a canvas
Rather than having people guess at why that might be slow (I can see a handful of possibilities right away), may I suggest you profile it and find out for sure: http://android-developers.blogspot.com/2010/10/traceview-war-story.html String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Career as an Andoid developer. Is there any point?
Programming apps in the traditional sense, on your own might not be a great career path. But android developers are in very high demand right now. You would be shocked to see big name companies and their inability to get on mobile, they know they have to but they don't know how. Additionally the android os is here to stay, now that it is going into the embedded world and the television market you will see more of a demand for that skillset On May 24, 2011, at 1:49 AM, Justin Anderson magouyaw...@gmail.com wrote: @Zsolt Now I'm curious... What apps have you published so far? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 11:03 PM, Kevin TeslaCoil Software ke...@teslacoilsw.com wrote: I quit my day job several months ago for my Android Apps career and am doing very well and love it. But it's not like I set out to be an Android App developer. I taught myself programming and programmed the hell out of whatever I could, went to university for Electrical Engineering/Robotics, got a job doing Perl/MySQL web stuff, almost bought an iPhone but went for the Nexus One instead and started playing with developing for it after work for fun, eventually it grew into something more. I plan on sticking to my Android Apps career as I love it, but if suddenly everyone switches to Chromephones or something, I could easily switch my career to Computer Science or Electrical Engineering or iPhone Apps career. Programming is programming, and practicing such is a worthwhile (and fun) use of time. -Kevin On May 23, 10:25 pm, Zsolt Vasvari zvasv...@gmail.com wrote: Not to sound braggy, but my app has been netting $3000+/mo in sales for the past 6 months, after Google's cut. It all depends what your app is -- if it's a toy app, expect toy income from it. If it's an app that adds serious value to people's lives, expect an income go along with that. It's complete BS what some iPhone advocates are saying about Android users being cheap. That said, even $3000/mo is not a replacement for a real job, to be honest. On May 24, 10:31 am, Justin Anderson magouyaw...@gmail.com wrote: I would have to agree that for the most part creating Android Apps would not be a career. While it is true that a few developers may be able to make it a career the majority of us do it for fun... I have three apps on the Android Market (2 paid and 1 free)... All apps are rated 4 or 4 1/2 stars and yet my highest months of sales are about $100 after Google's cut. Its not bad for a hobby (especially since I write my apps because I use and like them) but anyone trying to make it as a full time career should have a viable alternative. Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 8:11 PM, Kristopher Micinski krismicin...@gmail.com wrote: On Mon, May 23, 2011 at 2:11 PM, imran115 imran.hyd...@yahoo.co.ukwrote: Hi everyone, I was wondering what peoples thoughts maybe on the application that Android are developing, that allows people with no programming experience to create apps. I am currently learning the basics in Android development and wanted to pursue it as a career. Is there any point, as just about anyone will soon be able to create an app? The link below shows what I am talking about. http://appinventor.googlelabs.com/about/ Will programming for Android apps no longer be a specialist skill, hence not much of a career? I'm going to argue that Android apps is not a career. You won't find many people making real money on their apps. Most people do it for a mix of fun and profit, if that. Android application development is a really niche area, without a solid background in computer science or some related field, you'll quickly be out of a job with no alternative. But to answer your question, of course not, see the last point in Edsger Dijkstra's How do we tell truth's that might hurt :-) Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: Application crashes when downloding long data in from server and in loop.............
This would mean your program put the entire 10Mbyte of data into one large JSONObject... Then you'd have, at least temporary, a 10MByte large json-string *and*a 10MByte (or larger) JSONObject hierarchy If this is the case, you'd probably run out of memory. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Getting contacts with phone number only
http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/2/ On Tue, May 24, 2011 at 5:01 PM, Abalufaske abalufa...@gmail.com wrote: Cursor Contactos = getContentResolver().query(RawContactsEntity.CONTENT_URI, new String[]{ RawContactsEntity.DATA_ID, RawContactsEntity.MIMETYPE, RawContactsEntity.DATA1, RawContactsEntity.DATA2, RawContactsEntity.DATA3, RawContactsEntity.DATA4, RawContactsEntity.DATA5, RawContactsEntity.DATA6, RawContactsEntity.DATA8 }, null, null, null); Hi everyone, i have this function to get all the contacts in the device but i want to get only those with phone number, how can i do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --Jitesh .V. Dedhiya--- Don't Learn To Hack but Hack To Learn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Performance issues drawing on a canvas
Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas: http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots: http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Force Killing Application
On Tue, May 24, 2011 at 7:54 AM, Pandi pandiwelco...@gmail.com wrote: I am getting below message from logcat. Unless you work for Google, that stack trace is not from your application. On Force closing of application, what function will be called in application? OnDestroy (or) OnPause? Neither. Nothing is called on an activity that is force-closed. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to read all sms,calendar events,emails?
On Mon, May 23, 2011 at 10:55 PM, Zsolt Vasvari zvasv...@gmail.com wrote: If you want to read calendar events, go to the Calendar app source code and copy out the relevant pieces. Better yet, use the official Google Calendar API, which has nothing to do with Android specifically. Then your app is not dependant on various firmware versions where the calendar stuff can and will change, thereby breaking your code in each version. - 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 use broadcast receiver to receive data from server?
On Tue, May 24, 2011 at 12:17 AM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: i need to do the above functinality ,pls suggest a way. C2DM - 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] is anybody there having interest to reverse engineer the spotify code?
On Tue, May 24, 2011 at 1:24 AM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: Is there anybody having interest to reverse engineer the spotify code? Nope. - 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] RatingBar
On Tue, May 24, 2011 at 2:02 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code No Can you make an effort to solve your own problem Can you post when you have trouble with something specific Do you think this group is a charity with people just sitting around to hand out code that works perfectly for you - 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] RatingBar
hey treking i have solved my problem without ny help of this group.I am new to android n if i asked this question,its not a big thing. If u dont wanna share code thn keep it to u. On Tue, May 24, 2011 at 2:37 PM, TreKing treking...@gmail.com wrote: On Tue, May 24, 2011 at 2:02 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code No Can you make an effort to solve your own problem Can you post when you have trouble with something specific Do you think this group is a charity with people just sitting around to hand out code that works perfectly for you - 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] RatingBar
Neha you could have asked for a way not a code... :) That's not a good practice for a developer... On Tue, May 24, 2011 at 7:56 PM, neha jain neha.05...@gmail.com wrote: hey treking i have solved my problem without ny help of this group.I am new to android n if i asked this question,its not a big thing. If u dont wanna share code thn keep it to u. On Tue, May 24, 2011 at 2:37 PM, TreKing treking...@gmail.com wrote: On Tue, May 24, 2011 at 2:02 AM, neha neha.05...@gmail.com wrote: Can anyone provide me code No Can you make an effort to solve your own problem Can you post when you have trouble with something specific Do you think this group is a charity with people just sitting around to hand out code that works perfectly for you - 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *-- Mohammed Hossain Doula Software Engineer desme INC.* *www: http://www.hossaindoula.com @: ron...@desme.com* *facebook: http://www.facebook.com/ROnyWorld* *twitter: http://www.twitter.com/hossaindoula* *blogspot: hossaindoula.blogspot.com GSM: 00880-167-4347101* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 read all sms,calendar events,emails?
On 24 May 2011 15:29, TreKing treking...@gmail.com wrote: On Mon, May 23, 2011 at 10:55 PM, Zsolt Vasvari zvasv...@gmail.comwrote: If you want to read calendar events, go to the Calendar app source code and copy out the relevant pieces. Better yet, use the official Google Calendar API, which has nothing to do with Android specifically. Well, this is like talking to you on the phone while you are next to me ;) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Five-In-Row Tic-Tac-Toe
Hey Robin, I too wanted to thank you for the original source code you provided. An extra big thanks for the updates you made for my copy at my request! The 3D polygons look amazing, the 16-player online multiplayer component you added works flawlessly, and I was able to upload the game, as is, right to the Android Market. I am now making $1,000 per day thanks to the free source code and art you provided completely free! I gave the users your contact info so please take care of all customer support and adding all new feature requests that come in. Pro bono, of course. Thanks! Since I just quit my day job thanks to you, I am flying out to Cancun for the long weekend. Could you please book my flight and hotel and set up an itinerary for my entire weekend stay? I will await you at 6AM - sharp! - on Friday morning so yo can carry me from my place to the limo you will chauffeur, then from the limo to the airport. Please have croissant and coffee ready. You can feed me in between red light stops. Thanks! It's so great to have a group that will provide you with anything you need for free! - XOXO - 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] RatingBar
On Tue, May 24, 2011 at 8:56 AM, neha jain neha.05...@gmail.com wrote: i have solved my problem without ny help of this group. Huh? If you solved your problem then why are you asking for code? I am new to android n if i asked this question,its not a big thing. I don't know what that means. If u dont wanna share code thn keep it to u. OK. - 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] Re: how to read all sms,calendar events,emails?
On Tue, May 24, 2011 at 9:05 AM, Marcin Orlowski webnet.andr...@gmail.comwrote: On 24 May 2011 15:29, TreKing treking...@gmail.com wrote: On Mon, May 23, 2011 at 10:55 PM, Zsolt Vasvari zvasv...@gmail.comwrote: If you want to read calendar events, go to the Calendar app source code and copy out the relevant pieces. Better yet, use the official Google Calendar API, which has nothing to do with Android specifically. Well, this is like talking to you on the phone while you are next to me ;) But at any point in the future the language you're using to talk directly to me might change, requiring you learn a new language to keep talking to me and preventing us from talking until you learn the new language. Meanwhile, the phone automatically translates what you're saying ;) - 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] Re: Purchases stuck again in Google Checkout
Same here, many sales that don't Clear until way late the next day On May 23, 5:24 pm, Zsolt Vasvari zvasv...@gmail.com wrote: Locking - Lucky On May 24, 6:19 am, Zsolt Vasvari zvasv...@gmail.com wrote: Well, you guys are locking. 6 of my orders, about 15%, haven't charged in the last 48 hours. On May 24, 5:45 am, Streets Of Boston flyingdutc...@gmail.com wrote: I've had this happening to mysalesfor a long time now. There are only a few of those, though, not even 1%.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Performance issues drawing on a canvas
Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas:http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots:http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Career as an Andoid developer. Is there any point?
The basic problem is that you've got millions of high school students and college dropouts who fancy themselves programmers, and they're all writing Android apps, hoping to come up with the next big hit. A very small number will develop into decent programmers, and an even smaller (microscopic) number will have that big hit. But a very small portion of millions is still a lot of competition. Additionally, Android, as it's currently designed, does not have legs. The process model and UI are both too restrictive to be extendable to the pads and other new paradigms of the future. For the near term you're better off looking for apps that you can sell to a business -- specialized apps their employees will use or apps they will distribute free to customers. Then you get your money up front, in a reasonably predictable fashion. (Here it helps to be able to write Android, iPhone, and maybe Nokia and Blackberry apps, so you can provide the customer with options.) For the far term, you need to expand outside of the Android and even the phone world, and learn other paradigms. I'd recommend, eg, Qt for desktop applications. And you need to become familiar with HTML, CSS, JavaScript, et al -- even though they are probably doomed to collapse under their own weight in another 15 years, whatever follows will no doubt draw from their basics. Finally, you should learn about servers and databases -- the general concepts will be around forever, even if the specifics change. And of course, the new big thing is the cloud, though I'd take that with a grain of salt. On May 23, 1:11 pm, imran115 imran.hyd...@yahoo.co.uk wrote: Hi everyone, I was wondering what peoples thoughts maybe on the application that Android are developing, that allows people with no programming experience to create apps. I am currently learning the basics in Android development and wanted to pursue it as a career. Is there any point, as just about anyone will soon be able to create an app? The link below shows what I am talking about. http://appinventor.googlelabs.com/about/ Will programming for Android apps no longer be a specialist skill, hence not much of a career? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Five-In-Row Tic-Tac-Toe
Luckily for you Android does provide some tictactoe source: http://developer.android.com/resources/samples/TicTacToeLib/index.html On Tue, May 24, 2011 at 7:10 AM, TreKing treking...@gmail.com wrote: Hey Robin, I too wanted to thank you for the original source code you provided. An extra big thanks for the updates you made for my copy at my request! The 3D polygons look amazing, the 16-player online multiplayer component you added works flawlessly, and I was able to upload the game, as is, right to the Android Market. I am now making $1,000 per day thanks to the free source code and art you provided completely free! I gave the users your contact info so please take care of all customer support and adding all new feature requests that come in. Pro bono, of course. Thanks! Since I just quit my day job thanks to you, I am flying out to Cancun for the long weekend. Could you please book my flight and hotel and set up an itinerary for my entire weekend stay? I will await you at 6AM - sharp! - on Friday morning so yo can carry me from my place to the limo you will chauffeur, then from the limo to the airport. Please have croissant and coffee ready. You can feed me in between red light stops. Thanks! It's so great to have a group that will provide you with anything you need for free! - XOXO - 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 -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.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] Re: Performance issues drawing on a canvas
Also do you mean that they should be split into separate threads or just separate methods? On May 24, 11:25 am, neuromit stuart.lay...@gmail.com wrote: Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas:http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots:http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Performance issues drawing on a canvas
Yeah, drawing sprites on a canvas in general is slow. Not to mention with the added collision detection. I would try doing a game-loop for for the animation/calculation and have a single loop for drawing. This makes sure you draw as fast as possible and your calculations run at a steady rate. http://www.koonsolo.com/news/dewitters-gameloop/ http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/ and just google game loop. On Tue, May 24, 2011 at 8:25 AM, neuromit stuart.lay...@gmail.com wrote: Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas: http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots: http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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://solrpg.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
Re: [android-developers] Re: Performance issues drawing on a canvas
They should be in separate threads. On Tue, May 24, 2011 at 8:42 AM, neuromit stuart.lay...@gmail.com wrote: Also do you mean that they should be split into separate threads or just separate methods? On May 24, 11:25 am, neuromit stuart.lay...@gmail.com wrote: Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas: http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots: http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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://solrpg.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
Re: [android-developers] Re: Performance issues drawing on a canvas
On Tue, May 24, 2011 at 4:25 PM, neuromit stuart.lay...@gmail.com wrote: Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? Stuart, It is true that there must be a main loop for animation (or a game). However you ought to ensure that the drawing happens every X milliseconds, so that the frame-rate is as independent from your state computation as possible. Preferably it is a separate thread that sleeps X milliseconds, then wakes-up and paints the current state. State alone is updated constantly based on user input and game AI (in your case pressing of the buttons moves PacMan, while ghosts are chasing him automatically). If you do state updates and painting in one loop, then you will notice that game will feel differently, depending on how busy given level is (plus many more factors impeding the computation performance). What you will get, when you start optimising the collision detection is that you will no longer iterate through all points, and then the need to separate painting from state modification will be more obvious. I searched the nets for some tutorials, but found only this [*] which explains it to a lesser extent. I am sure you will be able to find something more comprehensive. Its for AWT, but the principles hold regardless. [*] http://journals.ecs.soton.ac.uk/java/tutorial/ui/drawing/animLoop.html Daniel On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas:http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots:http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the
[android-developers] Re: Forward Reference in XML File
On May 24, 12:01 am, Zsolt Vasvari zvasv...@gmail.com wrote: Just use the @+id notation. @id will not create a resource ID. Interesting. I had no idea you could use that notation when referring to another component. I thought the + notation was reserved for the android:id tag, but I guess I didn't read the documentation closely enough. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Getting contacts with phone number only
that is for 1.6 API for contacts, not 2.x btw the query for 2.x API in that page returned void and crashes my program On May 24, 2:17 pm, Jitesh dedhiya jitesh.dedh...@gmail.com wrote: http://www.higherpass.com/Android/Tutorials/Working-With-Android-Cont... On Tue, May 24, 2011 at 5:01 PM, Abalufaske abalufa...@gmail.com wrote: Cursor Contactos = getContentResolver().query(RawContactsEntity.CONTENT_URI, new String[]{ RawContactsEntity.DATA_ID, RawContactsEntity.MIMETYPE, RawContactsEntity.DATA1, RawContactsEntity.DATA2, RawContactsEntity.DATA3, RawContactsEntity.DATA4, RawContactsEntity.DATA5, RawContactsEntity.DATA6, RawContactsEntity.DATA8 }, null, null, null); Hi everyone, i have this function to get all the contacts in the device but i want to get only those with phone number, how can i do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --Jitesh .V. Dedhiya--- Don't Learn To Hack but Hack To Learn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Career as an Andoid developer. Is there any point?
On Tue, May 24, 2011 at 8:29 AM, DanH danhi...@ieee.org wrote: Additionally, Android, as it's currently designed, does not have legs. The process model and UI are both too restrictive to be extendable to the pads and other new paradigms of the future. Care to explain that? I very much disagree. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: View.GONE but still accepts UI events
Because if it is animating, you don't want it to disappear and stop working until the animation is done. You are absolutely not supposed to just leave an animation attached to a view. Views that are currently animating are in a special state, and have a lot of special behavior applied to them while doing so. On Tue, May 24, 2011 at 1:03 AM, Anm andrew.n.marsh...@gmail.com wrote: Okay, so what is the rationale behind the animation null check? Why would a view that is either GONE or INVISIBLE receive events just because its animating (or more correctly, has a reference to a Animation object, regardless of whether it is actively animating)? Nothing I see in the Animation interface influences the view's visibility state directly. In the current code, we left animation objects attached to views to we could reuse them. Instead of setting the reference to null, we had set the Animation startTime to Long.MAX_VALUE, and later called start(). This also avoided a invalidate/reset cycle for views that were always the same size. On May 23, 3:24 pm, Dianne Hackborn hack...@android.com wrote: If you are receiving down events, then the view is almost certainly not set to GONE or it is still animating. The code for this part of dispatching in ViewGroup is pretty simply, and just immediately skips any non-visible views: for (int i = childrenCount - 1; i = 0; i--) { final View child = children[i]; if ((child.mViewFlags VISIBILITY_MASK) != VISIBLE child.getAnimation() == null) { // Skip invisible child unless it is animating. continue; } So be sure the view is actually gone, and that you haven't left an animation in it. On Mon, May 23, 2011 at 1:31 PM, Anm andrew.n.marsh...@gmail.com wrote: This morning, I'm trying to animate the various state of a simple game. I have a transparent cover ViewGroup with a start and other buttons. When the user hits start, the entire cover animates away. At the end of the animation, I set the cover View to GONE which looks correct, but the start button is still grabbing touch events instead of the game's view. I had to manually iterate over all the start button and other views within the cover to setClickable( false ) and setEnabled( false ) (not sure if both were really needed) before I started receiving my touch events again on the layers below the GONE ViewGroup. On May 23, 12:33 pm, Justin Anderson magouyaw...@gmail.com wrote: I have never run into this... What situations have you come across where this happens? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 1:13 PM, Anm andrew.n.marsh...@gmail.com wrote: This is something that I've run into a couple of times, and I'm just curious about the thought process behind such design, if intentional: When a view has visibility GONE, it is still allowed to accept UI events. This is especially strange in positional UI events like touch, where any positional state it likely an artifact of past/ invalidated state. My colleagues and I cannot come up with any scenario where this behavior would be desirable. Quite the opposite, it would seem to be an easy way to limit the view tree traversal for event handling. Any insight would be 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@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
Re: [android-developers] Force Killing Application
You killed the processes. Various parts of the system are finding the process disappeared on them and cleaning up. Your app doesn't get nicely told when the process is killed. On Tue, May 24, 2011 at 4:54 AM, Pandi pandiwelco...@gmail.com wrote: Hi, I am getting below message from logcat. On Force closing of application, what function will be called in application? OnDestroy (or) OnPause? If we do not have this implementation on application what will happen in activity manager? what is meaning of Channel is unrecoverably broken and will be disposed!? Any binder connection failed? Any idea on the above questions? Force finishing activity com.android.camera/.Camera I/ActivityManager( 142): Killing com.android.camera (pid=7392): user's request E/InputDispatcher( 142): channel '40af3d88 com.android.camera/ com.android.camera.VideoCamera (server)' ~ Consumer closed input channel or an error occurred. events=0x8 E/InputDispatcher( 142): channel '40af3d88 com.android.camera/ com.android.camera.VideoCamera (server)' ~ Channel is unrecoverably broken and will be disposed! E/InputDispatcher( 142): channel '407afb50 com.android.camera/ com.android.camera.Camera (server)' ~ Consumer closed input channel or an error occurred. events=0x8 E/InputDispatcher( 142): channel '407afb50 com.android.camera/ com.android.camera.Camera (server)' ~ Channel is unrecoverably broken and will be disposed! I/WindowManager( 142): WINDOW DIED Window{40af3d88 com.android.camera/ com.android.camera.VideoCamera paused=false} I/WindowManager( 142): WIN DEATH: Window{407afb50 com.android.camera/ com.android.camera.Camera paused=true} I/ActivityManager( 142): Process com.android.camera (pid 7392) has died. Thanks Regards, Pandi K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Camera App
This Intent is used to bring up a UI to have the user take a single picture and return it to you. Use ACTION_VIDEO_CAPTURE to instead have them record a video. All of the intent actions you can use to interact with the camera are defined here: http://developer.android.com/reference/android/provider/MediaStore.html http://developer.android.com/reference/android/provider/MediaStore.html On Tue, May 24, 2011 at 3:38 AM, New Developer secur...@isscp.com wrote: On my Zoom's home Screen it has the camera app, which has a button for front and back camera and then a slider/button for video or photo When it saves a photo is it IMG_mmDDhhMMss.jpg All of which is great / perfect Using the following code ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fName); values.put(MediaStore.Images.Media.DESCRIPTION, Image Capture by ME); imageUri = getContentResolver().insert(MediaStore.Images.Media. EXTERNAL_CONTENT_URI, values); intent = new Intent(MediaStore. ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); 1) I get no front / back button 2) I get no slider video / photo 3) It uses what I pass a fName. How do I just plainly call the Camera app that exists on the home screen with all it's standard features and functions. I want the front/back video/photo and the file naming is perfect. So how do I just all it from my app? thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Career as an Andoid developer. Is there any point?
I have seen that already, and while I don't disagree that for a very large number of apps javascript/html5 just makes sense. As it stands, it is just too limited. Try doing any realtime android game that'll actually work on low-end cell phones using javascript or html5 and you'll have to get around a lot of limitations, bugs, incomplete implementations, slow cpu, etc. The way it stands, the closer you get to the hardware the better you can control the performance. In my opinion Android hits a sweet spot with Java because it makes it both flexible enough and efficient enough for most moderately complex apps. (For example, you can't do byte sockets in javascript.) On Tue, May 24, 2011 at 12:37 AM, Doug beafd...@gmail.com wrote: Well, before you rashly declare web inferior to native, you might want to watch this talk from Google I/O: http://www.google.com/events/io/2011/sessions/html5-versus-android-apps-or-web-for-mobile-development.html Doug On May 23, 5:20 pm, Miguel Morales therevolti...@gmail.com wrote: Sorry, that was a bit too brief and actually not completely related. But, what I meant was that because of the layers of non-complexity the browsers and app makers provide there are limits to their use. Even though a browser implements javascript and you can do many things with it, it's non complexity adds layers/paths of cpu instructions. So, to clarify my statement, being good at programming is ultimately the most desired skill. These technologies, no matter how good and easy they get, have their limitations. On Mon, May 23, 2011 at 5:14 PM, Doug beafd...@gmail.com wrote: On May 23, 3:43 pm, Miguel Morales therevolti...@gmail.com wrote: This is because those interfaces are not turing complete. They're useless once you reach a certain level of complexity. This is why browser apps are only for the most basic of apps. Care to elaborate on that last statement? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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://solrpg.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 -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.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
Re: [android-developers] Performance issues drawing on a canvas
Drawing a bitmap is going to be faster than drawing a circle. Drawing a circle requires making a curved path and filling it. Drawing an anti-aliased circle will be a *lot* slower than drawing a bitmap. Basically you can assume, at least for software rendering, that the speed of operations is: (1) Rect fills are the fastest. (2) Bitmaps (that aren't scaled or otherwise transformed) are a close second. (3) Everything else is a lot slower. You'll notice that pretty much all of the Android UI itself is drawn with rect fills and bit blits. This is why. :) (Text is a special case of drawing bitmaps.) That said, profiling is still always the the best indication of what is slow. On Tue, May 24, 2011 at 5:33 AM, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas: http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots: http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d)) d.disableDot(); if (d.enabled) c.drawCircle(d.x, d.y,d.r, p); //dots.get(i).draw(c, p); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Justify alignment in text view
Hi, I want to align my text as justify alignment but unable to find an option for that. I can find right alignment, left alignment and center but unable to find the justify alignment. Please help me how to provide justify alignment for text view in android. 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] RatingBar
hey mohammed thank you i will keep this in mind. On Tue, May 24, 2011 at 7:43 PM, TreKing treking...@gmail.com wrote: On Tue, May 24, 2011 at 8:56 AM, neha jain neha.05...@gmail.com wrote: i have solved my problem without ny help of this group. Huh? If you solved your problem then why are you asking for code? I am new to android n if i asked this question,its not a big thing. I don't know what that means. If u dont wanna share code thn keep it to u. OK. - 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Upload a valid APK onto android market
Hi Guys, Below is a message I posted on Android market and on the Android Market as question, and I wondered if anyone here has had a verified basic4android apk that didn't want upload? Best, Tom Birchmire Download the app http://thomasofneedham.com/android/FlyAwayHome.apk The app works fine on my Android G1 - I'll have to get late model Droid to test I compiled my app using basic4android and got a Upload a valid APK.message. Jarsigner output indicated a valid apk X.509, CN=Tom Birchmire, O=thomasofneedham, C=us [certificate is valid from 5/24/11 9:52 AM to 9/21/49 9:52 AM] s = signature was verified m = entry is listed in manifest k = at least one certificate was found in keystore i = at least one certificate was found in identity scope jar verified. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Performance issues drawing on a canvas
Daniel, thanks for the link, it is VERY informative. Ok I'll separate the code into two loops. Until I get that finished are there problems with detecting how long the drawing/moving takes and then scaling the timeout appropriately? This won't prevent the frame rate from dropping below 1000/timeout but it should stabilize things: FYI I'm not writing a game per-se rather a live wallpaper --- void loop(){ //android.os.Debug.startMethodTracing(PacDroidTrace); float dt = android.os.SystemClock.elapsedRealtime(); moveActors(); detectActorCollisions(); detectDotCollisions(); drawFrame(); checkForWin(); dt = android.os.SystemClock.elapsedRealtime()-dt; mHandler.removeCallbacks(mDrawWallpaper); if (mVisible) { mHandler.postDelayed(mDrawWallpaper, timeout-(long)dt); } } On May 24, 11:48 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: On Tue, May 24, 2011 at 4:25 PM, neuromit stuart.lay...@gmail.com wrote: Thank you both for your suggestions, they are really helpful. I was able to optimise my code quite a bit. My collision detection is pretty primitive, so I'll definitely try to improve that. public boolean detectCollision(Point target, int dist) { return (Math.abs(this.x - target.x)=dist Math.abs(this.y - target.y)=dist); } @Danie, you mentioned that I should split the drawing form the animation code; What are the benefits of doing this? as both drawing and moving are driven by the same loop? Stuart, It is true that there must be a main loop for animation (or a game). However you ought to ensure that the drawing happens every X milliseconds, so that the frame-rate is as independent from your state computation as possible. Preferably it is a separate thread that sleeps X milliseconds, then wakes-up and paints the current state. State alone is updated constantly based on user input and game AI (in your case pressing of the buttons moves PacMan, while ghosts are chasing him automatically). If you do state updates and painting in one loop, then you will notice that game will feel differently, depending on how busy given level is (plus many more factors impeding the computation performance). What you will get, when you start optimising the collision detection is that you will no longer iterate through all points, and then the need to separate painting from state modification will be more obvious. I searched the nets for some tutorials, but found only this [*] which explains it to a lesser extent. I am sure you will be able to find something more comprehensive. Its for AWT, but the principles hold regardless. [*]http://journals.ecs.soton.ac.uk/java/tutorial/ui/drawing/animLoop.html Daniel On May 24, 8:33 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Stuart, There are few fixes straight away: - Have a predefined Paint object for your dots and use that instead of creating new Paint object each time you enter drawDots() - assign dots.size() to a local variable and keep testing that variable in the for loop, rather than calling size() method with each operation - don't detect collisions in your drawing code - worth testing whether Canvas.drawBitmap() (cached bitmap of a dot) could be quicker than Canvas.drawCircle(); first one only copies memory byte by byte, while second does some computation too - and finally as String said: profile it Then you have to think: - how complex is your collision detection? it has to be optimised and you should not be iterating through all dots testing for potential collision with PacMan; if you think about it, your dots don't move and PacMan moves incrementally; there are few clever strategies that you could use; in general collision detection optimisation strategies are not trivial, but I am sure you could find something that would work well for you and would not be too hard to implement; have a look here as an entry to possible ideas:http://en.wikipedia.org/wiki/Collision_detection On Tue, May 24, 2011 at 12:57 PM, neuromit stuart.lay...@gmail.com wrote: I'm writing a pacman style game that has a lot of things to be drawn, namely, the dots that pacman likes to eat. I'm finding that the drawing of the dots is greatly hampering the performance of the game. If I turn them off my app consumes much fewer cpu cycles than if they are left on. here is the code i'm using to draw the dots:http://paste2.org/p/1432169 void drawDots(Canvas c) { if (!this.drawDots) return; Paint p = new Paint(mPaint); p.setColor(this.dotColor); for (int i=0; idots.size(); i++) { Dot d = dots.get(i); if (this.pacdroid.detectCollision(d))
[android-developers] Re: Getting contacts with phone number only
that is for 1.6 API for contacts, not 2.x btw the query for 2.x API in that page returned void and crashes my program On May 24, 2:17 pm, Jitesh dedhiya jitesh.dedh...@gmail.com wrote: http://www.higherpass.com/Android/Tutorials/Working-With-Android-Cont... On Tue, May 24, 2011 at 5:01 PM, Abalufaske abalufa...@gmail.com wrote: Cursor Contactos = getContentResolver().query(RawContactsEntity.CONTENT_URI, new String[]{ RawContactsEntity.DATA_ID, RawContactsEntity.MIMETYPE, RawContactsEntity.DATA1, RawContactsEntity.DATA2, RawContactsEntity.DATA3, RawContactsEntity.DATA4, RawContactsEntity.DATA5, RawContactsEntity.DATA6, RawContactsEntity.DATA8 }, null, null, null); Hi everyone, i have this function to get all the contacts in the device but i want to get only those with phone number, how can i do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --Jitesh .V. Dedhiya--- Don't Learn To Hack but Hack To Learn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SimpleCursorAdaptor ListView using an TextView and ImageView with over 400+ rows Memory Issues
Is this the best way or are there others? I extend SimpleCursorAdapter and override getView(int position, View convertView, ViewGroup parent) I retrieve my Cursor, inflate my ImageView and TextView, pull the data from the Cursor and populate the TextView and ImageView on the ImageView I store my images in the database as Blob's. When I retrieve my Blob I pull it out as a byte[] and convert it to a Bitmap as below: Bitmap bmp = BitmapFactory.decodeByteArray(img, 0, img.length); Then I set my Bitmap on my ImageView as : iv.setImageBitmap(bmp); Now I can scroll down fine no issues but when I start scrolling back up the list I get major memory issues and sporadic jumping(from when the garbage collection catches up). Can anyone tell me what the best way to accomplish this task would be? Is there a way to recycle the bitmaps that aren't in view and when approaching them pull them and display again? I've searched for months and tried various techniques but I'm at a loss to finding the one that will allow me to accomplish this task. Thank you in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Career as an Andoid developer. Is there any point?
I figured you would, and I'm not interested in getting into a p***ing match, so I'm not going to elaborate. On May 24, 11:09 am, Dianne Hackborn hack...@android.com wrote: On Tue, May 24, 2011 at 8:29 AM, DanH danhi...@ieee.org wrote: Additionally, Android, as it's currently designed, does not have legs. The process model and UI are both too restrictive to be extendable to the pads and other new paradigms of the future. Care to explain that? I very much disagree. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Career as an Andoid developer. Is there any point?
Ooookay. On Tue, May 24, 2011 at 10:54 AM, DanH danhi...@ieee.org wrote: I figured you would, and I'm not interested in getting into a p***ing match, so I'm not going to elaborate. On May 24, 11:09 am, Dianne Hackborn hack...@android.com wrote: On Tue, May 24, 2011 at 8:29 AM, DanH danhi...@ieee.org wrote: Additionally, Android, as it's currently designed, does not have legs. The process model and UI are both too restrictive to be extendable to the pads and other new paradigms of the future. Care to explain that? I very much disagree. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Widget (Home Screen Widgets) size in Honeycomb
No commment on this topic? Tom On May 23, 9:16 pm, Tomáš Hubálek tom.huba...@gmail.com wrote: Hello, I followed widget definition guidelines described athttp://developer.android.com/guide/topics/appwidgets/index.html#MetaData and I suspect that formula for calculation of widget size ((number of cells * 74) - 2) is wrong forHoneycomb. If wanted to create widget of size 6x4, so I added there 442x294 but this widget is reported byHoneycomblauncher as 5x4. Could anybody confirm/correct/explain my observation and update official documentation if it is wrong? Thanks a lotTom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Widget (Home Screen Widgets) size in Honeycomb
Where did you put those values of dimension? it have to be on value folder, widget appwidget-provider xml at what scale? dp ? it works in other device? maybe you have correctly created but the size of your widget Layout not using the entire area... On 23 maio, 16:16, Tomáš Hubálek tom.huba...@gmail.com wrote: Hello, I followed widget definition guidelines described athttp://developer.android.com/guide/topics/appwidgets/index.html#MetaData and I suspect that formula for calculation of widget size ((number of cells * 74) - 2) is wrong for Honeycomb. If wanted to create widget of size 6x4, so I added there 442x294 but this widget is reported by Honeycomb launcher as 5x4. Could anybody confirm/correct/explain my observation and update official documentation if it is wrong? Thanks a lot Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Showing Static directions on Google Map View in android
Hi, I was going thru the Google terms of conditions @http:// code.google.com/android/maps-api-signup.html and found that turn-by- turn navigation is not allowed using android MAP view. I have a reqirement similar to what at http://groups.google.com/group/android-developers/browse_thread/thread/d5d3d9b52c9159c4# that i need to show static directions on the google MAP view i.e. i have the current location from GPS and the target location lat long. I will show the path after user wants to see the next leg in path(not in sync with current location). Please let me know the legal hurdles if any. thanks sam -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App Widget (Home Screen Widgets) size in Honeycomb
Thanks for your answer. Units are dip (not dp, I'll try to change dip to dp). According my observation this formula works well when widget's size is bellow 5 icons. The same behavior in emulator and on Acer Iconia Tab. Tom On Tue, May 24, 2011 at 9:30 PM, KlausSK8 klausmagalh...@gmail.com wrote: Where did you put those values of dimension? it have to be on value folder, widget appwidget-provider xml at what scale? dp ? it works in other device? maybe you have correctly created but the size of your widget Layout not using the entire area... On 23 maio, 16:16, Tomáš Hubálek tom.huba...@gmail.com wrote: Hello, I followed widget definition guidelines described athttp:// developer.android.com/guide/topics/appwidgets/index.html#MetaData and I suspect that formula for calculation of widget size ((number of cells * 74) - 2) is wrong for Honeycomb. If wanted to create widget of size 6x4, so I added there 442x294 but this widget is reported by Honeycomb launcher as 5x4. Could anybody confirm/correct/explain my observation and update official documentation if it is wrong? Thanks a lot Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --- Tom Hubalek (tom.huba...@gmail.com), http://android.hubalek.net, http://blog.hubalek.net/ http://facebook.com/thubalek, http://www.linkedin.com/in/thubalek http://twitter.com/thubalek, http://twitter.com/android_dev_tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Two issues saving heap dumps...
I was watching the Google I/O video on Memory Management, and the presenter said that if you open a heap dump in MAT that you obtained from DDMS you have to convert it with the hprof tool with a -conv flag. He invoked this at the command line, so I attempted to do the same. I am on Windows, and I get an error that the command does not exist. Is this command not part of the Android, Eclipse or MAT tools? Since there was no mention of any additional install required, I expected to find this in the eclipse or mat directories as a .bat file or something to that effect. I know that I can generate it from within Eclipse, but then I have to go hunting through my AppData for the temp file generated. When I generate the heap dump in Eclipse, the dump is saved to a temp file which is opened as plain text in the editor. I'm unable to save this because I get an error that some characters cannot be mapped using Cp1252 char encoding. I read that the way to set another default encoding (UTF-8, for example) that would allow me to save it is to go to File - Properties. The problem is that when I attempt to do that, I get another error dialog saying that there are no property pages for .hprof. I am able to navigate into my temp directory and pull out the hprof file and open in MAT, but that's a bit of a pain. Anyone have any recommendations on either or both issues? Thanks! Rich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en