Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?
From my guess the database gets corrupted because of (some) flash disk controllers that lie to the OS and do not flush/sync properly the FS before crash/reboot, so even with transactions the DB gets corrupted in some cases. Le vendredi 20 septembre 2013 02:34:51 UTC+2, Kostya Vasilyev a écrit : Yes, but if the database can't be opened at sqlite level, it would only help the app know that, not recover the data... And there are other ways to detect that. Back to square one: why do they get corrupted in the first place? Nathan 20 пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ 2013пїЅпїЅ. 4:05:53 пїЅпїЅпїЅпїЅпїЅпїЅпїЅ: On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java Look for a method called onCorruption. It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that could do something different. I have not done so. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Python 3 APK
Hi, For Python 3 devs who want to embed their code in an APK I just added the Python 3 apk template: http://code.google.com/p/android-python27/ A. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: GC calls from other processes causing slowdown (?)
The frame drop looks huge as since Gingerbread the GC is clamied to work concurrently. On Sun, Mar 31, 2013 at 4:38 PM, Jason Polites jason.poli...@gmail.comwrote: I'm 90% sure it wasn't, but I make this claim based on profiling heap allocations and I don't think I confirmed that the process ID was actually different. I'll confirm (or otherwise) this and post back. On Mar 31, 2013 2:52 AM, RichardC richard.crit...@googlemail.com wrote: Is/was 2590 your process? On Sunday, March 31, 2013 8:07:50 AM UTC+1, Jason wrote: Hey folks, So I'm in the midst of creating a game and I'm hitting some occasional slow down which seems to be a result of GC calls triggered by other processes on the device. I have profiled *my* app and am 100% certain there are no allocations going on while the game is running, but in certain circumstances (i.e. most of the time) logcat is spewing out GC_CONCURRENT freed...blah blah entries. Here's a typical output from the console: 03-30 23:58:58.868: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8758K/9224K, paused 5ms+3ms, total 29ms 03-30 23:59:05.970: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 408K, 6% free 8757K/9228K, paused 4ms+2ms, total 30ms 03-30 23:59:13.063: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9224K, paused 4ms+4ms, total 33ms 03-30 23:59:20.142: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9228K, paused 5ms+3ms, total 30ms 03-30 23:59:27.227: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9224K, paused 6ms+2ms, total 31ms 03-30 23:59:34.306: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9232K, paused 4ms+2ms, total 23ms 03-30 23:59:41.392: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9224K, paused 4ms+2ms, total 27ms 03-30 23:59:48.470: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 8757K/9232K, paused 5ms+2ms, total 30ms Now I have no idea which processes are to blame, but I did notice that when other events on the device occur it can lead to a spike in (I assume) CPU usage which causes a visible drop in frame rate in the game. For example my wifi connection dropped out one time and the logs went crazy with other processes complaining about a lost connection and trying desperately to tell me about it. This caused a fairly severe jolt in the game dropping the frame rate from 60fps to around 20fps for about a minute while everything settled down and got on with things. I had noted on a previous threadhttps://groups.google.com/forum/?fromgroups=#!searchin/android-developers/Garbage$20collector$20suspend/android-developers/85yj9CZEqH4/YIiElemqiuoJa statement from Dianne Hackborn: *as of 1.6 such GCs in a background process can not together take more than ~10% of the CPU from any foreground process that wants to run.* This sounds good, but I'm wondering if this is still the case as of 4.2.2? I am seeing behavior that appears to indicate this may not the case. Is there anything I can do to ensure other processes are not using more than 10% of CPU (or any number really)? Or some other restrictions/priorities that might help alleviate this external resource usage? Thanks, Jason. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/yQVg0WzChko/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/yQVg0WzChko/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send
[android-developers] Re: Enumerate sd cards
I'm using this : http://renzhi.ca/2012/02/03/how-to-list-all-sd-cards-on-android/ Le jeudi 7 mars 2013 05:29:26 UTC+1, yve...@gmail.com a écrit : I am trying to develop an app which has a feature like FTP. So, at the beginning, I want to enumerate all sd card storages on the device, and ask user to pick where they want to store the data. Then if external sd card is removed, I want to change to internal storage if it set to external sd card. If external sd card is put back in, I want to prompt user to see if they want to change back to the external sd card. So, I want to know, first, how to enumerate all storage locations, second, monitor sdcard insert/eject events. Suggestions and, even better, sample codes? 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Accelerated HTML Rendering issue (relative vs absolute position)
Hi, Using a Webview to render content, I noticed that Hardware Acceleration (ICS) triggers rendering issues when HTML elements are using absolute positions, relative positions are fine. Is it normal or know Webkit behaviour ? I would have thought WebKit's HTML parser would parse, and calculate positions, and layers independent of any hardware acceleration. Then by the time any HW acceleration code is involved, that code would be dealing with absolute coordinates, layers, sizes, etc. Perhaps not. Thanks for hints that would help understanding this behaviour. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] is Google going to ship Chrome as a default browser for next OS release
What about the Java Webview binding then, would it be replaced by a ChromeView ? Le jeudi 31 janvier 2013 14:50:54 UTC+1, Dan a écrit : On Wednesday, January 30, 2013 9:21:26 PM UTC-5, Mark Murphy (a Commons Guy) wrote: We will find out when the next version of Android ships. I will be reasonably surprised if we find out before then. And, bear in mind that the choice of browsers is really up to the device manufacturer. Given that stock 4.2.1 on the Galaxy Nexus has the Browser and 4.2.1 on the Nexus 4 has Chrome, it doesn't look like Android version matters as much as OEM choice. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Android memory usage API (USS/PSS) Vs smem report
Reading how to mesure accurately a process memory usage (http://elinux.org/Android_Memory_Usage), I've been using USS provided by PrivateDirty: http://developer.android.com/reference/android/os/Debug.MemoryInfo.html Per D. Hackborn comment (http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android/2299813#2299813), USS reported by the Android API is PrivateDirty. However when using smem (http://www.selenic.com/smem/), I noticed that USS reported by smem is actually PrivateDirty + PrivateClean, so I was wondering why this difference and what's more accurate ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Set android:largeHeap = true programmatically ?
I saw since API 11 we can add in the AndroidManifest.xml: android:largeHeap = true Can I set this programmatically ? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to improve image quality in Android Webkit (comparing with iOS)
Sorry I've no example myself, you would find on the net. On Thu, Nov 1, 2012 at 8:35 PM, huberte svend.wal...@gmail.com wrote: thanks Anthony, may I have a code example please ? Le mercredi 31 octobre 2012 06:39:24 UTC-4, Anthony Prieur a écrit : You might get better results trying to use the Javascript 'viewport'. Le mardi 30 octobre 2012 16:24:26 UTC+1, huberte a écrit : Trying to load http://www.sciences-physiques.eu/appli/oneimage/ both in iOS and Android (SGS2). Image is 1600*2262 The result is a better image on iOS. I know android can do better, because I had an application with such big image downsized, and the text was clearer. I red a lot about adding some code in css, but it seems that it does not apply to webkit Here are the screenshots : http://tof.canardpc.com/show/9144d047-0aaf-4906-9c96-1a991112f9fc.html http://tof.canardpc.com/show/36008198-e6ef-4b02-820b-fe2ca8b8df1c.html The code is : !DOCTYPE HTML html manifest= lang=en-US head meta charset=UTF-8 titlecarimage/title style type=text/css img { width: 100%; } html, body { height: 100%; background-color: #1985D0 } /style body img src=1.png / /body /html just that you know, if I put max-width instead of width, the result is worse than with only the width attribute Because I'll have physics, chemistry, math and for good rendering I use Latek. So I have to use image. On Android my pupils say I could use something better than a bad scanner. On iOS they say it's like in their books... 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 improve image quality in Android Webkit (comparing with iOS)
You might get better results trying to use the Javascript 'viewport'. Le mardi 30 octobre 2012 16:24:26 UTC+1, huberte a écrit : Trying to load http://www.sciences-physiques.eu/appli/oneimage/ both in iOS and Android (SGS2). Image is 1600*2262 The result is a better image on iOS. I know android can do better, because I had an application with such big image downsized, and the text was clearer. I red a lot about adding some code in css, but it seems that it does not apply to webkit Here are the screenshots : http://tof.canardpc.com/show/9144d047-0aaf-4906-9c96-1a991112f9fc.html http://tof.canardpc.com/show/36008198-e6ef-4b02-820b-fe2ca8b8df1c.html The code is : !DOCTYPE HTMLhtml manifest= lang=en-UShead meta charset=UTF-8 titlecarimage/title style type=text/css img { width: 100%; } html, body { height: 100%; background-color: #1985D0 } /style body img src=1.png / /body/html just that you know, if I put max-width instead of width, the result is worse than with only the width attribute Because I'll have physics, chemistry, math and for good rendering I use Latek. So I have to use image. On Android my pupils say I could use something better than a bad scanner. On iOS they say it's like in their books... 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: Difference between Android and Linux Kernel ?
You might want to take a look at Linaro toolchain which speedup a lot Android: http://www.youtube.com/watch?v=mrQRYmYip6Q Le vendredi 19 octobre 2012 08:13:53 UTC+2, chain_chelliah a écrit : I know Android uses the Linux kernel. I hope the Android developers did some modification with original Linux Kernel, especially in standard C libraries. My question is whether the processing speed of Linux and Android kernel are the same or different. I did some tests in different OS like windows and Redhat Linux and unbuntu and android. By the results Android is very slow. Android uses same Linux kernel... why this process variations but i know we cant expect same speed as in Linux, but I had huge differences (for example: Windows take 11 sec, Linux takes 4 sec, but Android takes 55 sec to complete my test) So What is the reason for this speed variation between these two linux kernels (Android and redhat both are 2.6)? I'm using Android Kernel version 3.2.0. Thanks and Regards, Sangili Pandian C -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Difference between Android and Linux Kernel ?
Try first JellyBean image, reading comments seems JB already added a portion of Linaro optimization. Linaro: http://www.linaro.org/downloads/ On Fri, Oct 19, 2012 at 9:17 AM, chain_chelliah sangilipandian.chell...@marudham.co.in wrote: Thanks for the reply, I'm using Beagle Bone device as developing kit. Is this OS support in ARM platform. If so, where i can download it. On Friday, October 19, 2012 12:32:36 PM UTC+5:30, Anthony Prieur wrote: You might want to take a look at Linaro toolchain which speedup a lot Android: http://www.youtube.com/watch?v=mrQRYmYip6Q Le vendredi 19 octobre 2012 08:13:53 UTC+2, chain_chelliah a écrit : I know Android uses the Linux kernel. I hope the Android developers did some modification with original Linux Kernel, especially in standard C libraries. My question is whether the processing speed of Linux and Android kernel are the same or different. I did some tests in different OS like windows and Redhat Linux and unbuntu and android. By the results Android is very slow. Android uses same Linux kernel... why this process variations but i know we cant expect same speed as in Linux, but I had huge differences (for example: Windows take 11 sec, Linux takes 4 sec, but Android takes 55 sec to complete my test) So What is the reason for this speed variation between these two linux kernels (Android and redhat both are 2.6)? I'm using Android Kernel version 3.2.0. Thanks and Regards, Sangili Pandian C -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Difference between Android and Linux Kernel ?
Asks directly to Linaro team, would be better infos there. On Fri, Oct 19, 2012 at 9:54 AM, chainz roid sangilikumar.muniya...@marudham.co.in wrote: Hello Mr.Anthony Prieur chain_chellaih using Beaglebone. but in the download link, which one yo give the target boards are Origen PandaBoard Snowball Versatile Express** Is the Jellybean image, which one is optimized, have the kernel with proper board config files for Beaglebone ? On Friday, October 19, 2012 11:43:53 AM UTC+5:30, chain_chelliah wrote: I know Android uses the Linux kernel. I hope the Android developers did some modification with original Linux Kernel, especially in standard C libraries. My question is whether the processing speed of Linux and Android kernel are the same or different. I did some tests in different OS like windows and Redhat Linux and unbuntu and android. By the results Android is very slow. Android uses same Linux kernel... why this process variations but i know we cant expect same speed as in Linux, but I had huge differences (for example: Windows take 11 sec, Linux takes 4 sec, but Android takes 55 sec to complete my test) So What is the reason for this speed variation between these two linux kernels (Android and redhat both are 2.6)? I'm using Android Kernel version 3.2.0. Thanks and Regards, Sangili Pandian C -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: GPU Acceleration - still not worth using on 4.1.1?
Is anyone else seeing as much weirdness with GPU accel as I am? I do see troubles too with GPU, especially this one: ICS WebView blinks when Hardware Acceleration is used http://code.google.com/p/android/issues/detail?id=25722 , very annoying as no HW acceleration = no HTML5 video tag working. Seems you mentionned the Webview blink is fixed in 4.1.1, but the bug report looks it's not, could you confirm ? Le mardi 16 octobre 2012 19:00:48 UTC+2, Kostya Vasilyev a écrit : I'm seeing strange issues with GPU acceleration in my app. First, on 4.0.3 / 4.0.4, a WebView with a dark background color flashes white whenever I reload its data. It does this over the whole screen, which looks really nasty in a multi-panel (fragment) UI. This is on an Asus TF101, Sonty Tablet S, Acer A100 -- all Tegra 2 devices. Ok, so I turn off hardwareAccelerated in the manifest for API 16. Now, if the user forces GPU acceleration on, on some devices, with some content, WebView displays nothing, staying blank. Disabling force GPU in the device's settings magically makes everything work again. I've seen the advice to check if GPU is forced, and showing a warning message, but since the issue only happens occasionally, I'm not sure if it's worth it to irritate those who have force GPU on without bad consequences. This is WebView, it's not even my code (which is of course buggy and a crappy), but this is part of Android. I've not seen this failure on my devices, identical to those of users who'd run into this. Enter Android 4.1.1. Ok, the WebView background flash is fixed, so I enable hardwareAccelerated in the manifest as a conditional boolean just for API 16 and higher. New issue: I have an activity with an EditText, whose content I set from code (a message draft) and sometimes append to (a signature). The appended text sometimes renders on top of the other text, making a big mess. Ok, fine, I force a software layer on this EditText. This resolves the text overlap issue, but now some content appears to render white on white: the view scrolls as much as it's supposed to, shows the glowing overscroll indicators, but there is nothing to see. If I turn hardwareAccelerated off in the manifest or remove setLayerType(SOFTWARE), the same content (and I mean the same content, it's loaded from a database, and it's deterministic) renders just fine. So here what I'm trying to understand: - Is anyone else seeing as much weirdness with GPU accel as I am? - Am I just so special hitting one bug after another? - Is GPU acceleration, by and large, unexpectedly broken and randomly unusable, even in 4.1.1 on the Galaxy Nexus? - Do I have better things to do than chase one Android bug after another? (I'll leave the sad story about how action bar in 4.0 / 4.1 overlaps icons on top of the overflow button for some other time... good thing I have a replacement...) -- 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] startActivityForResult() from service
Create a custom facade for the built in SL4A RPC server as explained here: https://code.google.com/p/android-python27/wiki/TutorialHowToCreateCustomRpcFacade And POST the result back to Java from you Python script e.g. droid.myResult(xxx) Le jeudi 11 octobre 2012 14:27:17 UTC+2, Archana a écrit : Hi, I have to execute a Python script from my service. I need to wait till the script has finished execution and returns a result. Hence am using it. On Thursday, October 11, 2012 3:20:41 PM UTC+3, Mark Murphy (a Commons Guy) wrote: On Thu, Oct 11, 2012 at 8:13 AM, Archana ramalinga...@gmail.com wrote: Hi, I have defined a service. I need to call startActivityForResult(intent,REQUEST_CODE) from this. That is not supported. IMHO, it does not even make any sense. Why do you think that you need to do this? -- 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 4.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Video (VideoView) flickering and/or doesn't display on ICS (but works fine on Android = 2.x)
Does changing android:targetSdkVersion=15 to android:targetSdkVersion=11 change something ? I noticed in my app (Webview/VideoView)that the behaviour is different. Removing the HW acceleration fixed the flicking for me. Le lundi 7 mai 2012 08:34:17 UTC+2, Mathias Lin a écrit : I have an app with a VideoView, which works fine on all Android devices up to 2.x (Gingerbread), but has problems with devices running ICS. On some devices, the videos don't play, on other devices the video doesn't play when rotating the device. Instead, the screen starts flickering. (tested on: SGS2, HTC Desire, LG L7, Ainovo Paladium tablet, all running 4.0.x) I've already tried changing the manifest to android:hardwareAccelerated=false and also set the VideoView layer type to mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); The code itself is very basic and just using the standard video view and media controller: setContentView(R.layout.act_video_player); mVideoView = (VideoView) findViewById(R.id.vw_player); mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); MediaController mc = new MediaController(this); mVideoView.setMediaController(mc); Uri uri = Uri.parse(mVideoURI); mVideoView.setVideoURI(uri); mVideoView.requestFocus(); and the manifest: uses-sdk android:minSdkVersion=7 android:targetSdkVersion=15/ supports-screens android:largeScreens=true android:normalScreens=true android:smallScreens=false android:resizeable=true android:anyDensity=true/ application ... android:hardwareAccelerated=false/ Below is the complete log, of which I think the following lines are relevant: W/QCvdec ( 2751): get_config: unknown param 117440527 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560 W/QCvdec ( 2751): get_extension_index: Error, Not implemented E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed Anybody else having experienced issues with video playback on ICS? Complete log here: D/QCvdec ( 2751): VDEC Open with new H 560 and W 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b60 , 33554433 D/QCvdec ( 2751): portDefn-nBufferSize 806400 m_height 560 m_width 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b60 , 33554433 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] Enable frame by frame mode I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804c6c , 2130706434 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b1c , 33554433 D/QCvdec ( 2751): portDefn-nBufferSize 806400 m_height 560 m_width 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_config 675aec W/QCvdec ( 2751): get_config: unknown param 117440527 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560 W/QCvdec ( 2751): get_extension_index: Error, Not implemented E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_state 675aec I/QC_CORE ( 2751): OMXCORE: qc_omx_component_deinit 675aec I/QC_CORE ( 2751): Calling FreeHandle in state 1 E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.Video.Decoder' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.SEC.MPEG4.Decoder' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.mpeg4.decoder' E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.mpeg4.decoder' E/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Video O/P format.eColorFormat 0x41804bf8 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Enable frame by frame mode W/OMXCodec( 2751): Failed to set frame packing format on component I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 352 x 288 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 352 x 288 @ (0, 0) E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.AAC.decode' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.aac.decoder' E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.aac.decoder' D/MediaPlayer( 6712): getMetadata I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0) I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0) D/SurfaceTexture( 137): SurfaceTexture::dequeuebuffer: MIN
[android-developers] Re: Why would SIGSEGV crash occur in Galaxy S3 Android WebView?
Try HW acceleration ON or OFF, ICS Webview has troubles with some CSS/CSS3 + HW acceleration. Also try to lower android:targetSdkVersion to 11 for example. Le jeudi 11 octobre 2012 08:09:54 UTC+2, Johnabre a écrit : I have a complex, interactive HTML5 in an Android WebView - and it works fine on basically all platforms except Galaxy S3. On Galaxy S3 (Android 4.0.4), once out of every 5 times or so, just after the load completes, /system/lib/libwebcore.so tries to access invalid memory and a Fatal signal 11 (SIGSEGV) at [various addresses] (code=1) is thrown. The HTML5 is a tiny battle where enemies appear and the user slashes them to proceed. In between battles are normal html pages: normal page - HTML5 battle - normal page - HTML5 battle - normal page - HTML5 battle. The HTML5 doesn't do anything particularly out-of-the-box - there's a lot of -webkit-animation calls... .enemy { position:absolute; opacity:0; -webkit-animation:enemyAnim 0.6s linear 0.2s; } …that reference a lot of -webkit-keyframes... @-webkit-keyframes enemyAnim { from { -webkit-transform: matrix(1, 0, 0, 1, 144.25, 150.25) scale(1, 1); opacity:1; } 8.33% { -webkit-transform: matrix(1, 0, 0, 1, 189.406, 102.206) scale(1.3066, 1.3066); opacity:1; } 16.66% { -webkit-transform: matrix(1, 0, 0, 1, 200.424, 82.649) scale(1.414, 1.414); opacity:1; } /*…*/ And a fairly complex div tree, but nothing particularly experimental. There's some level of Javascript, but the hangs appear to occur even with all Javascript turned off. Has anyone ever had a problem with a Galaxy S3 being…different? No Android 2.x devices have this problem, and even a Galaxy Nexus running 4.1.1 doesn't seem to have any particular problem. I've never been tempted to write to Stack Overflow before, but this is really vexing me... Searching on Android WebView sigsegv crash 4.0.4 WebView sigsegv crash gives several issues, but: - webview.clearCache()/webView.destroyDrawingCache() don't seem to have an effect (though this hang is clearly a memory issue, adding/removing System.gc()s in various places had no great result) http://stackoverflow.com/questions/4973310/signal-11-sigsegv-crash-android - There's no use of canvas as in http://stackoverflow.com/questions/10989120/very-strange-crash-drawing-on-canvas-on-android-4-0-3-a-libc-fatal-signal-11 (Yes I know - calling this page HTML5 is a bit of a stretch) - There's no use of clearView() as in http://stackoverflow.com/questions/12261523/execute-webview-loadurl-after-webview-clearview-multitimes-will-cause-crash - There's no use of preserve-3d as in http://code.google.com/p/android/issues/detail?id=16563 - I looked at the changelist for android webkit looking for suspicious fixes after 4.0.4, and thought I had something with the below, but rooting the S3 and taking it to 4.1.1 didn't fix the issue: https://github.com/teamgummy/android_external_webkit/commit/61e0d189f2b74650bf72a6a2820f66a8b17c3d06 Since some of the crashes are occuring during memory free()s, I know that things are being free'd around the time of the crash and my gut feeling is that some things are being freed mid-render that shouldn't be. It's frustrating because SIGSEGVs should be physically impossible with pure HTML, JS, CSS =/ Below is a sample crash report. Note that the crash location is not limited to the below; crash reports don't seem to be wildly different but there seems to be some variation in location. 10-08 17:34:06.605: I/DEBUG(524): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 10-08 17:34:06.605: I/DEBUG(524): Build fingerprint: 'samsung/m0xx/m0:4.0.4/IMM76D/I9300XXBLH1:user/release-keys' 10-08 17:34:06.605: I/DEBUG(524): pid: 7443, tid: 7443 cool.tiny.rpg.battle 10-08 17:34:06.605: I/DEBUG(524): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad 10-08 17:34:06.605: I/DEBUG(524): r0 deadbaad r1 0001 r2 4000 r3 10-08 17:34:06.605: I/DEBUG(524): r4 r5 0027 r6 400d8540 r7 400e74f4 10-08 17:34:06.605: I/DEBUG(524): r8 01fa7160 r9 10 bed6a584 fp 41d79970 10-08 17:34:06.605: I/DEBUG(524): ip sp bed6a2b0 lr 400b9639 pc 400b59c8 cpsr 6830 10-08 17:34:06.605: I/DEBUG(524): d0 d1 4343 10-08 17:34:06.605: I/DEBUG(524): d2 43b6800041a0 d3 41a84302 10-08 17:34:06.610: I/DEBUG(524): d4 8000 d5 43aa3f80 10-08 17:34:06.610: I/DEBUG(524): d6 43a44343 d7 43cb41a0 10-08 17:34:06.610: I/DEBUG(524): d8 4082f000 d9 4082f400025e 10-08 17:34:06.610: I/DEBUG(524): d10 44604500 d11 10-08 17:34:06.610: I/DEBUG(524): d12
[android-developers] Re: Android App - Python+Eclipse
You can use https://code.google.com/p/android-python27/ to embed your project (+Python2.7 interpreter) in an APK. Le jeudi 20 septembre 2012 23:09:33 UTC+2, Prat a écrit : Hello, I am a beginner of android apps. I am using eclipse to develop an android app for samsung galaxy tab. I have installed pydev plugin for eclipse too. However, I am unsure of how to bundle my python files and create a new android app. Basically, I do not know, where to put my python files (src/gen/res etc). Please help me with a reference material that can give detailed notes on the procedure. Thanks. Regards, Prat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en