[android-developers] Hardware updates
It has been a few years now that Google released the platform development Kit (PDK) When are we going to see manufacturers start updating their hardware to run the latest versions of android ? OR when are we going to see Google pressure manufacturers to update their hardware. When Google purchase Motorola Mobility I thought this would be great. Sadly it has meant nothing, nothing at all and developers are still the worse for it. It constantly seems you buy an android device with the latest OS and then a new version of android comes out and your hardware becomes obsolete because the manufacturer does NOT release an update for it Case in point purchased a Galaxy Tab Pro 10.1 it is stuck at KitKat because no update has been made. Thus all the nice features in Lollipop , Marshmallow and N are basically useless because the manufacture couldn't be bother to take care of their users. When is Google going to put a stop to this ? When ? Here is my 2c proposal for devices 5 years or newer. If the device is running the latest version of android the manufacturer pays a license fee of $ 0.05 per device in operation if the device is running the latest version - 1 the manufacturer pays a license fee of $ 5.00 per device in operation if the device is running the latest version - 2 the manufacturer pays a license fee of $15.00 per device in operation if the device is running the latest version - 3+ the manufacturer pays a license fee of $ 30.00 per device in operation We all have access to the figures that tells us the number of devices running which version of android. Basically if the manufacturer is not willing or able to update THEIR own hardware with the latest version of android they need to pay extra Either that or Google needs to only release a new version of android every 4 years HEAVENS NO ! ! ! ! Would like to hear what other developers think, Also what Google plans to do ? Thanks in advance -- 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. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/aebf1c78-3515-4c48-aeb1-6c43682c366d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Testing IAP
Hi All I'm looking at adding In App Purchases to my app, to allow for features to be unlocked I have downloaded and looked through the example code (Dungeons) My question is testing Am I correct in saying, that to test you have to actually purchase the item and then process a refund for each item ? If so, will this not result in multiple debits and credits against the account and CC linked to the account ? Or is there another mechanism to test that purchases work 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] Writing in C++ code ?
Firstly, thanks to all who responded If I write it as an html5 or web app Does this not mean that it *HAS* to be connected to the Net. and thus either a WiFi access or 3G access *MUST* be available ? Or is there someway to be a web app that runs on myself 127.0.0.1 but I don't think the tablet's run a web server I had seen about phone gap and html5 but this above issue is a concern for me. I have also looked at things like MadeWithMarmalade (not that impressed) and XmlVM (has potential) Thanks again On 06/04/2012 09:09 AM, Michael Leung wrote: But I do not think even you write your app in c++ which can work in other platform. There are some Framework claimed they can make compile the code into various os. For example, http://xamarin.com/monotouch But I think the best way is to write a html5 app Regards, Michael http://www.itblogs.info http://www.michaelleumg.info 2012-6-4 上午4:02 於 New Developer secur...@isscp.com mailto:secur...@isscp.com 寫道: By default I know that android apps are developed using Java and Eclipse does this well Is there anyway we could write our code in C++ and yet still have it packaged and create an apk that runs ? Trying to find the best method to create multi platform applications that run on Android, iOS, Windows, OS X Any thoughts ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Writing in C++ code ?
By default I know that android apps are developed using Java and Eclipse does this well Is there anyway we could write our code in C++ and yet still have it packaged and create an apk that runs ? Trying to find the best method to create multi platform applications that run on Android, iOS, Windows, OS X Any thoughts ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Convert PDF to Thumbnail JPG
Is there a method to convert the first Page of a PDF to a Thumbnail JPG ? Is it a part of the PDF reference manual ? 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] Convert PDF to Thumbnail JPG
okay? In my code I am able to convert JPG and 3gp to a thumbnail. I would like to do the same with a PDF. Does anyone know of a lightweight Android PDF library that will do this OR can one use the PDF Viewer in Android to extract an image of the first page ? Thanks in advance On 04/11/2012 11:09 AM, Mark Murphy wrote: This has nothing to do with Android. On Wed, Apr 11, 2012 at 11:07 AM, New Developersecur...@isscp.com wrote: Is there a method to convert the first Page of a PDF to a Thumbnail JPG ? Is it a part of the PDF reference manual ? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Multiple many many thumbnails
Hi All I'm trying to have users find their pictures using thumbnails much like gallery (and also like the Golf Channel app) However, sadly I keep running out of memory after loading 20 - 30 thumbnails Any tricks to get through this limit Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Mounting multiple devices at once
Using Linux I have set up my /etc/fstab to mount using fuse and mtpfs But How do I set up to mount multiple devices at once. Would like to be able to connect two or three tablets and transfer data between them 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] keystore files
Thanks I'm trying to configure it to use the publish one for the Debug/Run AS the default when I copy publish.keystore to debug.keystore I get Error generating final archive: java.io.IOException: Keystore was tampered with, or password was incorrect I'm guessing because debug.keystore has no password and the publish one does. Somehow trying to keep using the publish.keystore but still do coding and testing using it. If I have different keystores then I have to continually uninstall the app because the keystore changes Trying to get around this Thanks in advance On 02/15/2012 11:34 AM, TreKing wrote: On Thu, Jan 26, 2012 at 7:17 AM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: Is there anyway to link the publish.keystore to a) the Debug button / debug configuration That's the default. When you hit Debug / Run, it uses the default debug keystore, or one of your choosing, if you so configure it. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] keystore files
Okay reading Signing your apps Signing in Debug Mode The Android build tools provide a debug signing mode that makes it easier for you to develop and debug your application, while still meeting the Android system requirement for signing your .apk. When using debug mode to build your app, the SDK tools invoke Keytool to automatically create a debug keystore and key. This debug key is then used to automatically sign the .apk, so you do not need to sign the package with your own key. The SDK tools create the debug keystore/key with predetermined names/passwords: * Keystore name: debug.keystore * Keystore password: android * Key alias: androiddebugkey * Key password: android * CN: CN=Android Debug,O=Android,C=US Where are these set ? So that when you press the Debug/Run button it knows to input the password = android, and alias = androiddebugkey ? Thanks On 02/16/2012 09:24 AM, New Developer wrote: Thanks I'm trying to configure it to use the publish one for the Debug/Run AS the default when I copy publish.keystore to debug.keystore I get Error generating final archive: java.io.IOException: Keystore was tampered with, or password was incorrect I'm guessing because debug.keystore has no password and the publish one does. Somehow trying to keep using the publish.keystore but still do coding and testing using it. If I have different keystores then I have to continually uninstall the app because the keystore changes Trying to get around this Thanks in advance On 02/15/2012 11:34 AM, TreKing wrote: On Thu, Jan 26, 2012 at 7:17 AM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: Is there anyway to link the publish.keystore to a) the Debug button / debug configuration That's the default. When you hit Debug / Run, it uses the default debug keystore, or one of your choosing, if you so configure it. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] keystore files
Thanks Is it not possible to change the other way around? so to change the debug parameters to not use android as the password etc.. surely this is stored somewhere ? so that it knows what password to pass ? thanks again On 02/16/2012 09:54 AM, Felix Long wrote: Hi: You need change the password of yout publlish key to android which same as debug.keystore: http://developer.android.com/guide/publishing/app-signing.html 2012/2/16 New Developer secur...@isscp.com mailto:secur...@isscp.com Thanks I'm trying to configure it to use the publish one for the Debug/Run AS the default when I copy publish.keystore to debug.keystore I get Error generating final archive: java.io.IOException: Keystore was tampered with, or password was incorrect I'm guessing because debug.keystore has no password and the publish one does. Somehow trying to keep using the publish.keystore but still do coding and testing using it. If I have different keystores then I have to continually uninstall the app because the keystore changes Trying to get around this Thanks in advance On 02/15/2012 11:34 AM, TreKing wrote: On Thu, Jan 26, 2012 at 7:17 AM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: Is there anyway to link the publish.keystore to a) the Debug button / debug configuration That's the default. When you hit Debug / Run, it uses the default debug keystore, or one of your choosing, if you so configure it. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto: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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Best Regards Felix Long -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] keystore files
true But then each time you have to delete all data files and uninstall in order to switch and then repeat this back again to continue developing , it is this shortdebug - release testing release - debug period that I'm wanting to streamline without having to delete and uninstall each time Thanks again On 02/16/2012 10:08 AM, TreKing wrote: On Thu, Feb 16, 2012 at 8:24 AM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: If I have different keystores then I have to continually uninstall the app because the keystore changes Trying to get around this Why? How frequently are you running your app in release mode that this is an issue? I expect that about 99.5% of development time is spent in dev move with the debug keystore. Once you're ready to update / publish, switch to release, run your sanity checks, and you should be good to go. Then back to your debug keystore for the next round development. - 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] keystore files
I now have two keystore files debug.keystore and publish.keystore with a password Is there anyway to link the publish.keystore to a) the Debug button / debug configuration and/or b) the Run button / run configuration Currently I have to export the project to create the signed .apk then from the command line adb install -r package.apk and if I want to test the from command line adb logcat was nicer to do all this through the debug / run buttons thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Network Violation Error
Hi All If I run the app using Debug (eclipse and the debug.keystore) all works well If I run the app using Export (publish keystore) I get the following D/StrictMode(26474): StrictMode policy violation; ~duration=142 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=20 violation=4 D/StrictMode(26474): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1105) D/StrictMode(26474): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) D/StrictMode(26474): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) D/StrictMode(26474): at java.net.InetAddress.getAllByName(InetAddress.java:220) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:71) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:50) D/StrictMode(26474): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) What is causing this ? and how to avoid it I have the following code StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectNetwork() .build()); But this makes no change in the Export state, makes a difference in the Debug without it it fails. 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] Network Violation Error
Thanks Mark If it doesn't rain it pours Now when I try to export the app I get the following [2012-01-25 11:41:43 - eeds] Proguard returned with error code 1. See console [2012-01-25 11:41:43 - eeds] java.io.IOException: Can't read [proguard.ClassPathEntry@15301ed8] (invalid entry CRC (expected 0x58ace69f but got 0x44f55a1)) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:230) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:200) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:178) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.execute(InputReader.java:100) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.readInput(ProGuard.java:195) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.execute(ProGuard.java:78) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.main(ProGuard.java:499) Any ideas what happened, or how to fix ? Thanks again On 02/14/2012 11:00 AM, Mark Murphy wrote: On Wed, Jan 25, 2012 at 10:36 AM, New Developersecur...@isscp.com wrote: If I run the app using Debug (eclipse and the debug.keystore) all works well If I run the app using Export (publish keystore) I get the following D/StrictMode(26474): StrictMode policy violation; ~duration=142 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=20 violation=4 D/StrictMode(26474): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1105) D/StrictMode(26474): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) D/StrictMode(26474): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) D/StrictMode(26474): at java.net.InetAddress.getAllByName(InetAddress.java:220) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:71) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:50) D/StrictMode(26474): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) What is causing this ? You are doing network I/O on the main application thread. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Network Violation Error
Thanks I did that I still get the same error , even closed and reopen eclipse same thing On 02/14/2012 11:51 AM, Mark Murphy wrote: That looks like output from the Eclipse console. If so, try cleaning the project (Project Clean from the main menu). On Wed, Jan 25, 2012 at 11:42 AM, New Developersecur...@isscp.com wrote: Thanks Mark If it doesn't rain it pours Now when I try to export the app I get the following [2012-01-25 11:41:43 - eeds] Proguard returned with error code 1. See console [2012-01-25 11:41:43 - eeds] java.io.IOException: Can't read [proguard.ClassPathEntry@15301ed8] (invalid entry CRC (expected 0x58ace69f but got 0x44f55a1)) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:230) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:200) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:178) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.execute(InputReader.java:100) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.readInput(ProGuard.java:195) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.execute(ProGuard.java:78) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.main(ProGuard.java:499) Any ideas what happened, or how to fix ? Thanks again On 02/14/2012 11:00 AM, Mark Murphy wrote: On Wed, Jan 25, 2012 at 10:36 AM, New Developersecur...@isscp.com wrote: If I run the app using Debug (eclipse and the debug.keystore) all works well If I run the app using Export (publish keystore) I get the following D/StrictMode(26474): StrictMode policy violation; ~duration=142 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=20 violation=4 D/StrictMode(26474): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1105) D/StrictMode(26474): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) D/StrictMode(26474): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) D/StrictMode(26474): at java.net.InetAddress.getAllByName(InetAddress.java:220) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:71) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:50) D/StrictMode(26474): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) What is causing this ? You are doing network I/O on the main application thread. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Network Violation Error
I can't find anything similar on a google search, They have one that talks about a class, and thus the class is corrupt But my error does not have a class, so I don't know what is corrupt or not ? any ideas ? On 01/25/2012 11:56 AM, New Developer wrote: Thanks I did that I still get the same error , even closed and reopen eclipse same thing On 02/14/2012 11:51 AM, Mark Murphy wrote: That looks like output from the Eclipse console. If so, try cleaning the project (Project Clean from the main menu). On Wed, Jan 25, 2012 at 11:42 AM, New Developersecur...@isscp.com wrote: Thanks Mark If it doesn't rain it pours Now when I try to export the app I get the following [2012-01-25 11:41:43 - eeds] Proguard returned with error code 1. See console [2012-01-25 11:41:43 - eeds] java.io.IOException: Can't read [proguard.ClassPathEntry@15301ed8] (invalid entry CRC (expected 0x58ace69f but got 0x44f55a1)) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:230) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:200) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.readInput(InputReader.java:178) [2012-01-25 11:41:43 - eeds] at proguard.InputReader.execute(InputReader.java:100) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.readInput(ProGuard.java:195) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.execute(ProGuard.java:78) [2012-01-25 11:41:43 - eeds] at proguard.ProGuard.main(ProGuard.java:499) Any ideas what happened, or how to fix ? Thanks again On 02/14/2012 11:00 AM, Mark Murphy wrote: On Wed, Jan 25, 2012 at 10:36 AM, New Developersecur...@isscp.com wrote: If I run the app using Debug (eclipse and the debug.keystore) all works well If I run the app using Export (publish keystore) I get the following D/StrictMode(26474): StrictMode policy violation; ~duration=142 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=20 violation=4 D/StrictMode(26474): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1105) D/StrictMode(26474): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) D/StrictMode(26474): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) D/StrictMode(26474): at java.net.InetAddress.getAllByName(InetAddress.java:220) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:71) D/StrictMode(26474): at libcore.net.http.HttpConnection.init(HttpConnection.java:50) D/StrictMode(26474): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) What is causing this ? You are doing network I/O on the main application thread. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, 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] Network Violation Error
Not working yet But at least with the new proguard It talks about can't read android-13.jar so I'll try re-download the android 13 SDK Thanks On 02/14/2012 02:51 PM, Harri Smått wrote: On Jan 25, 2012, at 9:27 PM, New Developer wrote: any ideas ? When I faced problems with ProGuard I had no idea what was causing them, I went to their sourceforge site, downloaded latest ProGuard package and replaced tools/proguard/bin and tools/proguard/lib directories within Android SDK with the ones from this version 4.7 package. Worked like a charm for me at least and might do the same trick for you too. And the error I was facing seemed rather cryptic unless you're into hacking your way into ProGuard code; [2012-02-14 21:38:21 - Proj] Proguard returned with error code 1. See console [2012-02-14 21:38:21 - Proj] java.lang.ArrayIndexOutOfBoundsException: 5 [2012-02-14 21:38:21 - Proj]at proguard.classfile.editor.VariableRemapper.remapVariable(VariableRemapper.java:151) ... -- H -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Network Violation Error
That did it for me thanks to all On 01/25/2012 03:07 PM, New Developer wrote: Not working yet But at least with the new proguard It talks about can't read android-13.jar so I'll try re-download the android 13 SDK Thanks On 02/14/2012 02:51 PM, Harri Smått wrote: On Jan 25, 2012, at 9:27 PM, New Developer wrote: any ideas ? When I faced problems with ProGuard I had no idea what was causing them, I went to their sourceforge site, downloaded latest ProGuard package and replaced tools/proguard/bin and tools/proguard/lib directories within Android SDK with the ones from this version 4.7 package. Worked like a charm for me at least and might do the same trick for you too. And the error I was facing seemed rather cryptic unless you're into hacking your way into ProGuard code; [2012-02-14 21:38:21 - Proj] Proguard returned with error code 1. See console [2012-02-14 21:38:21 - Proj] java.lang.ArrayIndexOutOfBoundsException: 5 [2012-02-14 21:38:21 - Proj]at proguard.classfile.editor.VariableRemapper.remapVariable(VariableRemapper.java:151) ... -- H -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] trilead ssh2 library
I'm trying to use the trilead ssh2 library to establish a scp connection If I create the apk using the debug/run then the code works fine If I export and sign the apk then the code generates the following logcat error W/System.err( 1974): java.lang.Exception: Error occured connecting: java.io.IOException: There was a problem while connecting to 24.220.0.0:22 W/System.err( 1974): at org.ttienterprises.eeds.em.a(Unknown Source) W/System.err( 1974): at org.ttienterprises.eeds.ek.run(Unknown Source) W/System.err( 1974): Caused by: java.io.IOException: There was a problem while connecting to 24.220.0.0:22 W/System.err( 1974): at com.a.a.b.d(Unknown Source) W/System.err( 1974): at com.a.a.b.b(Unknown Source) W/System.err( 1974): ... 2 more W/System.err( 1974): Caused by: java.io.IOException: Key exchange was not finished, connection is closed. W/System.err( 1974): at com.a.a.i.b.c(Unknown Source) W/System.err( 1974): at com.a.a.i.i.a(Unknown Source) W/System.err( 1974): ... 4 more W/System.err( 1974): Caused by: java.io.IOException: Fatal error during MAC startup! W/System.err( 1974): at com.a.a.i.b.e(Unknown Source) W/System.err( 1974): at com.a.a.i.b.a(Unknown Source) W/System.err( 1974): at com.a.a.i.i.f(Unknown Source) W/System.err( 1974): at com.a.a.i.j.run(Unknown Source) W/System.err( 1974): at java.lang.Thread.run(Thread.java:856) IP address changed for security, the user name and password are correct and present not sure also where the eeds.em.aand eeds.ek.run come from ? any help greatly appreciated 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] trilead ssh2 library
Can a single apk have source files with multiple package names ? I just added the trilead source code to my project So the trilead files have package com.trilead.ssh2.transport; package com.trilead.ssh2... etc; Where as my project all has package org.ttienterprises.eeds Could this somehow relate to the problem I am seeing a) debug build apk's don't mind whereas b) exported signed apk'sdo mind ? Why else would the code work if done using a debug apk but fail if using a signed apk ? Thanks in advance On 01/25/2012 03:21 PM, New Developer wrote: I'm trying to use the trilead ssh2 library to establish a scp connection If I create the apk using the debug/run then the code works fine If I export and sign the apk then the code generates the following logcat error W/System.err( 1974): java.lang.Exception: Error occured connecting: java.io.IOException: There was a problem while connecting to 24.220.0.0:22 W/System.err( 1974): at org.ttienterprises.eeds.em.a(Unknown Source) W/System.err( 1974): at org.ttienterprises.eeds.ek.run(Unknown Source) W/System.err( 1974): Caused by: java.io.IOException: There was a problem while connecting to 24.220.0.0:22 W/System.err( 1974): at com.a.a.b.d(Unknown Source) W/System.err( 1974): at com.a.a.b.b(Unknown Source) W/System.err( 1974): ... 2 more W/System.err( 1974): Caused by: java.io.IOException: Key exchange was not finished, connection is closed. W/System.err( 1974): at com.a.a.i.b.c(Unknown Source) W/System.err( 1974): at com.a.a.i.i.a(Unknown Source) W/System.err( 1974): ... 4 more W/System.err( 1974): Caused by: java.io.IOException: Fatal error during MAC startup! W/System.err( 1974): at com.a.a.i.b.e(Unknown Source) W/System.err( 1974): at com.a.a.i.b.a(Unknown Source) W/System.err( 1974): at com.a.a.i.i.f(Unknown Source) W/System.err( 1974): at com.a.a.i.j.run(Unknown Source) W/System.err( 1974): at java.lang.Thread.run(Thread.java:856) IP address changed for security, the user name and password are correct and present not sure also where the eeds.em.aand eeds.ek.run come from ? any help greatly appreciated 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] trilead ssh2 library
Thank you !! Yes I disabled ProGuard as you suggested and now suddenly all works well Do you have some links to help inform/teach how to fine-tune as you further suggested Thanks On 02/14/2012 11:08 PM, Nikolay Elenkov wrote: On Thu, Jan 26, 2012 at 12:54 PM, New Developersecur...@isscp.com wrote: Can a single apk have source files with multiple package names ? Yes. Why else would the code work if done using a debug apk but fail if using a signed apk ? Are you using ProGuard? (it seems you are from the stacktrace) It might be removing classes/methods your app actually needs. Try disabling ProGuard, if that works, read the docs and fine-tune your progurad.cfg. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Invert and entire Bitmap
Thanks hhenne I'm trying the following Paint invert = new Paint(); invert.setStyle(Paint.Style.FILL); invert.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.XOR)); pictCanvas.drawRect(0, 0, 1170, 800, invert); image.invalidate(); Not having any success, can you see where I'm making a mistake ? Thanks Barry On 02/08/2012 04:07 AM, Raghav Sood wrote: On Wed, Feb 8, 2012 at 12:48 PM, hhenne hhe...@gmail.com mailto:hhe...@gmail.com wrote: You can make a Paint and setXfermode to XOR (PixelXorXfermode) and the draw a solid rect on the bitmap. It will invert every bit - so when you do it once more you are back to non-inverted. I am doing so in my keyboard (http://www.maxikeys.com) to invert pressed keys - the room between the keys have the color 50% grey, which will not change, when being inverted. Hardy Henneberg On Feb 7, 10:09 pm, JackN j...@jacknorth.com mailto:j...@jacknorth.com wrote: I don't know if there is 'negative' function, but just go through the pixels and transform them to your desire. On Feb 7, 7:18 am, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: Is there a process/function to invert the colors of an entire bitmap or canvas ? Not just a black and white image that becomes white and black But a full color image, where the color is inverted ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.androidactivist.org/ - Author http://www.appaholics.in/ - Founder -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Trying to rotate an image
Hi All trying to rotate an Image pictCanvas.save(); pictCanvas.rotate(90 , pictCanvas.getWidth() / 2 , pictCanvas.getHeight() / 2 ); pictCanvas.restore(); image.invalidate(); Nothing happens calls the code, but the image stays the same ? Any ideas what could be causing this ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Trying to rotate an image
Thanks but what am I missing ? On 02/10/2012 02:40 PM, skink wrote: New Developer wrote: Hi All trying to rotate an Image pictCanvas.save(); pictCanvas.rotate(90 , pictCanvas.getWidth() / 2 , pictCanvas.getHeight() / 2 ); pictCanvas.restore(); image.invalidate(); Nothing happens calls the code, but the image stays the same ? Any ideas what could be causing this ? Thanks in advance hmm, I think you really need to learn a lot about Canvas and custom drawing - http://developer.android.com/guide/topics/graphics/2d-graphics.html pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] DLL equivalent in android
In Windows programming we have DLL so that we can build modules If the DLL exists then additional functions and features exist What is the way to do this under android ? Thanks Barry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] DLL equivalent in android
Thanks to all. 1) is the jar created still as part of the same package ? 2) I take it then that you upload the .apk and then the jar(s) as well ? 3) Where can I find information on this esp. the creating of the jar and then dynamically linking them to the apk ? For further insight, under windows I used a code within the .exe which said which modules were available then based on the code it checked to see if those .dll were present. If so, then they were loaded and added items to the main menu, and thus added functionality to the overall .exe This is the same purpose I'm trying to now achieve but with android. Thanks again On 02/09/2012 12:49 PM, Kristopher Micinski wrote: On Thu, Feb 9, 2012 at 12:42 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: In Windows programming we have DLL so that we can build modules If the DLL exists then additional functions and features exist What is the way to do this under android ? Thanks Barry Libraries for your own apps? You'd use a jar. For other apps to use, you'd write a service, to which other apps would bind using aidl, sending intents, etc... 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Help Urgent
Help please I got an error message saying Debug Certificate expired on So I did a web search and found an article that had said delete the debug.keystore Thankfully (or not) I moved mine but now it says Re-installation failed due to different application signatures. [2012-02-09 16:53:13 - You must perform a full uninstall of the application. WARNING: This will remove the application data! [2012-02-09 16:53:13 - Please execute 'adb uninstall org.ttienterprises.pack' in a shell. [2012-02-09 16:53:13 - Launch canceled! I can't loose the data on the device So I moved the debug.keystore back But I still get the signature error Please HELP ! ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Help Urgent
Sorry please ignore this I hit the wrong key On 02/09/2012 04:56 PM, New Developer wrote: Help please I got an error message saying Debug Certificate expired on So I did a web search and found an article that had said delete the debug.keystore Thankfully (or not) I moved mine but now it says Re-installation failed due to different application signatures. [2012-02-09 16:53:13 - You must perform a full uninstall of the application. WARNING: This will remove the application data! [2012-02-09 16:53:13 - Please execute 'adb uninstall org.ttienterprises.pack' in a shell. [2012-02-09 16:53:13 - Launch canceled! I can't loose the data on the device So I moved the debug.keystore back But I still get the signature error Please HELP ! ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Help with signatures
Help please I got an error message saying Debug Certificate expired on So I did a web search and found an article that had said delete the debug.keystore Thankfully (or not) I moved mine but now it says Re-installation failed due to different application signatures. [2012-02-09 16:53:13 - You must perform a full uninstall of the application. WARNING: This will remove the application data! [2012-02-09 16:53:13 - Please execute 'adb uninstall org.ttienterprises.pack' in a shell. [2012-02-09 16:53:13 - Launch canceled! I can't loose the data on the device So I moved the debug.keystore back But I still get the signature error Please HELP ! ! 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] Help with signatures
Okay I had to Clean and rebuild the Project So it is not warning about difference signatures But Now still has the Debug Certificate expired error ? Please help On 02/09/2012 04:57 PM, New Developer wrote: Help please I got an error message saying Debug Certificate expired on So I did a web search and found an article that had said delete the debug.keystore Thankfully (or not) I moved mine but now it says Re-installation failed due to different application signatures. [2012-02-09 16:53:13 - You must perform a full uninstall of the application. WARNING: This will remove the application data! [2012-02-09 16:53:13 - Please execute 'adb uninstall org.ttienterprises.pack' in a shell. [2012-02-09 16:53:13 - Launch canceled! I can't loose the data on the device So I moved the debug.keystore back But I still get the signature error Please HELP ! ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Help with signatures
Okay I have changed my date back to Jan 2012 Is there anyway to extend the Certificate without going through the adb uninstall ?? Thanks On 02/09/2012 05:15 PM, New Developer wrote: Okay I had to Clean and rebuild the Project So it is not warning about difference signatures But Now still has the Debug Certificate expired error ? Please help On 02/09/2012 04:57 PM, New Developer wrote: Help please I got an error message saying Debug Certificate expired on So I did a web search and found an article that had said delete the debug.keystore Thankfully (or not) I moved mine but now it says Re-installation failed due to different application signatures. [2012-02-09 16:53:13 - You must perform a full uninstall of the application. WARNING: This will remove the application data! [2012-02-09 16:53:13 - Please execute 'adb uninstall org.ttienterprises.pack' in a shell. [2012-02-09 16:53:13 - Launch canceled! I can't loose the data on the device So I moved the debug.keystore back But I still get the signature error Please HELP ! ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Help with signatures
But deleting the debug.keystore results in having to delete the data on the device, and I can't do that either Thanks On 02/09/2012 07:35 PM, Mark Murphy wrote: On Fri, Jan 20, 2012 at 8:15 PM, New Developersecur...@isscp.com wrote: Okay I have changed my date back to Jan 2012 Huh? Just delete your debug.keystore file. The build tools will regenerate a new one on the next build. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Overlay Images
Thanks I got that to work however now reloading the image is causing a problem here is the code Bitmap img = BitmapFactory.decodeFile(fName); Log.i(display, mute: +img.isMutable() + recycle: + img.isRecycled() ); Matrix matrix= new Matrix(); float scale = Math.min( (800.0f / img.getHeight()) , (1170.0f / img.getWidth())); matrix.postScale(scale, scale); pictBMP = Bitmap.createBitmap(img, 0, 0, img.getWidth(), img.getHeight(), matrix, true); Log.i(display, mute: +pictBMP.isMutable() + recycle: + pictBMP.isRecycled() + + scale + + matrix.toString() ); image.setImageBitmap(pictBMP); pictCanvas = new Canvas(pictBMP); If I load the original I get false false true false 0.73452 [0.73452 0.0 0.0] [0.0 0.73452 0.0] [0.0 0.0 1.0] When I load the saved Image I get false false false false 1.0 [1.0 0.0 0.0] [0.0 1.0 0.0] [0.0 0.0 1.0] which then cause the pictCanvas = new Canvas line to fail Unable to start activity ComponentInfo{...Display}: java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor Caused by: java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor Any Ideas why the one is mutable and the other not, they are simply jpg files are they not ? On 02/06/2012 09:10 AM, Daniel Drozdzewski wrote: Ok, Create a LayerDrawable object and keep adding to it Drawable objects (LayerDrawable.setDrawableByLayerId (int id, Drawable drawable)) extracted from each of your stacked Views. On 6 February 2012 13:47, New Developersecur...@isscp.com wrote: Thanks I don't have access to the bitmaps (I don't think) I have access to the ImageView and the Canvas associated with the ImageView Thanks again On 02/06/2012 08:37 AM, Daniel Drozdzewski wrote: Draw each of the bitmaps on one canvas in the ascending order from deepest to topmost. On 6 February 2012 13:18, New Developersecur...@isscp.com wrote: I have 4 ImageViews one stacked on top of the other all the same size, each ImageView has it's own associated canvas that I can access. Thus allowing me to view layers of a single image on screen. I now wish to save this screen image to a file. How can I merge the canvases into one image? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Overlay Images
It would appear to fail because scale is 1.00 or the matrix is the identity matrix testing for scale == 1.000 and setting it to 0.98 makes the code work and produces the falsefalse true false Why ? On 02/07/2012 07:50 AM, New Developer wrote: Thanks I got that to work however now reloading the image is causing a problem here is the code Bitmap img = BitmapFactory.decodeFile(fName); Log.i(display, mute: +img.isMutable() + recycle: + img.isRecycled() ); Matrix matrix= new Matrix(); float scale = Math.min( (800.0f / img.getHeight()) , (1170.0f / img.getWidth())); matrix.postScale(scale, scale); pictBMP = Bitmap.createBitmap(img, 0, 0, img.getWidth(), img.getHeight(), matrix, true); Log.i(display, mute: +pictBMP.isMutable() + recycle: + pictBMP.isRecycled() + + scale + + matrix.toString() ); image.setImageBitmap(pictBMP); pictCanvas = new Canvas(pictBMP); If I load the original I get false false true false 0.73452 [0.73452 0.0 0.0] [0.0 0.73452 0.0] [0.0 0.0 1.0] When I load the saved Image I get false false false false 1.0 [1.0 0.0 0.0] [0.0 1.0 0.0] [0.0 0.0 1.0] which then cause the pictCanvas = new Canvas line to fail Unable to start activity ComponentInfo{...Display}: java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor Caused by: java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor Any Ideas why the one is mutable and the other not, they are simply jpg files are they not ? On 02/06/2012 09:10 AM, Daniel Drozdzewski wrote: Ok, Create a LayerDrawable object and keep adding to it Drawable objects (LayerDrawable.setDrawableByLayerId (int id, Drawable drawable)) extracted from each of your stacked Views. On 6 February 2012 13:47, New Developersecur...@isscp.com wrote: Thanks I don't have access to the bitmaps (I don't think) I have access to the ImageView and the Canvas associated with the ImageView Thanks again On 02/06/2012 08:37 AM, Daniel Drozdzewski wrote: Draw each of the bitmaps on one canvas in the ascending order from deepest to topmost. On 6 February 2012 13:18, New Developersecur...@isscp.com wrote: I have 4 ImageViews one stacked on top of the other all the same size, each ImageView has it's own associated canvas that I can access. Thus allowing me to view layers of a single image on screen. I now wish to save this screen image to a file. How can I merge the canvases into one image? 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 toandroid-develop...@googlegroups.com To unsubscribe from this group, 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 toandroid-develop...@googlegroups.com To unsubscribe from this group, 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] Invert and entire Bitmap
Is there a process/function to invert the colors of an entire bitmap or canvas ? Not just a black and white image that becomes white and black But a full color image, where the color is inverted ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Overlay Images
I have 4 ImageViews one stacked on top of the other all the same size, each ImageView has it's own associated canvas that I can access. Thus allowing me to view layers of a single image on screen. I now wish to save this screen image to a file. How can I merge the canvases into one image? 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] Overlay Images
Thanks I don't have access to the bitmaps (I don't think) I have access to the ImageView and the Canvas associated with the ImageView Thanks again On 02/06/2012 08:37 AM, Daniel Drozdzewski wrote: Draw each of the bitmaps on one canvas in the ascending order from deepest to topmost. On 6 February 2012 13:18, New Developersecur...@isscp.com wrote: I have 4 ImageViews one stacked on top of the other all the same size, each ImageView has it's own associated canvas that I can access. Thus allowing me to view layers of a single image on screen. I now wish to save this screen image to a file. How can I merge the canvases into one image? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Irregular shapes on an imageview
Hi All Any thoughts how you can make Irregular shapes on an ImageView a touch button Think of a map with countries and islands. Any way to accurately color each country/island when clicked ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Read Heap from DDMS
Is there a resource or link that helps you read what is going on with your app I'm plagued by an out of memory error and I have no idea why TypeCount Total Size Smallest LargestMedian free 929 927.031 KB 16 B 554.344 KB 96 B data object33,460 1.220 MB 16 B 1,106 B 32 B class object2,703 782.062 KB 168 B 38.180 KB 168 B 1-byte array (byte[], boolean[]) 703 8.212 MB 24 B2.039 MB 264 B 2-byte array (short[], char[]) 10,165 653.930 KB 24 B 28.023 KB 48 B 4-byte array (object[], int[], float[]) 5,123 327.000 KB24 B 16.023 KB 40 B 8-byte array (long[], double[])16 5.922 KB 24 B 4.000 KB 128 B non-Java object 129 5.930 KB 24 B 464 B 40 B How can I trace this to an actual variable My main concerns are the 1-byte array esp. the 2.039 MB I'm sure it is an Image or Bitmap I just don't know which one Is there anyway to tag this to a specific variable ? 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] Read Heap from DDMS
Thanks MAT shows the following The class*android.content.res.Resources*, loaded by*system class loader*, occupies*2,805,432 (26.30%)*bytes. The memory is accumulated in one instance of*java.lang.Object[]*loaded by*system class loader*. *Keywords* java.lang.Object[] android.content.res.Resources Clicking Details Class Name Shallow HeapRetained Heap * java.lang.Object[509] @ 0x40db12d8 mat://object/0x40db12d8 2,048 2,797,424 \ * *mValues*android.util.LongSparseArray @ 0x40ac0a00 mat://object/0x40ac0a00 24 2,801,536 .\ * *sPreloadedDrawables*class android.content.res.Resources @ 0x40ac0700 mat://object/0x40ac0700*Unknown, System Class* 48 2,805,432 One instance of*android.graphics.Bitmap*loaded by*system class loader*occupies*2,138,456 (20.05%)*bytes. The memory is accumulated in one instance of*byte[]*loaded by*system class loader*. *Keywords* android.graphics.Bitmap byte[] Clicking Details Class Name Shallow HeapRetained Heap * byte[2138400] @ 0x4134ce98 ... mat://object/0x4134ce98 2,138,416 2,138,416 \ * *mBuffer*android.graphics.Bitmap @ 0x412599e8 mat://object/0x412599e8 40 2,138,456 .\ * *mBitmap*android.graphics.drawable.BitmapDrawable @ 0x4125cee8 mat://object/0x4125cee8 64 136 ..\ * *mBGDrawable*android.widget.FrameLayout @ 0x411e5230 mat://object/0x411e5230 464 1,072 ...\ * *[0]*android.view.View[12] @ 0x41234ea0 mat://object/0x41234ea0 64 24,168 I'm not seeing a variable name, Is there anyway to find What variables or Which Bitmap this is that is 2M in size ? Thanks again On 01/15/2012 11:13 AM, Mark Murphy wrote: On Sun, Jan 15, 2012 at 11:06 AM, New Developersecur...@isscp.com wrote: Is there a resource or link that helps you read what is going on with your app I'm plagued by an out of memory error and I have no idea why TypeCount Total Size Smallest LargestMedian free 929 927.031 KB 16 B 554.344 KB 96 B data object33,460 1.220 MB 16 B 1,106 B 32 B class object2,703 782.062 KB 168 B 38.180 KB 168 B 1-byte array (byte[], boolean[]) 703 8.212 MB 24 B 2.039 MB 264 B 2-byte array (short[], char[]) 10,165 653.930 KB 24 B 28.023 KB 48 B 4-byte array (object[], int[], float[]) 5,123 327.000 KB 24 B 16.023 KB 40 B 8-byte array (long[], double[])16 5.922 KB 24 B 4.000 KB 128 B non-Java object 129 5.930 KB 24 B 464 B 40 B How can I trace this to an actual variable Dump the heap and examine it using the Eclipse MAT plugin: http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html My main concerns are the 1-byte array esp. the 2.039 MB I'm sure it is an Image or Bitmap I just don't know which one I strongly encourage you to dump the heap in Honeycomb or Ice Cream Sandwich then, as they do a much better job than do earlier versions of Android of reporting bitmap 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
[android-developers] seekbar to be more accurate
I'm using a seekbar to display and reposition at a frame in a video, using: private class frameChanger implements OnSeekBarChangeListener { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser isVideo) { Log.e(Frame Changer,Progress + progress); video.seekTo(progress); video.requestFocus(); video.invalidate(); } } I can move the seek bar just a tiny tiny amount and the value in the log.e output changes by say 12 - 20 But the video does not change at all However I can move the bar 1/2 inch which has resulted in a value change of 300 - 500 and then the video changes. By video changes I'm meaning the displayed frame of the video. Obviously because the value jumped is so high the number of frames skipped is huge. and very noticable. If there anyway to update the the display and just move the one or two frames when the values changes small amounts, and NOT just move when the value change is large ? 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] Help on Image Zoom and Rotate
Look at the setRotationX() setRotationY() and setScaleX() setScaleY() They sure make the work much easier On 12/16/2011 08:59 AM, chowdary nani wrote: Hi All, I need help on Image zoom and Image rotate in android with in the same screen I am developing using below code. public class ImageRotateActivity extends Activity { /** Called when the activity is first created. */ private ImageView img; private Button rotate; private Button zoom; float degrees =0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); zoom=(Button)findViewById(R.id.button2); zoom.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(new Zoom(this)); } }); rotate = (Button) findViewById(R.id.button1); rotate.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(R.layout.main); make(degrees); } }); } public void make(float x){ android.util.Log.i(INSIDE MAKE, inside make); LinearLayout linLayout = new LinearLayout(this); // load the origial BitMap (500 x 500 px) Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable.honeycomb); int width = bitmapOrg.getWidth(); int height = bitmapOrg.getHeight(); int newWidth = 200; int newHeight = 200; // calculate the scale - in this case = 0.4f float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // createa matrix for the manipulation Matrix matrix = new Matrix(); // resize the bit map matrix.postScale(scaleWidth, scaleHeight); // rotate the Bitmap matrix.postRotate(x); // recreate the new Bitmap Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); // make a Drawable from Bitmap to allow to set the BitMap // to the ImageView, ImageButton or what ever BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); ImageView imageView = new ImageView(this); // set the Drawable on the ImageView imageView.setImageDrawable(bmd); // center the Image imageView.setScaleType(ScaleType.CENTER); // add ImageView to the Layout linLayout.addView(imageView, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ) ); // set LinearLayout as ContentView setContentView(linLayout); android.util.Log.i(GOING OUT MAKE, going out make); } public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_DPAD_UP)// rotate clockwise // zoomControler+=10; { degrees=degrees+10; make(degrees); //make(10); android.util.Log.i(ONE,rotating clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } if(keyCode==KeyEvent.KEYCODE_DPAD_DOWN) // rotate anti-clockwise { degrees=degrees-10; make(degrees); //make(10); android.util.Log.i(TWO,rotating anti-clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } // invalidate(); return true; } } public class Zoom extends View { private Drawable image; private ImageView img; float degrees = 0; private int zoomControler = 20; public Zoom(Context context) { super(context); image = context.getResources().getDrawable(R.drawable.honeycomb); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); // here u can control the width and height of the images this // line is very important image.setBounds((getWidth() / 2) - zoomControler, (getHeight() / 2) - zoomControler, (getWidth() / 2) + zoomControler, (getHeight() / 2) + zoomControler); image.draw(canvas); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT)// zoom in zoomControler += 10; if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) // zoom out zoomControler -= 10; if (zoomControler 10) zoomControler = 10; invalidate(); return true; } } Here any one i.e, either zoom or image rotation is getting well but when trying to use both getting error -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] Remote Notification
Hi All, I'm not sure of the terms/terminology to use so my searches to date have need unsuccessful I'm trying to create a notification system that can be triggered remotely. concept: A file is changed or created within a specific folder on a web server (ours) The mobile device, if it has network access detects this change and generates a notification the user if they wish to can then accept or ignore the notification. What are the terms? I can generate a notification right now using the developer guide, by pressing a button so the local side works. Not sure how to have the device trigger the notification or detect it ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Resize VideoView (no picture just audio)
This is an offshoot of Hardware Acceleration, With my new tests I'm not sure that was the problem I have created a new project that is Nothing but the Video Player I'm trying to create this time I did **not** enable any hardware acceleration I still have the same problem video plays , hear the audiono picture So I thought about resizing, I followed http://stackoverflow.com/questions/7031598/resize-video-to-fit-the-videoview and http://clseto.mysinablog.com/index.php?op=ViewArticlearticleId=2992625 No joy still no picture public class MyVideoView extends VideoView { private int mForceHeight = 658; private int mForceWidth = 1170; public MyVideoView(Context context) { super(context); } public MyVideoView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public MyVideoView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public void setDimensions(int w, int h) { this.mForceWidth = w; this.mForceHeight = h; getHolder().setFixedSize(w , h); requestLayout(); invalidate(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { Log.i(, onMeasure this : + this.getWidth() + x + this.getHeight() +current : + this.mForceWidth + x + this.mForceHeight + to be : + widthMeasureSpec + x + heightMeasureSpec ); setMeasuredDimension(mForceWidth, mForceHeight); } } Log reports it is called three times onMeasure this :0 x 0current : 1170 x 658to be : 1073742994 x 1073742524 onMeasure this : 1170 x 658current : 1170 x 658to be : 1073742994 x 1073742524 onMeasure this : 1170 x 658current : 1170 x 658to be : 1073742994 x 1073742524 I called this way whether I put setDimensions before of after setVideoPath no change video.setVideoPath(fName); video.setDimensions(1170 , 658); Questions: -- 1) Why three times ? 2) What are the large values of widthMeasureSpec and heightMeasureSpec ? 3) Is this right, what is the correct way to resize the video ? the original video is 1280 x 720 and my viewing size is 1170 x 700 All help greatly appreciated 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] hardware acceleration
Any ideas what causes this error ? and still no picture even thou the video plays ? Thanks in advance On 11/27/2011 08:04 PM, New Developer wrote: Not sure if I'm going forward or backward I rewrote what I had MainActivity Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); intent.putExtra(fileName, fName); startActivity(intent); Display class extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); fName = getIntent().getStringExtra(fileName); setContentView(R.layout.video_viewer); - contains a VideoView with id = video video= (VideoView) findViewById(R.id.video ); *video.setLayerType(View.LAYER_TYPE_HARDWARE, null); *Note: later video.setVideoPath(fName); playBtn = (ImageButton) findViewById(R.id.playBtn ); frames = (SeekBar) findViewById(R.id.frames ); speed= (SeekBar) findViewById(R.id.speed ); currTime = (TextView)findViewById(R.id.currTime); maxTime = (TextView)findViewById(R.id.stopTime); playBtn.setOnClickListener(new playVideoListener() ); Video_Viewer.xml ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=1280px android:layout_height=800px *android:layerType=hardware * Note: later VideoView android:id=@+id/video android:background=#00aa44 android:layout_width=1170px android:layout_height=700px *android:layerType=hardware / * Note: later Now the error changes 11-27 19:41:34.047: E/display(24510): on Start() called 11-27 19:41:34.047: E/display(24510): video is false = false even after getWindow and xml has layerType = hardware 11-27 19:41:34.047: E/display(24510): on Resume()called 11-27 19:41:34.047: E/display(24510): video is false 11-27 19:41:34.557: D/MediaPlayer(24510): getMetadata play Button Pressed 11-27 19:41:41.437: E/display(24510): video is true = somehow changed I'm thinking above is again due to onCreate 11-27 19:41:41.457: E/libEGL(24510): call to OpenGL ES API with no current context (logged once per thread) Note: the new error message I still get audio andNO video -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] hardware acceleration
When executed videoView.isOpaque returns true, 1) Is this correct? 2) How can I set this to false I can't find a setOpaque function ?? Thanks in advance On 11/28/2011 02:39 PM, New Developer wrote: Any ideas what causes this error ? and still no picture even thou the video plays ? Thanks in advance On 11/27/2011 08:04 PM, New Developer wrote: Not sure if I'm going forward or backward I rewrote what I had MainActivity Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); intent.putExtra(fileName, fName); startActivity(intent); Display class extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); fName = getIntent().getStringExtra(fileName); setContentView(R.layout.video_viewer); - contains a VideoView with id = video video= (VideoView) findViewById(R.id.video ); *video.setLayerType(View.LAYER_TYPE_HARDWARE, null); *Note: later video.setVideoPath(fName); playBtn = (ImageButton) findViewById(R.id.playBtn ); frames = (SeekBar) findViewById(R.id.frames ); speed= (SeekBar) findViewById(R.id.speed ); currTime = (TextView)findViewById(R.id.currTime); maxTime = (TextView)findViewById(R.id.stopTime); playBtn.setOnClickListener(new playVideoListener() ); Video_Viewer.xml ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=1280px android:layout_height=800px *android:layerType=hardware * Note: later VideoView android:id=@+id/video android:background=#00aa44 android:layout_width=1170px android:layout_height=700px *android:layerType=hardware / * Note: later Now the error changes 11-27 19:41:34.047: E/display(24510): on Start() called 11-27 19:41:34.047: E/display(24510): video is false = false even after getWindow and xml has layerType = hardware 11-27 19:41:34.047: E/display(24510): on Resume()called 11-27 19:41:34.047: E/display(24510): video is false 11-27 19:41:34.557: D/MediaPlayer(24510): getMetadata play Button Pressed 11-27 19:41:41.437: E/display(24510): video is true = somehow changed I'm thinking above is again due to onCreate 11-27 19:41:41.457: E/libEGL(24510): call to OpenGL ES API with no current context (logged once per thread) Note: the new error message I still get audio andNO video -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] hardware acceleration
Thanks again Romain for you answer Any thoughts what I can do next ? I thought opaque should be false, that might be the reason why I can't see the picture ? because it is opaque I feel so lost on this issue Thanks again for all you help On 11/28/2011 06:05 PM, Romain Guy wrote: setOpaque() should be true in this case. On Mon, Nov 28, 2011 at 3:03 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: When executed videoView.isOpaque returns true, 1) Is this correct? 2) How can I set this to false I can't find a setOpaque function ?? Thanks in advance On 11/28/2011 02:39 PM, New Developer wrote: Any ideas what causes this error ? and still no picture even thou the video plays ? Thanks in advance On 11/27/2011 08:04 PM, New Developer wrote: Not sure if I'm going forward or backward I rewrote what I had MainActivity Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); intent.putExtra(fileName, fName); startActivity(intent); Display class extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); fName = getIntent().getStringExtra(fileName); setContentView(R.layout.video_viewer); - contains a VideoView with id = video video= (VideoView) findViewById(R.id.video ); *video.setLayerType(View.LAYER_TYPE_HARDWARE, null); * Note: later video.setVideoPath(fName); playBtn = (ImageButton) findViewById(R.id.playBtn ); frames = (SeekBar) findViewById(R.id.frames ); speed= (SeekBar) findViewById(R.id.speed ); currTime = (TextView)findViewById(R.id.currTime); maxTime = (TextView)findViewById(R.id.stopTime); playBtn.setOnClickListener(new playVideoListener() ); Video_Viewer.xml ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; http://schemas.android.com/apk/res/android android:orientation=horizontal android:layout_width=1280px android:layout_height=800px *android:layerType=hardware * Note: later VideoView android:id=@+id/video android:background=#00aa44 android:layout_width=1170px android:layout_height=700px *android:layerType=hardware / * Note: later Now the error changes 11-27 19:41:34.047: E/display(24510): on Start() called 11-27 19:41:34.047: E/display(24510): video is false = false even after getWindow and xml has layerType = hardware 11-27 19:41:34.047: E/display(24510): on Resume()called 11-27 19:41:34.047: E/display(24510): video is false 11-27 19:41:34.557: D/MediaPlayer(24510): getMetadata play Button Pressed 11-27 19:41:41.437: E/display(24510): video is true = somehow changed I'm thinking above is again due to onCreate 11-27 19:41:41.457: E/libEGL(24510): call to OpenGL ES API with no current context (logged once per thread) Note: the new error message I still get audio andNO video -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto: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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto: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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group
Re: [android-developers] hardware acceleration
Not sure if I'm going forward or backward I rewrote what I had MainActivity Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); intent.putExtra(fileName, fName); startActivity(intent); Display class extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); fName = getIntent().getStringExtra(fileName); setContentView(R.layout.video_viewer); - contains a VideoView with id = video video= (VideoView) findViewById(R.id.video ); *video.setLayerType(View.LAYER_TYPE_HARDWARE, null); *Note: later video.setVideoPath(fName); playBtn = (ImageButton) findViewById(R.id.playBtn ); frames = (SeekBar) findViewById(R.id.frames ); speed= (SeekBar) findViewById(R.id.speed ); currTime = (TextView)findViewById(R.id.currTime); maxTime = (TextView)findViewById(R.id.stopTime); playBtn.setOnClickListener(new playVideoListener() ); Video_Viewer.xml ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=1280px android:layout_height=800px *android:layerType=hardware * Note: later VideoView android:id=@+id/video android:background=#00aa44 android:layout_width=1170px android:layout_height=700px *android:layerType=hardware / * Note: later Now the error changes 11-27 19:41:34.047: E/display(24510): on Start() called 11-27 19:41:34.047: E/display(24510): video is false = false even after getWindow and xml has layerType = hardware 11-27 19:41:34.047: E/display(24510): on Resume()called 11-27 19:41:34.047: E/display(24510): video is false 11-27 19:41:34.557: D/MediaPlayer(24510): getMetadata play Button Pressed 11-27 19:41:41.437: E/display(24510): video is true = somehow changed I'm thinking above is again due to onCreate 11-27 19:41:41.457: E/libEGL(24510): call to OpenGL ES API with no current context (logged once per thread) Note: the new error message I still get audio andNO video -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] hardware acceleration
Using Intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), display.class); startActivity(intent); The activity is hardware accelerated. When I call this intent the layout is NOT hardware accelerated How can I create an intent that is Also hardware accelerated ? 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] hardware acceleration
my mistake I'm meaning the Activity that the intent calls/starts public class display extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, 1) videois + video.isHardwareAccelerated()); both parent and video return FALSE , How do I get them too return true ? I'm under the impression getWindow and setLayerType would do it Thanks in advance On 11/26/2011 01:57 PM, New Developer wrote: Using Intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), display.class); startActivity(intent); The activity is hardware accelerated. When I call this intent the layout is NOT hardware accelerated How can I create an intent that is Also hardware accelerated ? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] hardware acceleration
Thanks I would tend to agree, sadly I already have the android:hardwareAccelerated=true set in manifest application android:icon=@drawable/logo android:hardwareAccelerated=true android:label=@string/app_name android:debuggable=true android:theme=@android:style/Theme.NoTitleBar I also have it on both Activities activity android:name=MainActivity android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation / activity android:name=display android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation / this I think is what gives the screen isHardwareAccelerated as true 11-26 15:25:54.730: E/main(16712): screen is true -- from MainActivity just before startActivity is called 11-26 15:25:55.140: E/display(16712): parent is false -- from display.class showing the parent is now false 11-26 15:25:55.140: E/display(16712): video is false This was after I moved the getWindow before the setContentView() as suggested setContentView(R.layout.image_viewer); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, video is + video.isHardwareAccelerated()); Anything else I can try ? Thanks again On 11/26/2011 03:02 PM, Romain Guy wrote: Try setting the flag before calling setContentView(). You should also not have to do it this way. The best way to enable hardware acceleration is to set android:hardwareAccelerated=true on the application/ tag of your manifest. You should not do it manually one very activity and/or window unless you have very good reasons to do so. On Sat, Nov 26, 2011 at 11:23 AM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: my mistake I'm meaning the Activity that the intent calls/starts public class display extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, 1) videois + video.isHardwareAccelerated()); both parent and video return FALSE , How do I get them too return true ? I'm under the impression getWindow and setLayerType would do it Thanks in advance On 11/26/2011 01:57 PM, New Developer wrote: Using Intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), display.class); startActivity(intent); The activity is hardware accelerated. When I call this intent the layout is NOT hardware accelerated How can I create an intent that is Also hardware accelerated ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto: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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com mailto:romain...@android.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers
Re: [android-developers] hardware acceleration
Ok then perhaps I'm barking up the wrong tree looking at hardware acceleration LayoutInflater inflater = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.image_viewer, screen); FrameLayout parent = (FrameLayout) view.findViewById(R.id.image); Log.e(main, view is + view.isHardwareAccelerated() ); Media image = null; Log.e(main, parent is + parent.isHardwareAccelerated() ); image = new Media_Video (getApplicationContext() , parent , fName); Log.e(main, =); Log.e(main, view is + view.isHardwareAccelerated() ); Log.e(main, parent is + parent.isHardwareAccelerated() ); Log.e(main, image is + image.isHardwareAccelerated() ); Log.e(main, screen is + screen.isHardwareAccelerated() ); Log.e(main, =); image.ButtonSetup(view); screen.setOnTouchListener(image); Where Media_Video has the following video = (VideoView) screen.findViewById(R.id.video); video.setKeepScreenOn(true); video.setClickable(true); video.setVideoPath(fName); Log.i(video, screen is + screen.isHardwareAccelerated() ); Log.i(video, videois + video.isHardwareAccelerated()); Log.w(video , How has focus + video.findFocus()); Log.w(video , video Buffer + video.getBufferPercentage() ); Log.w(video , video Layer Type + video.getLayerType() ); Log.w(video , video Visibility + video.getVisibility()); Log.w(video , video Screen On+ video.getKeepScreenOn() ); Log.w(video , video is Clickable + video.isClickable() ); Log.w(video , video is Focusable + video.isFocusable() ); Log.w(video , video is Visibility+ video.getVisibility()); Log.w(video , video has a Holder + (video.getHolder() == null) ); Log.w(video , video root View+ video.getRootView() ); Log.w(video , video is Opaque+ video.isOpaque() ); Log.w(video , video is Shown + video.isShown() ); Thus resulting in the following LogCat: 11-26 17:21:53.000: E/main(21376): screen is true 11-26 17:21:53.000: I/CHECK(21376): Child 0 is of type LinearLayout 11-26 17:21:53.250: E/main(21376): view is true 11-26 17:21:53.250: E/main(21376): parent is true 11-26 17:21:53.250: I/video(21376): Mediaconstructor started 11-26 17:21:53.550: I/video(21376): Mediaconstructor CALLED 11-26 17:21:53.550: I/video(21376): Media_video constructor started 11-26 17:21:53.550: E/Video Media(21376): VIDEO Initalized [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-26 17:21:53.550: I/video(21376): screen is true 11-26 17:21:53.550: I/video(21376): videois true 11-26 17:21:53.550: W/video(21376): How has focus android.widget.VideoView@40d50d70 11-26 17:21:53.550: W/video(21376): video Buffer 0 11-26 17:21:53.550: W/video(21376): video Layer Type 0 11-26 17:21:53.550: W/video(21376): video Visibility 0 11-26 17:21:53.550: W/video(21376): video Screen On true 11-26 17:21:53.550: W/video(21376): video is Clickabletrue 11-26 17:21:53.550: W/video(21376): video is Focusabletrue 11-26 17:21:53.550: W/video(21376): video is Visibility 0 11-26 17:21:53.550: W/video(21376): video has a Holder false 11-26 17:21:53.550: W/video(21376): video root View com.android.internal.policy.impl.PhoneWindow$DecorView@4098eb98 11-26 17:21:53.550: W/video(21376): video is Opaque true 11-26 17:21:53.550: W/video(21376): video is Showntrue 11-26 17:21:53.610: E/main(21376): = 11-26 17:21:53.760: E/Surface(21376): surface (identity=3592) is invalid, err=-19 (No such device) 11-26 17:21:53.770: D/CallStack(21376): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#03 pc 4f38 /system/lib/libEGL.so 11-26 17:21:53.770: D/CallStack(21376): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so 11-26 17:21:54.120: D/MediaPlayer(21376): getMetadata These all show isHardwareAccelerationastrue Which still produces the error and Video with NO picture , Video with only audio What then produces the err=-19 error ? -- You received this message because you are subscribed to the Google 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] hardware acceleration
Does hardware acceleration effect in any way VideoView when displaying a video ? Thinking back and seeing that onCreate reports hardwareAcceleration as false, because this is too early and in fact it is true when checked after onCreate. perhaps all along I have had hardware acceleration, so then the question should have been does h/w acc. effect VideoView and this is why I can hear but not see the video ? Thanks On 11/26/2011 05:31 PM, New Developer wrote: Ok then perhaps I'm barking up the wrong tree looking at hardware acceleration LayoutInflater inflater = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.image_viewer, screen); FrameLayout parent = (FrameLayout) view.findViewById(R.id.image); Log.e(main, view is + view.isHardwareAccelerated() ); Media image = null; Log.e(main, parent is + parent.isHardwareAccelerated() ); image = new Media_Video (getApplicationContext() , parent , fName); Log.e(main, =); Log.e(main, view is + view.isHardwareAccelerated() ); Log.e(main, parent is + parent.isHardwareAccelerated() ); Log.e(main, image is + image.isHardwareAccelerated() ); Log.e(main, screen is + screen.isHardwareAccelerated() ); Log.e(main, =); image.ButtonSetup(view); screen.setOnTouchListener(image); Where Media_Video has the following video = (VideoView) screen.findViewById(R.id.video); video.setKeepScreenOn(true); video.setClickable(true); video.setVideoPath(fName); Log.i(video, screen is + screen.isHardwareAccelerated() ); Log.i(video, videois + video.isHardwareAccelerated()); Log.w(video , How has focus + video.findFocus()); Log.w(video , video Buffer + video.getBufferPercentage() ); Log.w(video , video Layer Type + video.getLayerType() ); Log.w(video , video Visibility + video.getVisibility()); Log.w(video , video Screen On+ video.getKeepScreenOn() ); Log.w(video , video is Clickable + video.isClickable() ); Log.w(video , video is Focusable + video.isFocusable() ); Log.w(video , video is Visibility+ video.getVisibility()); Log.w(video , video has a Holder + (video.getHolder() == null) ); Log.w(video , video root View+ video.getRootView() ); Log.w(video , video is Opaque+ video.isOpaque() ); Log.w(video , video is Shown + video.isShown() ); Thus resulting in the following LogCat: 11-26 17:21:53.000: E/main(21376): screen is true 11-26 17:21:53.000: I/CHECK(21376): Child 0 is of type LinearLayout 11-26 17:21:53.250: E/main(21376): view is true 11-26 17:21:53.250: E/main(21376): parent is true 11-26 17:21:53.250: I/video(21376): Mediaconstructor started 11-26 17:21:53.550: I/video(21376): Mediaconstructor CALLED 11-26 17:21:53.550: I/video(21376): Media_video constructor started 11-26 17:21:53.550: E/Video Media(21376): VIDEO Initalized [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-26 17:21:53.550: I/video(21376): screen is true 11-26 17:21:53.550: I/video(21376): videois true 11-26 17:21:53.550: W/video(21376): How has focus android.widget.VideoView@40d50d70 11-26 17:21:53.550: W/video(21376): video Buffer 0 11-26 17:21:53.550: W/video(21376): video Layer Type 0 11-26 17:21:53.550: W/video(21376): video Visibility 0 11-26 17:21:53.550: W/video(21376): video Screen On true 11-26 17:21:53.550: W/video(21376): video is Clickabletrue 11-26 17:21:53.550: W/video(21376): video is Focusabletrue 11-26 17:21:53.550: W/video(21376): video is Visibility 0 11-26 17:21:53.550: W/video(21376): video has a Holder false 11-26 17:21:53.550: W/video(21376): video root View com.android.internal.policy.impl.PhoneWindow$DecorView@4098eb98 11-26 17:21:53.550: W/video(21376): video is Opaque true 11-26 17:21:53.550: W/video(21376): video is Showntrue 11-26 17:21:53.610: E/main(21376): = 11-26 17:21:53.760: E/Surface(21376): surface (identity=3592) is invalid, err=-19 (No such device) 11-26 17:21:53.770: D/CallStack(21376): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-26 17:21:53.770: D/CallStack(21376): Surface#03 pc 4f38 /system/lib/libEGL.so 11-26 17:21:53.770: D/CallStack(21376): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so 11-26 17:21:54.120: D
Re: [android-developers] hardware acceleration
Thanks that is good to know, then what causes the err=-19 and the image not to show , while the audio plays. It is a std .3gp file recorded using the camera. and plays fine with Gallery All help has been greatly appreciated On 11/26/2011 06:35 PM, Romain Guy wrote: VideoView should not be affected by hardware acceleration since its rendering happens in a different window. On Sat, Nov 26, 2011 at 2:45 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: Does hardware acceleration effect in any way VideoView when displaying a video ? Thinking back and seeing that onCreate reports hardwareAcceleration as false, because this is too early and in fact it is true when checked after onCreate. perhaps all along I have had hardware acceleration, so then the question should have been does h/w acc. effect VideoView and this is why I can hear but not see the video ? Thanks On 11/26/2011 05:31 PM, New Developer wrote: Ok then perhaps I'm barking up the wrong tree looking at hardware acceleration LayoutInflater inflater = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.image_viewer, screen); FrameLayout parent = (FrameLayout) view.findViewById(R.id.image); Log.e(main, view is + view.isHardwareAccelerated() ); Media image = null; Log.e(main, parent is + parent.isHardwareAccelerated() ); image = new Media_Video (getApplicationContext() , parent , fName); Log.e(main, =); Log.e(main, view is + view.isHardwareAccelerated() ); Log.e(main, parent is + parent.isHardwareAccelerated() ); Log.e(main, image is + image.isHardwareAccelerated() ); Log.e(main, screen is + screen.isHardwareAccelerated() ); Log.e(main, =); image.ButtonSetup(view); screen.setOnTouchListener(image); Where Media_Video has the following video = (VideoView) screen.findViewById(R.id.video); video.setKeepScreenOn(true); video.setClickable(true); video.setVideoPath(fName); Log.i(video, screen is + screen.isHardwareAccelerated() ); Log.i(video, videois + video.isHardwareAccelerated()); Log.w(video , How has focus + video.findFocus()); Log.w(video , video Buffer + video.getBufferPercentage() ); Log.w(video , video Layer Type + video.getLayerType() ); Log.w(video , video Visibility + video.getVisibility()); Log.w(video , video Screen On+ video.getKeepScreenOn() ); Log.w(video , video is Clickable + video.isClickable() ); Log.w(video , video is Focusable + video.isFocusable() ); Log.w(video , video is Visibility+ video.getVisibility()); Log.w(video , video has a Holder + (video.getHolder() == null) ); Log.w(video , video root View+ video.getRootView() ); Log.w(video , video is Opaque+ video.isOpaque() ); Log.w(video , video is Shown + video.isShown() ); Thus resulting in the following LogCat: 11-26 17:21:53.000: E/main(21376): screen is true 11-26 17:21:53.000: I/CHECK(21376): Child 0 is of type LinearLayout 11-26 17:21:53.250: E/main(21376): view is true 11-26 17:21:53.250: E/main(21376): parent is true 11-26 17:21:53.250: I/video(21376): Mediaconstructor started 11-26 17:21:53.550: I/video(21376): Mediaconstructor CALLED 11-26 17:21:53.550: I/video(21376): Media_video constructor started 11-26 17:21:53.550: E/Video Media(21376): VIDEO Initalized [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-26 17:21:53.550: I/video(21376): screen is true 11-26 17:21:53.550: I/video(21376): videois true 11-26 17:21:53.550: W/video(21376): How has focus android.widget.VideoView@40d50d70 11-26 17:21:53.550: W/video(21376): video Buffer 0 11-26 17:21:53.550: W/video(21376): video Layer Type 0 11-26 17:21:53.550: W/video(21376): video Visibility 0 11-26 17:21:53.550: W/video(21376): video Screen On true 11-26 17:21:53.550: W/video(21376): video is Clickabletrue 11-26 17:21:53.550: W/video(21376): video is Focusabletrue 11-26 17:21:53.550: W/video(21376): video is Visibility 0 11-26 17:21:53.550: W/video(21376): video has a Holder false 11-26 17:21:53.550: W/video(21376): video root View com.android.internal.policy.impl.PhoneWindow$DecorView@4098eb98 11-26 17
Re: [android-developers] hardware acceleration
Just tested the same code on a Sony S same thing So with both the Sony S and Motorola Xoom You hear the audio , but see No video hardware is accelerated and first time around I get the following message in LogCat 11-24 07:49:23.688: E/Surface(11158): surface (identity=1931) is invalid, err=-19 (No such device) 11-24 07:49:23.688: D/CallStack(11158): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#03 pc 4f38 /system/lib/libEGL.so 11-24 07:49:23.688: D/CallStack(11158): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so 11-24 07:49:23.898: D/MediaPlayer(11158): getMetadata Thanks again to all On 11/23/2011 11:33 PM, Romain Guy wrote: On what device are you testing this? On Wed, Nov 23, 2011 at 7:01 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: My mainfest has application android:icon=@drawable/logo android:hardwareAccelerated=true android:label=@string/app_name android:debuggable=true android:theme=@android:style/Theme.NoTitleBar activity android:name=MainActivity android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity activity android:name=Display android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity From MainActivity I call Display using intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); startActivity(intent); Display class has public class Display extends Activity { private FrameLayout parent; private String fName; public static VideoView video; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, videois + video.isHardwareAccelerated()); Log.e(display, imageis + image.isHardwareAccelerated()); image.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, imageis + image.isHardwareAccelerated()); parent.setOnTouchListener(image); From my reading and understanding of Hardware acceleration I have done everything to enable hardware acceleration yet from LogCat parent is false video is false image is false image is false Why ? ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com mailto:romain...@android.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] hardware acceleration
Thanks The mainActivity calls the Display Activity using inflate LayoutInflater inflater = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.image_viewer, screen); screen is a FrameLayout on the MainActivity, and View now becomes the Activity with the VideoView which produces that error Thanks again On 11/24/2011 01:08 PM, Kostya Vasilyev wrote: Where do you perform this test relative to the activity's lifecycle? The method will not return true until the view has been attached to a hardware accelerated window. The activity's onCreate is too early for that, so you get false. -- Kostya 24 ноября 2011 г. 16:50 пользователь New Developer secur...@isscp.com mailto:secur...@isscp.com написал: Just tested the same code on a Sony S same thing So with both the Sony S and Motorola Xoom You hear the audio , but see No video hardware is accelerated and first time around I get the following message in LogCat 11-24 07:49:23.688: E/Surface(11158): surface (identity=1931) is invalid, err=-19 (No such device) 11-24 07:49:23.688: D/CallStack(11158): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-24 07:49:23.688: D/CallStack(11158): Surface#03 pc 4f38 /system/lib/libEGL.so 11-24 07:49:23.688: D/CallStack(11158): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so 11-24 07:49:23.898: D/MediaPlayer(11158): getMetadata Thanks again to all On 11/23/2011 11:33 PM, Romain Guy wrote: On what device are you testing this? On Wed, Nov 23, 2011 at 7:01 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: My mainfest has application android:icon=@drawable/logo android:hardwareAccelerated=true android:label=@string/app_name android:debuggable=true android:theme=@android:style/Theme.NoTitleBar activity android:name=MainActivity android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity activity android:name=Display android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity From MainActivity I call Display using intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); startActivity(intent); Display class has public class Display extends Activity { private FrameLayout parent; private String fName; public static VideoView video; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, videois + video.isHardwareAccelerated()); Log.e(display, imageis + image.isHardwareAccelerated()); image.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, imageis + image.isHardwareAccelerated()); parent.setOnTouchListener(image); From my reading and understanding of Hardware acceleration I have done everything to enable hardware acceleration yet from LogCat parent is false video is false image is false image is false Why ? ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer
[android-developers] hardware acceleration
I have a main Activity within the Manifest.xml hardware_acceleration=true activity android:name=MainActivity android:screenOrientation=landscape android:configChanges=orientation android:hardwareAccelerated=true /activity activity android:name=display android:screenOrientation=landscape android:configChanges=orientation android:hardwareAccelerated=true /activity screen = (FrameLayout) findViewById(R.id.data); is a part of the main layout Log.e(main, screen is + screen.isHardwareAccelerated() ); calling isHardwareAccelerated() returns true; Now the main Activity calls an Intent to launch a second activity This activity in the manifest.xml also has hardware_acceleration=true Intent intent = new Intent(); intent.setClass(getApplicationContext(), display.class); startActivity(intent); parent = (FrameLayout) findViewById(R.id.image); is a part of the display class layout Log.e(display, parent is + parent.isHardwareAccelerated()); however isHardwareAccelerated() returns false; Why is this ? and how do I launch an activity with hardware acceleration ? 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] hardware acceleration
My mainfest has application android:icon=@drawable/logo android:hardwareAccelerated=true android:label=@string/app_name android:debuggable=true android:theme=@android:style/Theme.NoTitleBar activity android:name=MainActivity android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity activity android:name=Display android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity From MainActivity I call Display using intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); startActivity(intent); Display class has public class Display extends Activity { private FrameLayout parent; private String fName; public static VideoView video; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, videois + video.isHardwareAccelerated()); Log.e(display, imageis + image.isHardwareAccelerated()); image.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, imageis + image.isHardwareAccelerated()); parent.setOnTouchListener(image); From my reading and understanding of Hardware acceleration I have done everything to enable hardware acceleration yet from LogCat parent is false video is false image is false image is false Why ? ? 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] hardware acceleration
Thank YOU ! ! on the Morotola Xoom I know you are the google guru when it comes to this any help at all would be greatly appreciated. Thanks On 11/23/2011 11:33 PM, Romain Guy wrote: On what device are you testing this? On Wed, Nov 23, 2011 at 7:01 PM, New Developer secur...@isscp.com mailto:secur...@isscp.com wrote: My mainfest has application android:icon=@drawable/logo android:hardwareAccelerated=true android:label=@string/app_name android:debuggable=true android:theme=@android:style/Theme.NoTitleBar activity android:name=MainActivity android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity activity android:name=Display android:hardwareAccelerated=true android:screenOrientation=landscape android:configChanges=orientation /activity From MainActivity I call Display using intent Intent intent = new Intent(); intent.setClass(getApplicationContext(), Display.class); startActivity(intent); Display class has public class Display extends Activity { private FrameLayout parent; private String fName; public static VideoView video; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fName = CURRENT_IMAGE; setContentView(R.layout.image_viewer); getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED , WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); parent = (FrameLayout) findViewById(R.id.image); parent.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, parent is + parent.isHardwareAccelerated()); video = (VideoView) findViewById(R.id.video); Log.e(display, videois + video.isHardwareAccelerated()); Log.e(display, imageis + image.isHardwareAccelerated()); image.setLayerType(View.LAYER_TYPE_HARDWARE, null); Log.e(display, imageis + image.isHardwareAccelerated()); parent.setOnTouchListener(image); From my reading and understanding of Hardware acceleration I have done everything to enable hardware acceleration yet from LogCat parent is false video is false image is false image is false Why ? ? 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com mailto:romain...@android.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaPlayer sound heard, screen blank hardware accelerated
Hi all, No matter if I build the surfaceView dynamically or through a layout.xml because I have hardwareAccerlerated=true in my manifest I get a black window and hear the audio of the video when played video_view = new SurfaceView(ctx); screen.addView(video_view, new LayoutParams(1020, 600)); video_holder = video_view.getHolder(); try { mp = new MediaPlayer(); mp.setDataSource(fName); mp.setDisplay(video_holder); mp.setOnBufferingUpdateListener(this); mp.setOnCompletionListener(this); mp.setOnPreparedListener(this); mp.setOnVideoSizeChangedListener(this); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); } catch (IOException e) { e.printStackTrace(); } screen is a FrameLayout, upon which the SurfaceView is placed 11-18 09:22:04.769: E/Video Media(24116): VIDEO Initalized [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-18 09:22:04.799: D/dalvikvm(24116): GC_CONCURRENT freed 5K, 3% free 20082K/20679K, paused 2ms+3ms 11-18 09:22:04.839: E/Video Media(24116): VIDEO loaded [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-18 09:22:04.919: E/Surface(24116): surface (identity=1297) is invalid, err=-19 (No such device) 11-18 09:22:04.929: D/CallStack(24116): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#03 pc 4f38 /system/lib/libEGL.so 11-18 09:22:04.929: D/CallStack(24116): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so The invalid, err=-19 only appears when the hardwareAccelerated=true is in the manifest Thus How does one create a surfaceview when you must have hardwareaccelerated ? 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] MediaPlayer sound heard, screen blank hardware accelerated
An update If I click on a spinner located on the screen, then the video suddenly appears behind the spinner drop down but when I close the spinner drop down the video disappears again not sure if this helps ? On 11/18/2011 09:31 AM, New Developer wrote: Hi all, No matter if I build the surfaceView dynamically or through a layout.xml because I have hardwareAccerlerated=true in my manifest I get a black window and hear the audio of the video when played video_view = new SurfaceView(ctx); screen.addView(video_view, new LayoutParams(1020, 600)); video_holder = video_view.getHolder(); try { mp = new MediaPlayer(); mp.setDataSource(fName); mp.setDisplay(video_holder); mp.setOnBufferingUpdateListener(this); mp.setOnCompletionListener(this); mp.setOnPreparedListener(this); mp.setOnVideoSizeChangedListener(this); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); } catch (IOException e) { e.printStackTrace(); } screen is a FrameLayout, upon which the SurfaceView is placed 11-18 09:22:04.769: E/Video Media(24116): VIDEO Initalized [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-18 09:22:04.799: D/dalvikvm(24116): GC_CONCURRENT freed 5K, 3% free 20082K/20679K, paused 2ms+3ms 11-18 09:22:04.839: E/Video Media(24116): VIDEO loaded [/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp] 11-18 09:22:04.919: E/Surface(24116): surface (identity=1297) is invalid, err=-19 (No such device) 11-18 09:22:04.929: D/CallStack(24116): Surface#00 pc 00013b5e /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#01 pc 00013b9c /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#02 pc 00013c1a /system/lib/libsurfaceflinger_client.so 11-18 09:22:04.929: D/CallStack(24116): Surface#03 pc 4f38 /system/lib/libEGL.so 11-18 09:22:04.929: D/CallStack(24116): Surface#04 pc 00036dca /system/lib/libandroid_runtime.so The invalid, err=-19 only appears when the hardwareAccelerated=true is in the manifest Thus How does one create a surfaceview when you must have hardwareaccelerated ? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Speed up dalvikvm calls
Thank you for your input I'm not needing 200fps, in fact the purpose is to go from 30fps on down to 5fps I'm trying to get a video player that will play at normal speed and then slow down to around 10x slower frames.incrementProgressBy(300-(playSpeed*30)); // 327-(playSpeed*30)); frames = frames.getProgress(); mBitmap = retriever.getFrameAtTime(frame*1000); When playSpeed is 0 then increment is 300 thus getFrameAt is 300,000 When playSpeed is 9 then increment is 30 thus getFrameAt is30,000 Currently, the code slows the playback time. I have a 15 sec test video at playSpeed 0 it plays for 15 sec at play speed 9 it plays for 2 min 30 sec Time wise Only, this is perfect, but video play back quality it is jerky / skippy. For example, the person walking they are moving towards the camera but the left leg is always in front, never left, right left. (Which is what you see when you play back using gallery) Also the playback size is around 1020 x 600, would be nice to have it as large as possible thou I understand from the problems I'm having I might have to scale back to around 800 x 600, thou this is NOT ideal. I will try adjusting the mHandler.postDelayed(buffering, 1); to , 40); and keep working With regards to media player, I had tried both MediaPlayer and VideoView The issue I ran into there was E/Surface(25854): surface (identity=1038) is invalid, err=-19 (No such device) My main Activity calls a Fragment which is inflated, and I add to the FrameLayout the videoView or MediaPlayer dynamically The overall is you can select any media type jpg, png , or 3gp and you can zoom in and zoom out, draw lines , change colors , etc.. This is all accomplished with transparent ImageView layers stack on top of each other It works great for all images, fails when it comes to video. I have been stuck on this for about 5-7 months now, if it's not one problem it's another. I will also try the dynamic MediaPlayer again BelvCompSvs, can you please further explain for what you want to do the ICS [14] is exactly what that is for Again Thanks to all On 11/17/2011 04:43 AM, Daniel Drozdzewski wrote: On 16 November 2011 17:40, New Developersecur...@isscp.com wrote: Thanks Daniel Iam trying to call it every 5ms But I would settle for as fast as possible. Um... I don't think you have a choice, unless you can settle for impossible. Why do you need 200fps? I have tried so somehow buffer, thus trying to do all the I/O first and then just view but this has failed hopelessly I can only load 15 frames into memory and then get an OutOfMemory Do you by any chance know how to find the bandwidth of the Xoom and Sony S bus what is it capable of If I have to call every 20ms but get a smoother flowing video playback that would be fine. 20ms still gives *very smooth* playback / animation. Go for 40ms - it is still standard for TV, cinema and DVD (give or take). Experiment and see, what is possible, but to be honest I think you either aiming too high or approached it from a wrong angle. If you are displaying it only as 320 x 180, why not transcode the video to that format and save on bandwidth and processing for scaling down? But the most important question is, why don't you use MediaPlayer? I am not sure what are you trying to achieve by extracting frame by frame from a movie clip and displaying them as still images as fast as possible to achieve smooth transitions as in a movie clip. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Speed up dalvikvm calls
Actually Thanks I was wondering how to find that discussion, As If I can get media player working I would need the sine wave idea you introduced me to. Right now mediaplayer is playing (I hear audio) but the screen is black Thanks On 11/17/2011 09:09 AM, Daniel Drozdzewski wrote: On 17 November 2011 14:05, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: On 17 November 2011 12:25, New Developersecur...@isscp.com wrote: Thank you for your input I'm not needing 200fps, in fact the purpose is to go from 30fps on down to 5fps I'm trying to get a video player that will play at normal speed and then slow down to around 10x slower Have a look at this thread: http://groups.google.com/group/android-developers/browse_thread/thread/68faac2c99db7b96/679f0aca6422ab41 It uses a trick of pausing MediaPlayer whilst playing the video for short periods of time to achieve slow-mo. Lol, that thread back in May included you. Ignore me. I would rather research painting on a transparent pane overlaying the MediaPlayer, but it seems you have tried 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] Speed up dalvikvm calls
Again I'm stuck with the err -19 message Here I'm trying the media player My layout has FrameLayout android:layout_width=1020px android:layout_height=699px android:background=#00android:id=@+id/image SurfaceView android:layout_width=fill_parent android:layout_height=600px android:background=#FF00 android:id=@+id/video/ /FrameLayout then I have code wise video_view = (SurfaceView) view.findViewById(R.id.video); video_holder = video_view.getHolder(); ImageDisplay.video_holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); ImageDisplay.video_holder.addCallback(this); try { mp = new MediaPlayer(); mp.setDataSource(name); mp.setDisplay(eedsImageDisplay.video_holder); mp.prepare(); mp.setOnBufferingUpdateListener(this); mp.setOnCompletionListener(this); mp.setOnPreparedListener(this); mp.setOnVideoSizeChangedListener(this); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalStateException e){ e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } I get the Following in LogCat 11-17 09:59:12.368: W/media(5379): on Video Size Changed 1280 x 720 11-17 09:59:12.378: W/media(5379): on Prepared *11-17 09:59:12.418: E/Surface(5379): surface (identity=868) is invalid, err=-19 (No such device)* 11-17 09:59:12.468: W/media(5379): surface Create ED 11-17 09:59:12.468: W/media(5379): surface Changed fmt = 4 1020 x 600 11-17 09:59:21.168: I/Media(5379): Video Started 11-17 09:59:21.388: W/media(5379): on Video Size Changed 1280 x 720 11-17 09:59:36.728: W/media(5379): on Completion Any ideas on the Error ? 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] Speed up dalvikvm calls
To All I can remove the error message IF , I remove the android:hardwareAccelerated=true from the Manifest file But I need this for other aspects I still have an audio sound track and a blank picture any thoughts ? Thanks again On 11/17/2011 10:28 AM, New Developer wrote: Again I'm stuck with the err -19 message Here I'm trying the media player My layout has FrameLayout android:layout_width=1020px android:layout_height=699px android:background=#00android:id=@+id/image SurfaceView android:layout_width=fill_parent android:layout_height=600px android:background=#FF00 android:id=@+id/video/ /FrameLayout then I have code wise video_view = (SurfaceView) view.findViewById(R.id.video); video_holder = video_view.getHolder(); ImageDisplay.video_holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); ImageDisplay.video_holder.addCallback(this); try { mp = new MediaPlayer(); mp.setDataSource(name); mp.setDisplay(eedsImageDisplay.video_holder); mp.prepare(); mp.setOnBufferingUpdateListener(this); mp.setOnCompletionListener(this); mp.setOnPreparedListener(this); mp.setOnVideoSizeChangedListener(this); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalStateException e){ e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } I get the Following in LogCat 11-17 09:59:12.368: W/media(5379): on Video Size Changed 1280 x 720 11-17 09:59:12.378: W/media(5379): on Prepared *11-17 09:59:12.418: E/Surface(5379): surface (identity=868) is invalid, err=-19 (No such device)* 11-17 09:59:12.468: W/media(5379): surface Create ED 11-17 09:59:12.468: W/media(5379): surface Changed fmt = 4 1020 x 600 11-17 09:59:21.168: I/Media(5379): Video Started 11-17 09:59:21.388: W/media(5379): on Video Size Changed 1280 x 720 11-17 09:59:36.728: W/media(5379): on Completion Any ideas on the Error ? 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Speed up dalvikvm calls
Hi all, I have a runnable thread which is called every 5 ms mHandler.postDelayed(buffering, 5); Yet from the LogCat it is taking much longer. 11-16 10:32:14.110: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:14.420: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:14.720: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 24ms 11-16 10:32:15.030: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:15.330: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms Is there a method to speed up this call and reduce the paused 25ms time ? 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] Speed up dalvikvm calls
Thanks to all It is a video player I'm using the MediaMetadataRetriever so that I can load and if necessary stop and edit a bitmap I've tried (obviously unsuccessfully to read the bitmap and make it smaller (for the purpose of memory) the original video is 1280 x 720 I was trying to save this as a 320 x 180 bitmap so as to use up less memory mBitmap = Bitmap.createScaledBitmap(retriever.getFrameAtTime(frame*1000) , 320 , 180 , false); Item.setImageBitmap(mBitmap);//1280 x 720 mHandler.postDelayed(buffering, 5); The quality drops radically which is NOT good, As it is I'm reloading into the same variable mBitmap the same size each time just basically a different set of pixels What is the best way to setup the mBitmap variable that I keep using the same variable and the same memory ? I feel that this is deleting the old bitmap from memory then loading the new one. So like a accordion add,delete,add,delete,add,delete Is there a way to expand the memory that this application can use ? obviously there is going to be a limit (other apps running and the total memory found on the tablet) Thanks again to all On 11/16/2011 11:04 AM, Kristopher Micinski wrote: Those are garbage collections, you can't just ask the vm to quit garbage collecting. This usually implies that you are doing something that takes a lot of memory (fire up the barcode scanner and turn on logcat). So basically, what type of app are you writing? Short answer: no. Longer answer: this probably means that your app isn't written well enough (or you just need a lot of memory..) kris On Wed, Nov 16, 2011 at 10:48 AM, New Developersecur...@isscp.com wrote: Hi all, I have a runnable thread which is called every 5 ms mHandler.postDelayed(buffering, 5); Yet from the LogCat it is taking much longer. 11-16 10:32:14.110: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:14.420: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:14.720: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 24ms 11-16 10:32:15.030: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms 11-16 10:32:15.330: D/dalvikvm(1945): GC_FOR_ALLOC freed 1801K, 16% free 23172K/27463K, paused 25ms Is there a method to speed up this call and reduce the paused 25ms time ? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Speed up dalvikvm calls
Thanks Daniel Iam trying to call it every 5ms But I would settle for as fast as possible. I have tried so somehow buffer, thus trying to do all the I/O first and then just view but this has failed hopelessly I can only load 15 frames into memory and then get an OutOfMemory Do you by any chance know how to find the bandwidth of the Xoom and Sony S bus what is it capable of If I have to call every 20ms but get a smoother flowing video playback that would be fine. It's just right now I read every 327 or 327000 frames frame is not incremented by 1 but by 327 this works for the timing it now takes 15 sec to play a 15 sec video BUT you are skipping so much that it is obviously jerky and does not flow. Would love to increment frame by 10, but then then the handle cycle to be faster. any ideas ? thanks in advance On 11/16/2011 12:18 PM, Daniel Drozdzewski wrote: On 16 November 2011 16:45, New Developersecur...@isscp.com wrote: Thanks to all It is a video player I'm using the MediaMetadataRetriever so that I can load and if necessary stop and edit a bitmap I've tried (obviously unsuccessfully to read the bitmap and make it smaller (for the purpose of memory) the original video is 1280 x 720 I was trying to save this as a 320 x 180 bitmap so as to use up less memory mBitmap = Bitmap.createScaledBitmap(retriever.getFrameAtTime(frame*1000) , 320 , 180 , false); Item.setImageBitmap(mBitmap);//1280 x 720 Here ^^^ mBitmap is 320x180, however retriever.getFrameAtTime() returns the full thing... How often is this code called? Do you know, that retriever does I/O to pull the frame out? Are you trying to have it running every 5ms? Do you appreciate that 1280 x 720 x 4B = 3.5MiB and if you want that every 5ms, then your I/O bus and memory bus would have to have bandwidth of 700MiB (assuming processing takes zero time in the 5ms slot, which obviously it doesn't). That is a big ask for any mobile phone. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MediaMetadataRetriever does this work PLEASE Help?
Horay ! ! ! ! funny that just retrieve.getFrameAtTime(frame);vs retrieve.getFrameAtTime(frame * 1000); can make such a HUGE difference, now If I can just make it smoother Thanks all On 11/14/2011 01:34 PM, New Developer wrote: No matter what I pass as a value to getFrameAtTime() always displays the first frame If I keep a copy of the past frames and compare them they are not the same neither is the pixel array from getPixels So the bitmap must be updating but just not displaying on screen. I have tried setting the layer type to Hardware accelerated will not work isHardwareAccelerated returns false even after layout.setLayerType(View.LAYER_TYPE_HARDWARE, null); tried to use runOnUiThread mActivity.runOnUiThread(new Runnable() { public void run() { mBitmap.prepareToDraw(); ImageDisplay.imageView.setImageBitmap(mBitmap); ImageDisplay.imageView.invalidate(); } }); No Joy Please any advice on how to get these bitmaps to show ? ? ? Main Activity has a FrameLayout the FrameLayout is fille with a call to a Fragment inflate The fragment extends an ImageView Type Works great with jpg and png will not work with 3gp Thanks again On 11/13/2011 07:41 PM, New Developer wrote: No matter what value is passed to pict = retrieve.getFrameAtTime(frame); You always have the first frame never anything else ? Why ? On 11/13/2011 04:04 PM, New Developer wrote: Called from a class that implements ImageView @Override protected void onDraw(Canvas canvas) { Log.e(Video Media , on Draw Called); super.onDraw(canvas); Log.e(Media, drawstep 2); if (isPlaying) loadFrame(); Log.e(Media, drawstep 3); } private void loadFrame() { if (isPlaying) { frames.incrementProgressBy(11-playSpeed); if (frame == duration) { isPlaying = false; frame = 0; frames.setProgress(0); frames.setEnabled(true); speed.setEnabled(true); play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play)); } pict.recycle(); mBitmap.recycle(); retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame); mBitmap = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(),pict.getHeight(), matrix, true); Log.e(Media, load Frame + frame + (+ (11-playSpeed) +) + pict.getWidth() + x + pict.getHeight() ); Log.e(Media, load Framestep 1 ); super.setImageBitmap(mBitmap); Log.e(Media, load Framestep 2 ); super.invalidate(); Log.e(Media, load Framestep 3 ); } } frame get inremented in steps of 10 , thus pict = retrieve.getFrameAtTime(frame); loads every 10 frames mBitmap as you can see is set to update the super.setImageBitmap() resulting in the following logcat 11-13 15:47:52.605: E/Video Media(4647): on Draw Called 11-13 15:47:52.615: E/Media(4647): drawstep 2 11-13 15:47:52.915: E/Media(4647): load Frame2450 (10)1280 x 720 11-13 15:47:52.915: E/Media(4647): load Framestep 1 11-13 15:47:52.915: E/Media(4647): load Framestep 2 11-13 15:47:52.915: E/Media(4647): load Framestep 3 11-13 15:47:52.915: E/Media(4647): drawstep 3 11-13 15:47:52.935: E/Video Media(4647): on Draw Called 11-13 15:47:52.945: E/Media(4647): drawstep 2 11-13 15:47:53.255: E/Media(4647): load Frame2460 (10)1280 x 720 11-13 15:47:53.255: E/Media(4647): load Framestep 1 11-13 15:47:53.255: E/Media(4647): load Framestep 2 11-13 15:47:53.255: E/Media(4647): load Framestep 3 11-13 15:47:53.255: E/Media(4647): drawstep 3 11-13 15:47:53.275: E/Video Media(4647): on Draw Called 11-13 15:47:53.285: E/Media(4647): drawstep 2 11-13 15:47:53.585: E/Media(4647): load Frame2470 (10)1280 x 720 11-13 15:47:53.585: E/Media(4647): load Framestep 1 11-13 15:47:53.585: E/Media(4647): load Framestep 2 11-13 15:47:53.585: E/Media(4647): load Framestep 3 11-13 15:47:53.585: E/Media(4647): drawstep 3 11-13 15:47:53.605: E/Video Media(4647): on Draw Called 11-13 15:47:53.615: E/Media(4647): drawstep 2 11-13 15:47:53.925: E/Media(4647): load Frame2480 (10)1280 x 720 11-13 15:47:53.925: E/Media(4647): load Framestep 1 11-13 15:47:53.925: E/Media(4647): load Framestep 2 11-13 15:47:53.925: E/Media(4647): load Framestep 3 11-13 15:47:53.925: E/Media(4647): drawstep 3 11-13 15:47:53.945: E/Video Media(4647): on Draw Called 11-13 15:47:53.955: E/Media(4647): drawstep 2 11-13 15:47:54.255: E/Media(4647): load Frame2490 (10)1280 x 720 11-13 15:47:54.255: E/Media(4647
Re: [android-developers] MediaMetadataRetriever does this work PLEASE Help?
So my play loop is loadFrame() { frames.incrementProgressBy(326-(playSpeed*30)); frames is a seekbar frame = frames.getProgress(); pict = retriever.getFrameAtTime(frame*1000); mBitmap = Bitmap.createBitmap(pict, 0, 0, 1060,600, matrix, false); super.setImageBitmap(mBitmap); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if (isPlaying) loadFrame(); } so essentially frame is incremented by 326 thus getFrame is in steps of 326,000 I think this is generating the jumpiness I see, But if I make this any smaller it will play slower than what was recorded. the 326 allows a 15 second video to play back in 15 seconds. So is there anyway to speed up the time it takes to recall loadFrame() thus allowing for a smaller step value ? Thanks in advance On 11/15/2011 11:22 PM, New Developer wrote: Horay ! ! ! ! funny that just retrieve.getFrameAtTime(frame);vs retrieve.getFrameAtTime(frame * 1000); can make such a HUGE difference, now If I can just make it smoother Thanks all On 11/14/2011 01:34 PM, New Developer wrote: No matter what I pass as a value to getFrameAtTime() always displays the first frame If I keep a copy of the past frames and compare them they are not the same neither is the pixel array from getPixels So the bitmap must be updating but just not displaying on screen. I have tried setting the layer type to Hardware accelerated will not work isHardwareAccelerated returns false even after layout.setLayerType(View.LAYER_TYPE_HARDWARE, null); tried to use runOnUiThread mActivity.runOnUiThread(new Runnable() { public void run() { mBitmap.prepareToDraw(); ImageDisplay.imageView.setImageBitmap(mBitmap); ImageDisplay.imageView.invalidate(); } }); No Joy Please any advice on how to get these bitmaps to show ? ? ? Main Activity has a FrameLayout the FrameLayout is fille with a call to a Fragment inflate The fragment extends an ImageView Type Works great with jpg and png will not work with 3gp Thanks again On 11/13/2011 07:41 PM, New Developer wrote: No matter what value is passed to pict = retrieve.getFrameAtTime(frame); You always have the first frame never anything else ? Why ? On 11/13/2011 04:04 PM, New Developer wrote: Called from a class that implements ImageView @Override protected void onDraw(Canvas canvas) { Log.e(Video Media , on Draw Called); super.onDraw(canvas); Log.e(Media, drawstep 2); if (isPlaying) loadFrame(); Log.e(Media, drawstep 3); } private void loadFrame() { if (isPlaying) { frames.incrementProgressBy(11-playSpeed); if (frame == duration) { isPlaying = false; frame = 0; frames.setProgress(0); frames.setEnabled(true); speed.setEnabled(true); play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play)); } pict.recycle(); mBitmap.recycle(); retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame); mBitmap = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(),pict.getHeight(), matrix, true); Log.e(Media, load Frame + frame + (+ (11-playSpeed) +) + pict.getWidth() + x + pict.getHeight() ); Log.e(Media, load Framestep 1 ); super.setImageBitmap(mBitmap); Log.e(Media, load Framestep 2 ); super.invalidate(); Log.e(Media, load Framestep 3 ); } } frame get inremented in steps of 10 , thus pict = retrieve.getFrameAtTime(frame); loads every 10 frames mBitmap as you can see is set to update the super.setImageBitmap() resulting in the following logcat 11-13 15:47:52.605: E/Video Media(4647): on Draw Called 11-13 15:47:52.615: E/Media(4647): drawstep 2 11-13 15:47:52.915: E/Media(4647): load Frame2450 (10)1280 x 720 11-13 15:47:52.915: E/Media(4647): load Framestep 1 11-13 15:47:52.915: E/Media(4647): load Framestep 2 11-13 15:47:52.915: E/Media(4647): load Framestep 3 11-13 15:47:52.915: E/Media(4647): drawstep 3 11-13 15:47:52.935: E/Video Media(4647): on Draw Called 11-13 15:47:52.945: E/Media(4647): drawstep 2 11-13 15:47:53.255: E/Media(4647): load Frame2460 (10)1280 x 720 11-13 15:47:53.255: E/Media(4647): load Framestep 1 11-13 15:47:53.255: E/Media(4647): load Framestep 2 11-13 15:47:53.255: E/Media(4647): load Framestep 3 11-13 15:47:53.255: E/Media(4647): drawstep 3 11-13 15:47:53.275: E/Video Media(4647): on Draw Called 11-13 15:47:53.285: E/Media(4647): drawstep 2 11-13 15:47:53.585: E/Media(4647): load Frame2470
Re: [android-developers] MediaMetadataRetriever does this work PLEASE Help?
No matter what I pass as a value to getFrameAtTime() always displays the first frame If I keep a copy of the past frames and compare them they are not the same neither is the pixel array from getPixels So the bitmap must be updating but just not displaying on screen. I have tried setting the layer type to Hardware accelerated will not work isHardwareAccelerated returns false even after layout.setLayerType(View.LAYER_TYPE_HARDWARE, null); tried to use runOnUiThread mActivity.runOnUiThread(new Runnable() { public void run() { mBitmap.prepareToDraw(); ImageDisplay.imageView.setImageBitmap(mBitmap); ImageDisplay.imageView.invalidate(); } }); No Joy Please any advice on how to get these bitmaps to show ? ? ? Main Activity has a FrameLayout the FrameLayout is fille with a call to a Fragment inflate The fragment extends an ImageView Type Works great with jpg and png will not work with 3gp Thanks again On 11/13/2011 07:41 PM, New Developer wrote: No matter what value is passed to pict = retrieve.getFrameAtTime(frame); You always have the first frame never anything else ? Why ? On 11/13/2011 04:04 PM, New Developer wrote: Called from a class that implements ImageView @Override protected void onDraw(Canvas canvas) { Log.e(Video Media , on Draw Called); super.onDraw(canvas); Log.e(Media, drawstep 2); if (isPlaying) loadFrame(); Log.e(Media, drawstep 3); } private void loadFrame() { if (isPlaying) { frames.incrementProgressBy(11-playSpeed); if (frame == duration) { isPlaying = false; frame = 0; frames.setProgress(0); frames.setEnabled(true); speed.setEnabled(true); play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play)); } pict.recycle(); mBitmap.recycle(); pict = retrieve.getFrameAtTime(frame); mBitmap = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(),pict.getHeight(), matrix, true); Log.e(Media, load Frame + frame + (+ (11-playSpeed) +) + pict.getWidth() + x + pict.getHeight() ); Log.e(Media, load Framestep 1 ); super.setImageBitmap(mBitmap); Log.e(Media, load Framestep 2 ); super.invalidate(); Log.e(Media, load Framestep 3 ); } } frame get inremented in steps of 10 , thus pict = retrieve.getFrameAtTime(frame); loads every 10 frames mBitmap as you can see is set to update the super.setImageBitmap() resulting in the following logcat 11-13 15:47:52.605: E/Video Media(4647): on Draw Called 11-13 15:47:52.615: E/Media(4647): drawstep 2 11-13 15:47:52.915: E/Media(4647): load Frame2450 (10)1280 x 720 11-13 15:47:52.915: E/Media(4647): load Framestep 1 11-13 15:47:52.915: E/Media(4647): load Framestep 2 11-13 15:47:52.915: E/Media(4647): load Framestep 3 11-13 15:47:52.915: E/Media(4647): drawstep 3 11-13 15:47:52.935: E/Video Media(4647): on Draw Called 11-13 15:47:52.945: E/Media(4647): drawstep 2 11-13 15:47:53.255: E/Media(4647): load Frame2460 (10)1280 x 720 11-13 15:47:53.255: E/Media(4647): load Framestep 1 11-13 15:47:53.255: E/Media(4647): load Framestep 2 11-13 15:47:53.255: E/Media(4647): load Framestep 3 11-13 15:47:53.255: E/Media(4647): drawstep 3 11-13 15:47:53.275: E/Video Media(4647): on Draw Called 11-13 15:47:53.285: E/Media(4647): drawstep 2 11-13 15:47:53.585: E/Media(4647): load Frame2470 (10)1280 x 720 11-13 15:47:53.585: E/Media(4647): load Framestep 1 11-13 15:47:53.585: E/Media(4647): load Framestep 2 11-13 15:47:53.585: E/Media(4647): load Framestep 3 11-13 15:47:53.585: E/Media(4647): drawstep 3 11-13 15:47:53.605: E/Video Media(4647): on Draw Called 11-13 15:47:53.615: E/Media(4647): drawstep 2 11-13 15:47:53.925: E/Media(4647): load Frame2480 (10)1280 x 720 11-13 15:47:53.925: E/Media(4647): load Framestep 1 11-13 15:47:53.925: E/Media(4647): load Framestep 2 11-13 15:47:53.925: E/Media(4647): load Framestep 3 11-13 15:47:53.925: E/Media(4647): drawstep 3 11-13 15:47:53.945: E/Video Media(4647): on Draw Called 11-13 15:47:53.955: E/Media(4647): drawstep 2 11-13 15:47:54.255: E/Media(4647): load Frame2490 (10)1280 x 720 11-13 15:47:54.255: E/Media(4647): load Framestep 1 11-13 15:47:54.255: E/Media(4647): load Framestep 2 11-13 15:47:54.255: E/Media(4647): load Framestep 3 11-13 15:47:54.255: E/Media(4647): drawstep 3 11-13 15:47:54.285: E/Video Media(4647): on Draw Called 11-13 15:47:54.295: E/Media(4647): drawstep 2 11-13 15:47:54.595: E/Media(4647
[android-developers] VideoView dynamically
video = new VideoView(ctx); video.setBackgroundColor(Color.MAGENTA); ImageDisplay.layout.addView(video, new LayoutParams(900, 600)); -- this is a FrameLayout video.setVideoURI(Uri.parse(fName)); video.setMediaController(new MediaController(ctx)); video.requestFocus(); duration = video.getDuration(); duration returns -1 and LogCat has the following error E/Surface(25854): surface (identity=1038) is invalid, err=-19 (No such device) Any ideas what this error actually is ? and how to fix this Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SeekBar
Not sure if this is an Android 3.2 thing or because I am building the layout pro grammatically But I have a SeekBar and the bar appears as a line with a green circle NOT the standard rectangle with orange fill with rectangle slider. Also What do you use to create a slider button ON -- OFF ? 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] SeekBar
On 11/13/2011 10:17 AM, Mark Murphy wrote: On Sun, Nov 13, 2011 at 10:13 AM, New Developersecur...@isscp.com wrote: Not sure if this is an Android 3.2 thing or because I am building the layout pro grammatically But I have a SeekBar and the bar appears as a line with a green circle NOT the standard rectangle with orange fill with rectangle slider. Correct. They changed the styling of SeekBar with Android 3.x, just as they changed the styling of Spinner and other widgets, as part of the holographic theme. Also What do you use to create a slider button ON-- OFF ? On Android 4.0, use Switch. Once the source code for that is released, it may be possible to package up a version of Switch that can be used on older versions of Android via a JAR. Thanks anyway to change the styling back to the older version ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaMetadataRetriever does this work ?
Called from a class that implements ImageView @Override protected void onDraw(Canvas canvas) { Log.e(Video Media , on Draw Called); super.onDraw(canvas); Log.e(Media, drawstep 2); if (isPlaying) loadFrame(); Log.e(Media, drawstep 3); } private void loadFrame() { if (isPlaying) { frames.incrementProgressBy(11-playSpeed); if (frame == duration) { isPlaying = false; frame = 0; frames.setProgress(0); frames.setEnabled(true); speed.setEnabled(true); play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play)); } pict.recycle(); mBitmap.recycle(); pict = retrieve.getFrameAtTime(frame); mBitmap = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(),pict.getHeight(), matrix, true); Log.e(Media, load Frame + frame + (+ (11-playSpeed) +) + pict.getWidth() + x + pict.getHeight() ); Log.e(Media, load Framestep 1 ); super.setImageBitmap(mBitmap); Log.e(Media, load Framestep 2 ); super.invalidate(); Log.e(Media, load Framestep 3 ); } } frame get inremented in steps of 10 , thus pict = retrieve.getFrameAtTime(frame); loads every 10 frames mBitmap as you can see is set to update the super.setImageBitmap() resulting in the following logcat 11-13 15:47:52.605: E/Video Media(4647): on Draw Called 11-13 15:47:52.615: E/Media(4647): drawstep 2 11-13 15:47:52.915: E/Media(4647): load Frame2450(10) 1280 x 720 11-13 15:47:52.915: E/Media(4647): load Framestep 1 11-13 15:47:52.915: E/Media(4647): load Framestep 2 11-13 15:47:52.915: E/Media(4647): load Framestep 3 11-13 15:47:52.915: E/Media(4647): drawstep 3 11-13 15:47:52.935: E/Video Media(4647): on Draw Called 11-13 15:47:52.945: E/Media(4647): drawstep 2 11-13 15:47:53.255: E/Media(4647): load Frame2460(10) 1280 x 720 11-13 15:47:53.255: E/Media(4647): load Framestep 1 11-13 15:47:53.255: E/Media(4647): load Framestep 2 11-13 15:47:53.255: E/Media(4647): load Framestep 3 11-13 15:47:53.255: E/Media(4647): drawstep 3 11-13 15:47:53.275: E/Video Media(4647): on Draw Called 11-13 15:47:53.285: E/Media(4647): drawstep 2 11-13 15:47:53.585: E/Media(4647): load Frame2470(10) 1280 x 720 11-13 15:47:53.585: E/Media(4647): load Framestep 1 11-13 15:47:53.585: E/Media(4647): load Framestep 2 11-13 15:47:53.585: E/Media(4647): load Framestep 3 11-13 15:47:53.585: E/Media(4647): drawstep 3 11-13 15:47:53.605: E/Video Media(4647): on Draw Called 11-13 15:47:53.615: E/Media(4647): drawstep 2 11-13 15:47:53.925: E/Media(4647): load Frame2480(10) 1280 x 720 11-13 15:47:53.925: E/Media(4647): load Framestep 1 11-13 15:47:53.925: E/Media(4647): load Framestep 2 11-13 15:47:53.925: E/Media(4647): load Framestep 3 11-13 15:47:53.925: E/Media(4647): drawstep 3 11-13 15:47:53.945: E/Video Media(4647): on Draw Called 11-13 15:47:53.955: E/Media(4647): drawstep 2 11-13 15:47:54.255: E/Media(4647): load Frame2490(10) 1280 x 720 11-13 15:47:54.255: E/Media(4647): load Framestep 1 11-13 15:47:54.255: E/Media(4647): load Framestep 2 11-13 15:47:54.255: E/Media(4647): load Framestep 3 11-13 15:47:54.255: E/Media(4647): drawstep 3 11-13 15:47:54.285: E/Video Media(4647): on Draw Called 11-13 15:47:54.295: E/Media(4647): drawstep 2 11-13 15:47:54.595: E/Media(4647): load Frame2500(10) 1280 x 720 11-13 15:47:54.595: E/Media(4647): load Framestep 1 11-13 15:47:54.595: E/Media(4647): load Framestep 2 11-13 15:47:54.595: E/Media(4647): load Framestep 3 11-13 15:47:54.595: E/Media(4647): drawstep 3 11-13 15:47:54.615: E/Video Media(4647): on Draw Called 11-13 15:47:54.625: E/Media(4647): drawstep 2 11-13 15:47:54.925: E/Media(4647): load Frame2510(10) 1280 x 720 11-13 15:47:54.925: E/Media(4647): load Framestep 1 11-13 15:47:54.925: E/Media(4647): load Framestep 2 11-13 15:47:54.925: E/Media(4647): load Framestep 3 11-13 15:47:54.925: E/Media(4647): drawstep 3 11-13 15:47:54.945: E/Video Media(4647): on Draw Called 11-13 15:47:54.955: E/Media(4647): drawstep 2 11-13 15:47:55.255: E/Media(4647): load Frame2520(10) 1280 x 720 11-13 15:47:55.255: E/Media(4647): load Framestep 1 11-13 15:47:55.265: E/Media(4647): load Framestep 2 11-13 15:47:55.265: E/Media(4647): load Framestep 3 11-13 15:47:55.265: E/Media(4647): drawstep 3 11-13 15:47:55.275: E/Video Media(4647): on Draw Called 11-13 15:47:55.285: E/Media(4647): drawstep 2 11-13 15:47:55.595: E/Media(4647): load Frame2530(10) 1280 x 720 11-13 15:47:55.595:
Re: [android-developers] MediaMetadataRetriever does this work ?
No matter what value is passed to pict = retrieve.getFrameAtTime(frame); You always have the first frame never anything else ? Why ? On 11/13/2011 04:04 PM, New Developer wrote: Called from a class that implements ImageView @Override protected void onDraw(Canvas canvas) { Log.e(Video Media , on Draw Called); super.onDraw(canvas); Log.e(Media, drawstep 2); if (isPlaying) loadFrame(); Log.e(Media, drawstep 3); } private void loadFrame() { if (isPlaying) { frames.incrementProgressBy(11-playSpeed); if (frame == duration) { isPlaying = false; frame = 0; frames.setProgress(0); frames.setEnabled(true); speed.setEnabled(true); play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play)); } pict.recycle(); mBitmap.recycle(); pict = retrieve.getFrameAtTime(frame); mBitmap = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(),pict.getHeight(), matrix, true); Log.e(Media, load Frame + frame + (+ (11-playSpeed) +) + pict.getWidth() + x + pict.getHeight() ); Log.e(Media, load Framestep 1 ); super.setImageBitmap(mBitmap); Log.e(Media, load Framestep 2 ); super.invalidate(); Log.e(Media, load Framestep 3 ); } } frame get inremented in steps of 10 , thus pict = retrieve.getFrameAtTime(frame); loads every 10 frames mBitmap as you can see is set to update the super.setImageBitmap() resulting in the following logcat 11-13 15:47:52.605: E/Video Media(4647): on Draw Called 11-13 15:47:52.615: E/Media(4647): drawstep 2 11-13 15:47:52.915: E/Media(4647): load Frame2450 (10)1280 x 720 11-13 15:47:52.915: E/Media(4647): load Framestep 1 11-13 15:47:52.915: E/Media(4647): load Framestep 2 11-13 15:47:52.915: E/Media(4647): load Framestep 3 11-13 15:47:52.915: E/Media(4647): drawstep 3 11-13 15:47:52.935: E/Video Media(4647): on Draw Called 11-13 15:47:52.945: E/Media(4647): drawstep 2 11-13 15:47:53.255: E/Media(4647): load Frame2460 (10)1280 x 720 11-13 15:47:53.255: E/Media(4647): load Framestep 1 11-13 15:47:53.255: E/Media(4647): load Framestep 2 11-13 15:47:53.255: E/Media(4647): load Framestep 3 11-13 15:47:53.255: E/Media(4647): drawstep 3 11-13 15:47:53.275: E/Video Media(4647): on Draw Called 11-13 15:47:53.285: E/Media(4647): drawstep 2 11-13 15:47:53.585: E/Media(4647): load Frame2470 (10)1280 x 720 11-13 15:47:53.585: E/Media(4647): load Framestep 1 11-13 15:47:53.585: E/Media(4647): load Framestep 2 11-13 15:47:53.585: E/Media(4647): load Framestep 3 11-13 15:47:53.585: E/Media(4647): drawstep 3 11-13 15:47:53.605: E/Video Media(4647): on Draw Called 11-13 15:47:53.615: E/Media(4647): drawstep 2 11-13 15:47:53.925: E/Media(4647): load Frame2480 (10)1280 x 720 11-13 15:47:53.925: E/Media(4647): load Framestep 1 11-13 15:47:53.925: E/Media(4647): load Framestep 2 11-13 15:47:53.925: E/Media(4647): load Framestep 3 11-13 15:47:53.925: E/Media(4647): drawstep 3 11-13 15:47:53.945: E/Video Media(4647): on Draw Called 11-13 15:47:53.955: E/Media(4647): drawstep 2 11-13 15:47:54.255: E/Media(4647): load Frame2490 (10)1280 x 720 11-13 15:47:54.255: E/Media(4647): load Framestep 1 11-13 15:47:54.255: E/Media(4647): load Framestep 2 11-13 15:47:54.255: E/Media(4647): load Framestep 3 11-13 15:47:54.255: E/Media(4647): drawstep 3 11-13 15:47:54.285: E/Video Media(4647): on Draw Called 11-13 15:47:54.295: E/Media(4647): drawstep 2 11-13 15:47:54.595: E/Media(4647): load Frame2500 (10)1280 x 720 11-13 15:47:54.595: E/Media(4647): load Framestep 1 11-13 15:47:54.595: E/Media(4647): load Framestep 2 11-13 15:47:54.595: E/Media(4647): load Framestep 3 11-13 15:47:54.595: E/Media(4647): drawstep 3 11-13 15:47:54.615: E/Video Media(4647): on Draw Called 11-13 15:47:54.625: E/Media(4647): drawstep 2 11-13 15:47:54.925: E/Media(4647): load Frame2510 (10)1280 x 720 11-13 15:47:54.925: E/Media(4647): load Framestep 1 11-13 15:47:54.925: E/Media(4647): load Framestep 2 11-13 15:47:54.925: E/Media(4647): load Framestep 3 11-13 15:47:54.925: E/Media(4647): drawstep 3 11-13 15:47:54.945: E/Video Media(4647): on Draw Called 11-13 15:47:54.955: E/Media(4647): drawstep 2 11-13 15:47:55.255: E/Media(4647): load Frame2520 (10)1280 x 720 11-13 15:47:55.255: E/Media(4647): load Framestep 1 11-13 15:47:55.265: E/Media(4647): load Framestep 2 11-13 15:47:55.265: E/Media(4647): load Framestep 3 11-13 15:47:55.265: E/Media(4647): drawstep 3 11-13 15:47:55.275: E
[android-developers] FingerPaint eraser
Hi All I'm trying to expand the concept of the Finger Paint Example I have where I can draw with the finger and a line is left I thought, if I just change the paint Color from 0x which is red to 0x which is Transparent it would erase ? No Joy Any ideas on how I can set up the Paint (or whatever) to be able to act like an eraser and erase parts of the Path that has just been drawn ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CompressFormat
Hi When using Bitmap.CompressFormat.JPEG and .PNG What exactly is the compression technique/method(s) used I'm trying to relate CompressFormat.JPEG and .PNGwith thier corresponding PDF /FilterDCTDecode or ASCII85HexDecode or what ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Xoom HTK75D Update
Ever since the Xoom HTK75D update When I run my app, and it uses an Intent to call another app like Calendar , Camera , qPDF etc... But now it does not It simply holds , no error messages Any reasons why, there is nothing in the log and the system just sits there. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extracting RGB data from Bitmap
Curious ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.JPEG, 100 , bos); bos.toString(); and also ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.PNG, 100 , bos); bos.toString(); the string result from bos.toString(); is this the raw or encoded version of the image ? I would guess encode because bos.size() is much less than bmp.getWidth() * bmp.getHeight(). So my question then is what is the encoding method used ? and to which PDF filter do they correspond ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Force the whole main activity to redraw
If I recall correctly from some of the Google I/O presentations they talked about a box going dirty and then flushing up that it needs to be redrawn and thus everything gets redrawn. How can you trigger this? I have an activity which has my own media class which extends ImageView with some special functions. I use this to play a video frame by frame using MediaMetadataRetrieve The problem is that it only shows the first frame even though the code does step through and collect multiple frames and bitmaps and places them on the ImageView. The code, does but visually only the first frame ever shows. Show How can I force the whole Activity to redraw . thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Extracting RGB data from Bitmap
Thanks gjs I'll try those forums Thanks On 09/30/2011 01:24 AM, gjs wrote: Hi, Hmm, otherwise you can examine a working PDF with picture in a hex/ binary editor try to guess the encoding / formatting. You might also ask in one of the PDF forums - http://forum.planetpdf.com/ http://itextpdf.com/index.php BTW iText also has an Android PDF library, but I have not tried it myself. Regards On Sep 29, 11:50 pm, New Developersecur...@isscp.com wrote: Anyone know how to get PDF specification support ? I have generated a PDF but the text shows (or works) the Images do not attached is the PDF I have read the specs. but can not see what I have missed ? Thanks in advance On 09/27/2011 08:05 AM, New Developer wrote: gjs Thanks I had read the 1.6 specs that is how I managed to generate what I have now, It completes and the PDF can be seen, but NO picture is in there. The text I have put in the PDF is visible. However, the picture is not ?? Thanks again On 09/27/2011 03:55 AM, gjs wrote: Hi Read the PDF spec to see what sort of binary encoding is required for the image data. Regards On Sep 27, 8:10 am, New Developersecur...@isscp.comwrote: Trying to add an Image to PDF Can anyone Please let me know where I have gone wrong ? Currently this is what I generate using bmp ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.JPEG, 100 , bos); stream \n + bos.toString() + \n + endstream \n + 101 0 obj /Type /XObject /Subtype /Image /Filter /DCTDecode /Width 341 /Height 256 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length 87296 stream ^@^PJFIF^@^A^A^@^@^A^@^A^@^@??^@C^@^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A ^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^ A^A^A^A$ ^K??^@?^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^Gq^T2??? ^H#B??^UR??$3br? ?QU,?qXy?p??H??kz,??$ endstream endobj 102 0 obj /Type /Page /Parent 1 0 R /MediaBox [0 0 341 256] /Contents 103 0 R /Resources 105 0 R endobj 104 0 obj /Length 105 0 R stream q 1 0 0 1 100 100 cm 341 0 0 256 cm /I103 Do Q endstream endobj 105 0 obj 64 endobj 106 0 obj ProcSet [/PDF /ImageC] /XObjectI106 0 R endobj xref 0 6 00 65535 f 10 0 n 65 0 n 000156 0 n 000367 0 n 001015 0 n trailer /Size 5 /Root 1 0 R startxref 78802 %%EOF -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en History-September, 29 2011 09:27:00.pdf 110KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extracting RGB data from Bitmap
gjs Thanks I had read the 1.6 specs that is how I managed to generate what I have now, It completes and the PDF can be seen, but NO picture is in there. The text I have put in the PDF is visible. However, the picture is not ?? Thanks again On 09/27/2011 03:55 AM, gjs wrote: Hi Read the PDF spec to see what sort of binary encoding is required for the image data. Regards On Sep 27, 8:10 am, New Developersecur...@isscp.com wrote: Trying to add an Image to PDF Can anyone Please let me know where I have gone wrong ? Currently this is what I generate using bmp ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.JPEG, 100 , bos); stream \n + bos.toString() + \n + endstream \n + 101 0 obj /Type /XObject /Subtype /Image /Filter /DCTDecode /Width 341 /Height 256 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length 87296 stream ^@^PJFIF^@^A^A^@^@^A^@^A^@^@??^@C^@^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A ^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^ A^A^A^A$ ^K??^@?^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^Gq^T2??? ^H#B??^UR??$3br? ?QU,?qXy?p??H??kz,??$ endstream endobj 102 0 obj /Type /Page /Parent 1 0 R /MediaBox [0 0 341 256] /Contents 103 0 R /Resources 105 0 R endobj 104 0 obj /Length 105 0 R stream q 1 0 0 1 100 100 cm 341 0 0 256 cm /I103 Do Q endstream endobj 105 0 obj 64 endobj 106 0 obj ProcSet [/PDF /ImageC] /XObjectI106 0 R endobj xref 0 6 00 65535 f 10 0 n 65 0 n 000156 0 n 000367 0 n 001015 0 n trailer /Size 5 /Root 1 0 R startxref 78802 %%EOF -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AutoCompleteTextView Cursor messing up
Hi I have an AutoCompleteTextView which uses a CursorAdapter to read entries from the database Funny thing is If I type d I get the list (dam , dog , drain , duck) which is correct then if I type r (to now have dr) I should get drainbut the drop down still shows damthe first entry from d yet If I select this first drop down entry then the AutocompleteTextView text field shows drain which is correct. Why does the drop down list not show correctly ? I have also noticed that If I have more than 12 entries in the drop down list It shows the first 8 then when I scroll it shows the first 8 again But like above if I select the 14 entry the text field is correct. Thanks In advance Here is the CursorAdapter @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { final LinearLayout ret = new LinearLayout(context); final LayoutInflater inflater = LayoutInflater.from(context); TextView name = (TextView) inflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false); ret.setOrientation(LinearLayout.VERTICAL); int nameCol = cursor.getColumnIndex(DBAdapter.KEY_CLIENT_NAME); name.setText( cursor.getString(nameCol) ); ret.addView(name, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT , LayoutParams.WRAP_CONTENT)); return ret; } @Override public void bindView(View v, Context context, Cursor c) { int nameCol = c.getColumnIndex(DBAdapter.KEY_CLIENT_NAME); String name = c.getString(nameCol); TextView nameText = (TextView) v.findViewById(R.id.invClient); if (nameText != null) { nameText.setText(name); } } @Override public String convertToString(Cursor cur) { int nameCol = cur.getColumnIndex(DBAdapter.KEY_CLIENT_NAME); String name = cur.getString(nameCol); return name; } @Override public Cursor runQueryOnBackgroundThread(CharSequence constraint) { StringBuilder buffer = null; if (constraint != null) { if ( constraint.equals(*) ) { return DataB.getClientList(); } else { buffer = new StringBuilder(); buffer.append(UPPER(name) LIKE '); buffer.append( constraint.toString().toUpperCase() + %' ); return DataB.getClientList(buffer.toString()); } } return DataB.getClientList(); } public Cursor getClientList() { return myDB.query(DATABASE_TABLE_CLIENT, new String[] { KEY_CLIENT_NUMB, KEY_CLIENT_NAME }, null, null, null, null, KEY_CLIENT_NAME); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extracting RGB data from Bitmap
Trying to add an Image to PDF Can anyone Please let me know where I have gone wrong ? Currently this is what I generate using bmp ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.JPEG, 100 , bos); stream \n + bos.toString() + \n + endstream \n + 101 0 obj /Type /XObject /Subtype /Image /Filter /DCTDecode /Width 341 /Height 256 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length 87296 stream ^@^PJFIF^@^A^A^@^@^A^@^A^@^@??^@C^@^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A$ ^K??^@?^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^Gq^T2???^H#B??^UR??$3br? ?QU,?qXy?p??H??kz,??$ endstream endobj 102 0 obj /Type /Page /Parent 1 0 R /MediaBox [0 0 341 256] /Contents 103 0 R /Resources 105 0 R endobj 104 0 obj /Length 105 0 R stream q 1 0 0 1 100 100 cm 341 0 0 256 cm /I103 Do Q endstream endobj 105 0 obj 64 endobj 106 0 obj ProcSet [/PDF /ImageC] /XObject I106 0 R endobj xref 0 6 00 65535 f 10 0 n 65 0 n 000156 0 n 000367 0 n 001015 0 n trailer /Size 5 /Root 1 0 R startxref 78802 %%EOF -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Extracting RGB data from Bitmap
Anyone know how to extract the RGB Data only from a bitmap So that is can be placed into a string and thus create a PDF using the inline images q 17 0 0 17 298 298 cm BI /W 17 /H 17 /CS /RGB /BPC 8 ID here is where just the bitmap data goes something like Jq/gKAJasDS3f%$gdGD%4G453 EI Q etc.. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaMetatdataRetriever Issue
I'm using the following snippet within a class's onCreate that extends ImageView MediaMetadataRetriever retrieve = new MediaMetadataRetriever(); retrieve.setDataSource(name); long Duration = Long.parseLong(retrieve.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)); for (int frame = 0; frame Duration; frame += 300) { parent.removeAllViews(); Bitmap pict = retrieve.getFrameAtTime(frame); Log.e(Media , Video Loading + frame); Matrix matrix = new Matrix(); float scale = 680.0f / pict.getHeight(); matrix.postScale(scale, scale); Bitmap image = Bitmap.createBitmap(pict, 0, 0, pict.getWidth(), pict.getHeight(), matrix, true); layers[1] = new BitmapDrawable(mBitmap); layers[1].setAlpha(255); layers[0] = new BitmapDrawable(image); layers[0].setAlpha(255); LayerDrawable layerDraw = new LayerDrawable(layers); super.setImageDrawable(layerDraw); parent.setBackgroundColor(Color.BLACK); parent.addView(this , new LayoutParams(LayoutParams.FILL_PARENT , LayoutParams.FILL_PARENT)); } Log.e(Media , Video LoadED); What I can't understand is that is runs through the loop fine, but it only shows the first frame ? parent is the FrameLayout within which the ImageView is to be shown . Can anyone shed light on this Thanks in advance ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SqlLite Database
How can one go about creating an SQLLite Database on a PC then to transfer the database file to the tablet's application data directory? I have managed to create a database on a tablet copy it off, and then back on. But Now I would like to be able to create it and then just upload it. Also what are the differences between MySQL files and SqlLite files Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Modules similar to DLLs in android
Hi All Is there a mechanism to create the equivalence of DLLs so that one can create modules. It's not quite an apk, can't be run by itself, it must be called from a main.apk. and this main.apk will scan looking for these modules and based on what is or is not present will then have a certain set of functions and functionality ? just asking 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] Modules similar to DLLs in android
Thanks Michael I'm not sure I'm going to use the Android Market, and I'm guessing I could host the apk (with no activity) on my own site. Do you know of any tutorials (or care to share) how to create a jar file and then link/include it inside an activity ? thanks again On 09/10/2011 08:12 AM, Michael Banzon wrote: I haven't actually tried to see if it's possible - but I suppose you could make an application with no activity for the launcher. The main problem I see is distribution - how do you get users to install the program package from Android Market? I make a few programs that share functionality and I've bundled this in it's own project and include the JAR-file in the projects that need it. On Sat, Sep 10, 2011 at 1:41 PM, New Developersecur...@isscp.com wrote: Hi All Is there a mechanism to create the equivalence of DLLs so that one can create modules. It's not quite an apk, can't be run by itself, it must be called from a main.apk. and this main.apk will scan looking for these modules and based on what is or is not present will then have a certain set of functions and functionality ? just asking 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Xoom Camera Application
Hi I'm trying to call the camera from my application currently I'm using Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); and Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); However when I compare this to the Camera Application from the Xoom/Android home screen there are slight differences. For Example Clicking the camera app from the home screen gives me the option of video or camera , front or back Clicking the camera app from the home screen gives me the option of - and + for zooming none of these appear when I call the camera using the above intents. Any reasons why ? and how can I get the Full camera application 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
[android-developers] Share sqlite database
Can two application share the same sql database ? Currently I have app1 which created and stores data in a database on the tablet. Now I wish to create app2 which will have it's own database but I also would like it to read from app1's database is this possible ?? IF so, what needs to be set up ? thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Share sqlite database
On 08/03/2011 02:22 PM, Abhishek Akhani wrote: you can set the following attribute in your manifest file's manifest tag... || |android:sharedUserId| The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en thanks all not sure I want them in the same process but sharing data and user id yeah. Also I will look more into the content provider I think I can just extend my current DBAdapter to extend ContentProvider -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] autocompleteTextView
I have an autocompleteTextView which is linked to an Adapter that will search though the database and find items in the database based on the few characters entered. However, is there anyway to double tap the TextView or Tap and Hold and have it display the entire database list ? almost like a search for * 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] Update Process
Thanks But how do I update it I check the text file and the apk and text file on the webserver reports that there is a new version What is the process to update it Thanks again On 07/29/2011 01:41 PM, Raghav Sood wrote: You would need to have your apk on a webserver. Somewhere else (on the same server or wherever you feel like) have a text file that has a version number. Have your app retrieve that file and check its own version number against the one in the file. If the files is greater you have a new version to update to. Thanks On Fri, Jul 29, 2011 at 11:05 PM, Security secur...@isscp.com mailto:secur...@isscp.com wrote: Hi Could someone please explain the process to update an apk NOT using the Android Market , I wish to use my own (guessing web server) 1) Is it a web server that I place my apk on ? 2) How do I trigger the app to check for a new(er) version? generic process is fine / or code 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Appaholics -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Film Use of Android Device
could you please give me more of a help my knowledge and use of adb is weak Thanks in advance On Jul 25, 2011, at 11:23 PM, Kevin TeslaCoil Software wrote: The adb user also has access to /dev/graphics/fb0 so theoretically you could do this with a shell script over adb instead of rooting the device. On Jul 25, 5:47 pm, lbendlin l...@bendlin.us wrote: If you have a rooted phone and a large SD card you could run a background service that grabs the /dev/graphics/fb0 raw images and stores them for later conversion. Or you convert it on the fly to png - but that might stretch it already. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] zip Problems
Hi All I use the following code to Zip a file BufferedInputStream origin = null; FileOutputStreamdest = new FileOutputStream(/sdcard/tmp.zip); ZipOutputStream out= new ZipOutputStream(new BufferedOutputStream(dest)); byte data[] = new byte[2048]; FileInputStream fi = new FileInputStream(file); origin = new BufferedInputStream(fi , 2048); ZipEntryentry = new ZipEntry(file.getName().substring(file.getName().lastIndexOf(/) + 1)); out.putNextEntry(entry); int count; while ((count = origin.read(data, 0, 2048)) != -1) { out.write(data, 0, count); } out.closeEntry(); origin.close(); out.close(); However when I use this code to Unzip the file FileInputStream fis = new FileInputStream(/sdcard/tmp.zip); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { intsize; byte[] buffer = new byte[2048]; FileOutputStream fos = new FileOutputStream(entry.getName()); BufferedOutputStream bos = new BufferedOutputStream(fos, buffer.length); while ((size = zis.read(buffer, 0, buffer.length)) != -1) { bos.write(buffer, 0, size); } bos.flush(); bos.close(); It crashes on the entry = zis.getNextEntry() java.io.EOFException at libcore.io.Streams.readFully(Streams.java:49) at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:269) at org.TransferActivity.SaveFile(TransferActivity.java:130) at org.TransferActivity.RecvFiles(TransferActivity.java:204) at org.TransferActivity.access$1(TransferActivity.java:175) at org.TransferActivity$ClickListener.onClick(TransferActivity.java:67) at android.view.View.performClick(View.java:3110) at android.view.View$PerformClick.run(View.java:11934) Can anyone please help with this?? 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] zip Problems
Yes I have checked the output it appears correct and is the same on both ends On Jul 25, 2011, at 2:05 PM, TreKing wrote: On Mon, Jul 25, 2011 at 12:09 PM, New Developer secur...@isscp.com wrote: Can anyone please help with this?? This has nothing to do with Android development, but are you verifying the output is correct? - 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] Film Use of Android Device
This MAY be OFF TOPIC Eclipse has a snapshot this allows you to take a JPG / screenshot of your Android Device . Is there any way to make a video of the use of a tablet, using a DDMS video as opposed to DDMS screenshot ? Thanks SORRY if this is TOO off topic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en