[android-developers] adding media controoler in audio
Hi everybody, can someone tell me how to add media controller in audio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] adding media controoler in audio
Hi Sadhna As you can see. VideoView video = (VideoView)findViewById(R.id.videoview_id); video.setMediaController(new MediaController(this)); Best Regards, 2012/7/5 Sadhna Upadhyay sadhna.braah...@gmail.com: Hi everybody, can someone tell me how to add media controller in audio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: inject long home key press
Check this link out: http://qatesttech.wordpress.com/2012/06/20/adb-shell-sendevent-sending-touch-like-events/ On Friday, April 17, 2009 4:23:45 PM UTC+5:30, klausfpga wrote: Hi Dianna, Thanks for your reply. In fact my problems are in fact even more basic. The command 'sendevent' requires following parameters device type code value How do I have to specify all these parameters. Let's take for example the emulator and let's assume I'd like to press the 'down' key My questions are: device: is this the device string, that I can find with cat /proc/bus/ input/devices type: what is this? code: what is this? value: I assume this is what I could find in the *.kl files, that you mentioed. In order to bother you and the forums less with this kind of questions I would be glad to be pointed to the adequate documentation explaining how sendevent is working and what the parameters of sendevent mean. thanks in advance K On Apr 16, 6:34 pm, Dianne Hackborn hack...@android.com wrote: The codes you send through the driver are the raw events, before they have been translated to Android key codes, so it depends on your hardware. You'll want to look at the source code of whatever build you are using -- there will be a *.kl file somewhere mapping from the driver codes to android codes. On Thu, Apr 16, 2009 at 8:54 AM, a druid klausf...@gmail.com wrote: Hi searup. I have one more question. As a newbie I have still the basic problem of locating the document ation, that I need for some tasks. Which document(s) / url list(s) the possible devices / types / key- codes key-values ? thanks a lot in advance. On Apr 16, 2:46 pm, swarup me.s...@gmail.com wrote: try $ adb shell sendevent device type key-code value-press ; adb shell sleep 1 #seconds; adb shell sendevent device type key-code value-release above is for 1 second long press On Apr 14, 11:46 pm, Dan Raaka danra...@gmail.com wrote: I am using this a work-around for the non-working home key in the 1.0 or 1.1 emulator. If there is fix for it. That would work for me as well. On Apr 14, 11:23 am, Dan Raaka danra...@gmail.com wrote: Is there a keycode to inject long home key press into a device via adb like below ? $ adb shell input keyevent 7# for key '0' -Dan -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: adk 2012 / usb accessory not connecting
This isn't the right place for ADK discussion, but as far as I can tell, there is no place set aside for it! I killed a lot of today trying to get the 2012 ADK to work and was mostly frustrated. I'm on a Mac and I found the IDE installation instructions very much do not work and I could not manipulate it into building and flashing a working image at all. On the command line, I had to jump through hurdles to get the clock demo to build and deploy. In the end, I could not get recommended bossac downloaded from sourceforge to work at all. Eventually I had to bypass the given scripts and reached into the Mac IDE app package to use its bossac to deploy a working image. All things considered, I'm very disappointed in the usability of the tools that were provided for the 2012 ADK (at least for macosx) and I wish I knew where to go to remedy this. Otherwise I pretty much give up now. Doug On Saturday, June 30, 2012 12:28:31 PM UTC-7, michael wrote: Testing the new adk2012 and having a few issues. I have uploaded the usbaccessory sketch, and installed the adk2012 app to the nexus 7. Then I connect the adk nexus with usb, expecting the adk2012 app to be recognized as an appropriate usbaccessory, but it doesn't and nexus reports Connected as a media device USB debugging connected Connected to a USB accessory Another question, how can I run adb from my android device while it is simultaneously connected to my arduino kit? I was optimistic that it would channel through the arduino and proxy to my pc, but that clearly isn't happening :) ... ADB over bluetooth? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Call the functions of *.SO from JAVA
Hi chainz #put .so file. eclipse project/libs/armeabi/xxx.so #add code private native void [method name](args..); static { System.loadLibrary(so file name); } Best Regards, 2012/7/5 chainz roid sangilikumar.muniya...@marudham.co.in: Hi everyone I'm working in ICS and I'm developing own android device. Well i have vcfsclint.so file its contains more functions.(Ex. EnrollUser, IdentifUser etc,..) I want to call this functions from my java application. Regarding this where i have to add this .SO file and how can i call those function from my java application any one can suggest me.? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to display static google map on android imageview?
Hi All, I am new in android, I dont know how to display static google map on an imageview. Something similar to Whatsapp showing while share the location. How can I do this? From googly document i came to know that we need to pass the Url in image view. Please share the code to pass the Url in Imge view String latEiffelTower = 48.858235; String lngEiffelTower = 2.294571; String url = http://maps.google.com/maps/api/staticmap?center=; + latEiffelTower + , + lngEiffelTower + zoom=15size=200x200sensor=false Thanks Remo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to get size of FrameLayout in my app?
Dear hktsang Size of the View can be obtained with onWindowFocusChanged Thanks 2012/7/5 hktsang hktsan...@gmail.com: Dear all, I've a problem by getting the width of FrameLayout in my app. when I use fl.getWidth(); {fl is already assign to FrameLayout} the result is 0. Can anyone teach me something about that? Thanks, HK Tsang -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Call the functions of *.SO from JAVA
using java native interface,we can call the function in c or c++. On Thu, Jul 5, 2012 at 12:12 PM, HideCheck hidech...@gmail.com wrote: Hi chainz #put .so file. eclipse project/libs/armeabi/xxx.so #add code private native void [method name](args..); static { System.loadLibrary(so file name); } Best Regards, 2012/7/5 chainz roid sangilikumar.muniya...@marudham.co.in: Hi everyone I'm working in ICS and I'm developing own android device. Well i have vcfsclint.so file its contains more functions.(Ex. EnrollUser, IdentifUser etc,..) I want to call this functions from my java application. Regarding this where i have to add this .SO file and how can i call those function from my java application any one can suggest me.? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Showing a confirm dialog from the PreferenceAcivity
Thank you for your reply. However, this does not answer the main problem, which is - how to show a dialogfragment from a PreferenceActivity, which is not a fragment based activity ! On Wednesday, 4 July 2012 19:40:12 UTC+2, svins wrote: sorry, an On 4 July 2012 19:39, Gergely Juhász wrote: Here is any example about showing an alert with dialog fragment. http://developer.android.com/reference/android/app/DialogFragment.html (Alert Dialog section) On 4 July 2012 19:36, Simon Giddings wrote: Within my preferences I give the user control over my image cache, including the ability to empty the cache. However, I want the user to confirm the emptying of the cache (to avoid mistakes). We are supposed to use dialog fragments now instead of dialog builders as these are depreciated (as far as I understand). How can I then show a confirmation dialog in this case ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to change background of an overflow menuitem
ok, i found a solution for my problem: link to a post in the ActionBarSherlock google group ok, i found a solution for my problem: [link to a post in the ActionBarSherlock google group][1] i've overseen this entry: `android:actionBarWidgetTheme` in the `Theme.Holo.Light.DarkActionBar` theme. now all i had to do is define a theme that overrides `Theme.Holo` with one style in it: `item name=android:dropDownListViewStyle@style/myDropDownListView/item` and point to this theme instead. !-- theme referenced by actionBarWidgetTehme style -- style name=Theme.DropDown.Dark parent=android:style/Theme.Holo item name=android:dropDownListViewStyle@style/myDropDownListView/item /style !-- my main theme -- style name=DarkActionBarRedActionMode parent=android:style/Theme.Holo.Light.DarkActionBar item name=android:actionBarWidgetTheme@style/Theme.DropDown.Dark/item /style [1]: https://groups.google.com/forum/?fromgroups#!msg/actionbarsherlock/AxB6shftiK0/HbvsrBgMpsoJ i've overseen this entry: android:actionBarWidgetTheme in the Theme.Holo.Light.DarkActionBar theme. now all i had to do is define a theme that overrides Theme.Holo with one style in it: item name=android:dropDownListViewStyle@style/myDropDownListView/item and point to this theme instead. !-- theme referenced by actionBarWidgetTehme style -- style name=Theme.DropDown.Dark parent=android:style/Theme.Holo item name=android:dropDownListViewStyle@style/myDropDownListView/item /style !-- my main theme -- style name=DarkActionBarRedActionMode parent=android:style/Theme.Holo.Light.DarkActionBar item name=android:actionBarWidgetTheme@style/Theme.DropDown.Dark/item /style -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Way to promote android apps.
Try AppBrain Android App Promotion: http://www.appbrain.com/info/advertise It is based on Cost Per Install, so you only pay for an install of your app, not for clicks. On Thursday, June 21, 2012 8:37:33 PM UTC+2, nikunj wrote: Hi All, We are fairly new to app development and see that apps get lost the moment they enter the google play market.With major players controlling the app market and its next to impossible for small/new developers like us to even get a few downloads. Admobs is one way of doing it, but its quite costly. The return are not justified. Here is the link to my app. https://play.google.com/store/apps/details?id=com.gameadu.sanelane Can anyone suggest some ways to do so? Any feedback/reviews are welcome. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Find technology used for an app
You can find a list of the most popular Android libraries here: http://www.appbrain.com/stats/libraries/dev It is sorted by usage and also shows example apps which use these libraries. On Monday, June 25, 2012 8:13:00 AM UTC+2, symet wrote: Hello Everybody, I am a newbie to app development so pardon my stupid question. I was wondering if there is a way to find what technology(development language, database, server) does an app uses. Thanks a lot. Cheers, symet -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Android Text To Speech
On 04/07/2012 10:20, Deepa M wrote: Sir,how to 1. generate the wav file and use the MediaPlayer Did you read these pages ? http://developer.android.com/reference/android/speech/tts/TextToSpeech.html http://developer.android.com/reference/android/media/MediaPlayer.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] adding media controoler in audio
Hi, but i dont want to use video On Thu, Jul 5, 2012 at 11:59 AM, HideCheck hidech...@gmail.com wrote: Hi Sadhna As you can see. VideoView video = (VideoView)findViewById(R.id.videoview_id); video.setMediaController(new MediaController(this)); Best Regards, 2012/7/5 Sadhna Upadhyay sadhna.braah...@gmail.com: Hi everybody, can someone tell me how to add media controller in audio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error loading classes from dexified bundles (OSGi Knopflerfish on Android 2.3.7)
Hello all, I'm currently working on a project in a part of which I need to port Knopflerfish OSGi framework to android and run some bundles in it. Some of the bundles work just fine, they're installed, active and working. Some others, however, are installed and active but fail to work properly due to a java.io.IOException ! For instance, whenever I try starting the Felix UPnP basedriver bundle I get the following error: [stderr] ## DEBUG: errors - FrameworkErrorEvent bundle #42 [stderr] ## DEBUG: errors - FrameworkErrorEvent throwable: [stderr] java.io.IOException: Failed to load dex class 'org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPIconImpl', java.lang.reflect.InvocationTargetException [stderr] at org.knopflerfish.framework.BundleClassLoader$1.get(BundleClassLoader.java:891) [stderr] at org.knopflerfish.framework.BundleClassLoader.searchFor0(BundleClassLoader.java:808) [stderr] at org.knopflerfish.framework.BundleClassLoader.searchFor(BundleClassLoader.java:635) [stderr] at org.knopflerfish.framework.PermissionOps.callSearchFor(PermissionOps.java:213) [stderr] at org.knopflerfish.framework.BundleClassLoader.findClass(BundleClassLoader.java:213) [stderr] at org.knopflerfish.framework.BundleClassLoader.loadClass(BundleClassLoader.java:349) [stderr] at java.lang.ClassLoader.loadClass(ClassLoader.java:511) [stderr] at org.apache.felix.upnp.basedriver.importer.util.DeviceSetup.deviceSetup(DeviceSetup.java:109) [stderr] at org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPDeviceImpl.init(UPnPDeviceImpl.java:57) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.registerUPnPDevice(MyCtrlPoint.java:336) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.doDeviceRegistration(MyCtrlPoint.java:846) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.deviceSearchResponseReceived(MyCtrlPoint.java:448) [stderr] at org.cybergarage.upnp.ControlPoint.performSearchResponseListener(ControlPoint.java:464) [stderr] at org.cybergarage.upnp.ControlPoint.searchResponseReceived(ControlPoint.java:530) [stderr] at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.run(SSDPSearchResponseSocket.java:79) [stderr] at java.lang.Thread.run(Thread.java:1019) [stderr] java.lang.NoClassDefFoundError: org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPIconImpl [stderr] at org.apache.felix.upnp.basedriver.importer.util.DeviceSetup.deviceSetup(DeviceSetup.java:109) [stderr] at org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPDeviceImpl.init(UPnPDeviceImpl.java:57) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.registerUPnPDevice(MyCtrlPoint.java:336) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.doDeviceRegistration(MyCtrlPoint.java:846) [stderr] at org.apache.felix.upnp.basedriver.importer.core.MyCtrlPoint.deviceSearchResponseReceived(MyCtrlPoint.java:448) [stderr] at org.cybergarage.upnp.ControlPoint.performSearchResponseListener(ControlPoint.java:464) [stderr] at org.cybergarage.upnp.ControlPoint.searchResponseReceived(ControlPoint.java:530) [stderr] at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.run(SSDPSearchResponseSocket.java:79) [stderr] at java.lang.Thread.run(Thread.java:1019) Caused by: [stderr] [stderr] java.lang.ClassNotFoundException: org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPIconImpl [stderr] at org.knopflerfish.framework.BundleClassLoader.findClass(BundleClassLoader.java:235) [stderr] at org.knopflerfish.framework.BundleClassLoader.loadClass(BundleClassLoader.java:349) [stderr] at java.lang.ClassLoader.loadClass(ClassLoader.java:511) [stderr] ... 9 more [stderr] ## DEBUG: errors - FrameworkErrorEvent bundle #42 [stderr] ## DEBUG: errors - FrameworkErrorEvent throwable: [stderr] java.io.IOException: Failed to load dex class 'org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPActionImpl', java.lang.reflect.InvocationTargetException [stderr] at org.knopflerfish.framework.BundleClassLoader$1.get(BundleClassLoader.java:891) [stderr] at org.knopflerfish.framework.BundleClassLoader.searchFor0(BundleClassLoader.java:808) [stderr] at org.knopflerfish.framework.BundleClassLoader.searchFor(BundleClassLoader.java:635) [stderr] at org.knopflerfish.framework.PermissionOps.callSearchFor(PermissionOps.java:213) [stderr] at org.knopflerfish.framework.BundleClassLoader.findClass(BundleClassLoader.java:213) [stderr] at org.knopflerfish.framework.BundleClassLoader.loadClass(BundleClassLoader.java:349) [stderr] at java.lang.ClassLoader.loadClass(ClassLoader.java:511) [stderr] at org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPServiceImpl.init(UPnPServiceImpl.java:54) [stderr] at org.apache.felix.upnp.basedriver.importer.util.DeviceSetup.deviceSetup(DeviceSetup.java:125) [stderr]
Re: [android-developers] Distributing an Android service as a jar
Hi, I hope everything went fine on that one. I am also doing something on similar lines. I have a wrapper android application which uses an android jar for communication. There is a functionality in wrapper app to exit itself. I need to stop the service and end stop activity too in the wrapper app too. I have my service returning START_REDELIVER_INTENT so that it is kept alive. Any hints how you can kill your whole application including wrapper and jar application. Thanks in advance. On Friday, October 29, 2010 2:14:05 AM UTC+5:30, Kostya Vasilyev wrote: You can distribute the code, but you can't include Android-specific manifest declarations in a .jar. If you're making code for others to use as a service, you can: - Distribute the code in a .jar; - Provide clear instructions on how to declare your code in the manifest as a service (the service tag itself, and possibly any necessary permissions). -- Kostya 29.10.2010 0:26, Karthik пишет: Hello- Is it possible to distribute an Android service as a jar? Any documentation available on how to do this and any gotchas? Thanks. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] slow. just a big complaint.
this post is just a big complaint and a little bit doubt about why they can't make android better. i'm using mac book pro and eclipse. by the way, android software emulator is really slow. it's the level of violent. surely i pitched with many options. but it seems the android team gave up making better. or they want developers to use bunch of real devices for testing every screen resolution. or it's originally mistake of choosing the java. look. now it is still really slow. and very inconvenient to use c language with jni. or sometimes it's impossible. and look. patent issue with oracle. and look. various android versions and hardwares. what is it. WHAT THE HELL IS IT. i have been developing with android for more than 4 years. android is still being a big burden to me. i'm just using because of customer. this is the only reason. honestly, i hope there will be only two platforms. apple and wm8. i believe it's the salvation for most mobile developers including game developers and companies. now android looks like irresponsible baby making factory. as a result, i think google should not have acquired the android. but please don't misunderstand. i still love google. only excepting android. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] NDK, encoding to JPEG
With NDK, how to encode an int[] array of RGBA pixels into JPEG file? I read about the libjpeg, etc. but I cannot find any out of be box solution. does the NDK have any api to encode JPEG files? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Week of calender view
Hi All, I have made calendar view ,now I have to make with week selection view can any one help me for this. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issues extending ListView in Android
Hello Blake, Thank you for your reply! I really appreciate it. It looks like I didn't give enough details on my problem, so here is some more information. As I already mentioned, we have the following inheritance chain: CustomListView - ListView - AbsListView - AdapterViewT - ViewGroup - ... In my CustomListView class I've overrode protected void layoutChildren() {...}. From that overridden method I'm calling super.layoutChildren(). After that there is a chain of internal calls within ListView class: layoutChildren() - fillFromTop() - fillDown() - makeAndAddView() - obtainView() obtainView() method is defined in AbsListView class and has a default access modifier, thus I have NO ability to override it, as my CustomListView class belongs to the different package. As a result, I can only hide it, if I'll define obtainView() method with the same signature. The thing is that my method SHOULD NOT be called from makeAndAddView() method of the ListView class, obtainView() which belongs to the AbsListView class should be utilized instead. But my tests show that obtainView() from my CustomListView class is called, which is not correct. If I do not define obtainView(), call chain looks as follows: ... - makeAndAddView() - obtainView() - setupChild() - attachViewToParent() OR addViewInLayout() Both attachViewToParent() and addViewInLayout() are defined in the ViewGroup class and have protected access modifiers, thus I SHOULD have an ability to override them. BUT if I define this methods in my CustomListView class, attachViewToParent() or addViewInLayout() of the ViewGroup class are called instead, which is also incorrect. Here are the sources of: ListView.java - http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/widget/ListView.java/?v=source AbsListView.java - http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/widget/AbsListView.java/?v=source ViewGroup.java - http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/view/ViewGroup.java/?v=source I would really appreciate the insight of such guru as you. Thank you again for you time! Have a nice day! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Showing a confirm dialog from the PreferenceAcivity
DialogPreference, and Dialogs in general, work just fine on Android 3.* and 4.* And if you're asking about the compat library, AFAIK, ActionBarSherlock has a PreferenceActivity reimplementation that is compatible with the compat library's fragments. -- K 2012/7/5 Simon Giddings mr.s.giddi...@gmail.com Thank you for your reply. However, this does not answer the main problem, which is - how to show a dialogfragment from a PreferenceActivity, which is not a fragment based activity ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Issues extending ListView in Android
Hello svins, thank you for your comment! Currently I'm working on the very smooth scrolling of the large amount of images on all kinds of devices, so I need to understand every aspect of how ListView class works. Thank you, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Adding build versions
I wanted the same, and so made a few changes to Android's ant build scripts to extract the version name from the manifest and append it as a suffix to the apk name. ( along with some other stuff, like Market vs. non-Market, which use slightlity different code for updating and licensing, and are released at the same time ) My changes also move all ant related intermediate and output files in a separate subdirectory, so they don't interfere with Eclipse. The Android build script is pretty easily to follow and to modify, while Ant docs are available on its web site. -- K 2012/7/5 Damien Cooke cooke.dam...@gmail.com All, I usually build my apps and compile in a build version. I have found no way of doing this for my android apps. I can add an ant task. But this makes the eclipse tools a little clumsy. Is anyone else doing this or have done this and would like to share the experience? Regards Damien. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to set up android emulator for live face detection?
I have an emulator running 4.1 Android. Virtual device is set up so that it has camera emulated by the web cam. This part works fine. However Camera.Parameters.getMaxNumDetectedFaces() always returns 0, meaning that face detection is not supported (though it works fine on static images). Is there anything that can be done in order to enable live face detection on Android emulator? I am talking about the face detection that came with API level 14, not third party libraries. Thanks, Viktor. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] TransactionTooLargeException exception calling queryIntentActivities()
On Wed, Jul 4, 2012 at 11:25 PM, Bryan Ashby nuskoo...@gmail.com wrote: Thanks, I'll try the GET_* flags -- there are quite a few bits of information I can possibly trim out that way. Do you know of a way to measure the difference in underlying IPC payload sizes? Yeah, once you get below 1MB, the exception should go away. :-) Beyond that, I am not aware of other measurement options, sorry. Basically, TransactionTooLargeException means you're trying to retrieve 1MB (IIRC) from a foreign process. In this case, the user has too many apps installed, presumably. This is why I think Google needs to do the underlying work in batches or otherwise overcome the 1M limitation. This is happening on regular user devices. File an enhancement request at http://b.android.com and hope for the best. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TransactionTooLargeException exception calling queryIntentActivities()
Have you looked at the Launcher source code for the various platform releases (source.android.com) ? On Tuesday, July 3, 2012 4:50:45 PM UTC+1, Bryan Ashby wrote: Part of my applications duties are to enumerate launcher activities -- to do this, I call PackageManger.queryIntentActivities(). On some devices this has resulted in a *TransactionTooLargeException*. Is there a way around this? *Example code:* final PackageManager pm = getPackageManager(); Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); final ListResolveInfo ri = pm.queryIntentActivities(intent, 0); // TransactionTooLargeException I saw a related post about getInstalledPackages()https://groups.google.com/forum/?fromgroups#!topic/android-developers/EK4eJPadabsbut it seemed to end with Don't do that which seems like an odd answer to just using the API. I'd expect that in this case if the underlying implementation is limited to 1M that the query is done in batches and hidden from the developer or that an API exists to do it in batches myself. Any ideas? This works nearly all of the time (expected!) but it seems that every now and then I'm running into this exception in the wild on customer devices. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Carousel
Problem solved. What happened was that I did not realize the resolution of the mobile screen, then the carousel buttons appear, but were covered by other layouts. Once adjusted the size and position of the buttons of the carousel, the buttons are displayed correctly. Thanks for the help! 2012/7/4 Jorge Gil Royo jorgeg...@gmail.com Using the emulator 4.x working properly. When I use the phone there is no message in the logcat containing information about the carousel. Is the first time something happens to me so strange. Thank you! 2012/7/4 Jorge Gil Royo jorgeg...@gmail.com Usando el emulador 4.x funciona correctamente. Cuando uso el teléfono móvil no aparece ningún mensaje en el LogCat que contenga información acerca del carrusel. Es la primera vez que me sucede algo tan raro. Gracias! 2012/7/2 TreKing treking...@gmail.com On Fri, Jun 29, 2012 at 6:26 AM, Jorge Gil Royo jorgeg...@gmail.comwrote: But when I test the application on a mobile phone (Android 4.x) the carousel works correctly, but no buttons appear. And if you test on the 4.X emulator? Does anyone know why it happens? Does anyone know how to fix it? Your question is extremely vague. How about some screenshots? Anything in the LogCat that looks useful? - 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] Adding fancy volume controller
Hi everybode, can anyone tell me how to add fancy volume contrller ina ndroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] call method after every 5 min
Hi, Can anyone pls tell me the best way to call an method after every 5 min (handler,timer),i googled and found handler.postdeleyd doesnt not guarntee to execute,timer hangs some time ,pls suggest me the way to call method after every 5 minutes Code snippet will be very useful Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: slow. just a big complaint.
On Jul 5, 5:12 am, seveneves freeander...@gmail.com wrote: this post is just a big complaint and a little bit doubt about why they can't make android better. i'm using mac book pro and eclipse. by the way, android software emulator is really slow. Yes, because it is emulating an arm processor. Use one of the x86 emulation solutions that can benefit from virtualization (vs emulation) instead. Using a device is highly recommended though; the major reason not to use one is when you need to test on an android version you don't have on a device. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] call method after every 5 min
import java.util.Date; import java.util.Timer; import java.util.TimerTask; public class ClassExecutingTask { long delay = 10*1000; // delay in ms : 10 * 1000 ms = 10 sec. LoopTask task = new LoopTask(); Timer timer = new Timer(TaskName); public void start() { timer.cancel(); timer = new Timer(TaskName); Date executionDate = new Date(); // no params = now timer.scheduleAtFixedRate(task, executionDate, delay); } private class LoopTask extends TimerTask { public void run() { System.out.println(This message will print every 10 seconds.); } } public static void main(String[] args) { ClassExecutingTask executingTask = new ClassExecutingTask(); executingTask.start(); } } On Thu, Jul 5, 2012 at 5:33 PM, Rahul Kaushik rahulkaushi...@gmail.comwrote: Hi, Can anyone pls tell me the best way to call an method after every 5 min (handler,timer),i googled and found handler.postdeleyd doesnt not guarntee to execute,timer hangs some time ,pls suggest me the way to call method after every 5 minutes Code snippet will be very useful 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 -- WITH REGARDS ARUN KUMAR P D +91-9994794759 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Jelly Bean errors with LVL
Hi, been seeing some ACRA reports from users on Jelly Bean when my app runs the LVL code. In the LicenseValidator.verify() method, I perform this twice: sig.verify(Base64.decode(signature)) I do it once to check it returns true, and then I call it again to confirm it is still true (this gets around an anti-lvl check which forces the first check to be a hard coded true but isn't aware of the second check). But it appears the second check is now failing on Jelly Bean: Caused by: java.security.SignatureException: java.lang.NullPointerException at org.apache.harmony.xnet.provider.jsse.OpenSSLSignature.engineVerify(OpenSSLSignature.java:244) at java.security.Signature.verify(Signature.java:375) at com.android.vending.licensing.c.a(SourceFile:135) -SECOND sig.verify(..) call. ... 5 more Caused by: java.lang.NullPointerException at org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_VerifyFinal(Native Method) at org.apache.harmony.xnet.provider.jsse.OpenSSLSignature.engineVerify(OpenSSLSignature.java:240) ... 7 more Does anyone know if the implementation of Signature or the underlying classes has changed..? I'm guessing that since the first check works and the second fails, can you now only perform one verify() on a signature and after that, the object is no longer valid to be verified again()..? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jelly Bean errors with LVL
On Thu, Jul 5, 2012 at 9:26 PM, H m...@howardb.com wrote: Hi, been seeing some ACRA reports from users on Jelly Bean when my app runs the LVL code. In the LicenseValidator.verify() method, I perform this twice: sig.verify(Base64.decode(signature)) ... Caused by: java.lang.NullPointerException at org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_VerifyFinal(Native Method) at org.apache.harmony.xnet.provider.jsse.OpenSSLSignature.engineVerify(OpenSSLSignature.java:240) ... 7 more Does anyone know if the implementation of Signature or the underlying classes has changed..? I'm guessing that since the first check works and the second fails, can you now only perform one verify() on a signature and after that, the object is no longer valid to be verified again()..? Yes, it has changed. In JB, the OpenSSL based provider has been extended to support RSA keys and RSA signatures (SHA1withRSA, etc.). Additionally, this is now the default, so the signature verification code that previously was using the Java crypto provider (BouncyCastle) is now calling the native one (Cf. NativeCrypto.EVP_VerifyFinal -- that's a wrapper for an OpenSSL function). This has presumably done for better performance, but there seem to be a few bugs, I've been getting crashes here and there too. Changing Signature.getInstance(SHA1withRSA) to Signature.getInstance(SHA1withRSA, BC) should make it work as before, but do some testing to be sure. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] call method after every 5 min
It gives an compile error Compiled from Timer.java (version 1.5 : 49.0, super bit) public class java.util.Timer { // Method descriptor #8 (Ljava/lang/String;Z)V // Stack: 3, Locals: 3 public Timer(java.lang.String name, boolean isDaemon); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc String Stub! [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 4] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.util.Timer [pc: 0, pc: 14] local: name index: 1 type: java.lang.String [pc: 0, pc: 14] local: isDaemon index: 2 type: boolean // Method descriptor #18 (Ljava/lang/String;)V // Stack: 3, Locals: 2 public Timer(java.lang.String name); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc String Stub! [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 5] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.util.Timer [pc: 0, pc: 14] local: name index: 1 type: java.lang.String // Method descriptor #19 (Z)V // Stack: 3, Locals: 2 public Timer(boolean isDaemon); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc String Stub! [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 6] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.util.Timer [pc: 0, pc: 14] local: isDaemon index: 1 type: boolean // Method descriptor #20 ()V // Stack: 3, Locals: 1 public Timer(); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc String Stub! [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 7] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.util.Timer // Method descriptor #20 ()V // Stack: 3, Locals: 1 public void cancel(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc String Stub! [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 8] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.util.Timer // Method descriptor #23 ()I // Stack: 3, Locals: 1 public int purge(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc String Stub! [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 9] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.util.Timer // Method descriptor #25 (Ljava/util/TimerTask;Ljava/util/Date;)V // Stack: 3, Locals: 3 public void schedule(java.util.TimerTask task, java.util.Date when); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc String Stub! [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 10] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.util.Timer [pc: 0, pc: 10] local: task index: 1 type: java.util.TimerTask [pc: 0, pc: 10] local: when index: 2 type: java.util.Date // Method descriptor #30 (Ljava/util/TimerTask;J)V // Stack: 3, Locals: 4 public void schedule(java.util.TimerTask task, long delay); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc String Stub! [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 11] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.util.Timer [pc: 0, pc: 10] local: task index: 1 type: java.util.TimerTask [pc: 0, pc: 10] local: delay index: 2 type: long // Method descriptor #33 (Ljava/util/TimerTask;JJ)V // Stack: 3, Locals: 6 public void schedule(java.util.TimerTask task, long delay, long period); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc String Stub! [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 12] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.util.Timer [pc: 0, pc: 10] local: task index: 1 type: java.util.TimerTask [pc: 0, pc: 10] local: delay index: 2 type: long [pc: 0, pc: 10] local: period index: 4 type: long // Method descriptor #35 (Ljava/util/TimerTask;Ljava/util/Date;J)V
Re: [android-developers] Jelly Bean errors with LVL
Cheers Nikolay - thanks for the quick update, I'll try your suggestion and see if that cures it. Do you know if this has been reported on b.android.com - I've been checking it as normal but not noticed anything that sounds similar to this..? I presume bouncycastle implementation might go completely in a later release of Android..? [ But I haven't downloaded the Jelly Bean image yet as I need to upgrade adt and that is always a major headache - I might just have to mail an updated version to some users and ask them to check it works for me. ] On Thursday, 5 July 2012 13:45:53 UTC+1, Nikolay Elenkov wrote: On Thu, Jul 5, 2012 at 9:26 PM, H m...@howardb.com wrote: Hi, been seeing some ACRA reports from users on Jelly Bean when my app runs the LVL code. In the LicenseValidator.verify() method, I perform this twice: sig.verify(Base64.decode(signature)) ... Caused by: java.lang.NullPointerException at org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_VerifyFinal(Native Method) at org.apache.harmony.xnet.provider.jsse.OpenSSLSignature.engineVerify(OpenSSLSignature.java:240) ... 7 more Does anyone know if the implementation of Signature or the underlying classes has changed..? I'm guessing that since the first check works and the second fails, can you now only perform one verify() on a signature and after that, the object is no longer valid to be verified again()..? Yes, it has changed. In JB, the OpenSSL based provider has been extended to support RSA keys and RSA signatures (SHA1withRSA, etc.). Additionally, this is now the default, so the signature verification code that previously was using the Java crypto provider (BouncyCastle) is now calling the native one (Cf. NativeCrypto.EVP_VerifyFinal -- that's a wrapper for an OpenSSL function). This has presumably done for better performance, but there seem to be a few bugs, I've been getting crashes here and there too. Changing Signature.getInstance(SHA1withRSA) to Signature.getInstance(SHA1withRSA, BC) should make it work as before, but do some testing to be sure. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Jelly Bean errors with LVL
On Thu, Jul 5, 2012 at 9:55 PM, H m...@howardb.com wrote: Cheers Nikolay - thanks for the quick update, I'll try your suggestion and see if that cures it. Do you know if this has been reported on b.android.com - I've been checking it as normal but not noticed anything that sounds similar to this..? I don't know, haven't checked, but probably not. If you can come up with a simple test case that reproduces this reliably, do report it. (calling verify two/multiple times in a row with the same Signature instance?) I presume bouncycastle implementation might go completely in a later release of Android..? Probably not, but don't take my word for it. OpenSSL is not without its flaws and re-implementing everything on top of it is a pain. [ But I haven't downloaded the Jelly Bean image yet as I need to upgrade adt and that is always a major headache - I might just have to mail an updated version to some users and ask them to check it works for me. ] If you don't want to change your dev environment, simply create a new Eclipse installation, and use that for testing ADT 20, JB, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: call method after every 5 min
Rahul Kaushik wrote: Hi, Can anyone pls tell me the best way to call an method after every 5 min (handler,timer),i googled and found handler.postdeleyd doesnt not guarntee to execute,timer hangs some time ,pls suggest me the way to call method after every 5 minutes Code snippet will be very useful Thanks don't use any handlers, timers or timertasks, use AlarmManager instead 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
Re: [android-developers] Re: call method after every 5 min
Intent intent = new Intent(this, TimeAlarm.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0,intent, PendingIntent.FLAG_ONE_SHOT); am.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis() + (1 * 1000), pendingIntent); TimeAlarm.class is insame life as other classs am.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis() + (1 * 1000), pendingIntent); this line giving me error=null RK On Thu, Jul 5, 2012 at 6:34 PM, skink psk...@gmail.com wrote: Rahul Kaushik wrote: Hi, Can anyone pls tell me the best way to call an method after every 5 min (handler,timer),i googled and found handler.postdeleyd doesnt not guarntee to execute,timer hangs some time ,pls suggest me the way to call method after every 5 minutes Code snippet will be very useful Thanks don't use any handlers, timers or timertasks, use AlarmManager instead 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding custom enum states to an ImageButton
It's seems that currently Android doesn't support non-boolean state. You can verify it by adding another item with non-a state in selector pair. I assume Android evaluates true/false only by checking whether corresonding state attribute be in drawableState returned by onCreateDrawableState. On Saturday, January 21, 2012 3:40:41 AM UTC+8, Nick wrote: I have searched around and I found good examples on adding custom boolean states to a drawable but I am having issues adding a state that is a list of enums. I am sure most of my problems lie within the onCreateDrawableState call so I have a few questions. 1) Is the extraSpace param to onCreateDrawableState the number of additional int[] that I would like to add or the size of the int[]? So since I am just adding MODE I should just be increasing extraSpace by 1 and not by MODE.length? 2) I don't quite understand the mergeDrawableStates method. If I put it in an IF statement I am getting what I expect, but I think I am just getting lucky. I don't feel my IF check is correct. My initial assumption was that I don't do a check and always call mergeDrawableStates but then the drawable never changes. I have seen where if the extra state is a boolean then the if statement checks for that. I don't quite know what to do about an enum. 3) When I do get it working, my ic_button_a is drawn correctly. However every time when ic_button_c is getting drawn, ic_button_c is resized and stretch to fit the View which includes a background graphic that is larger than ic_button_c. ic_button_a and ic_button_a are the same size. I have my custom view: com.pkg.CustomView android:background=@drawable/ic_button_bg android:src=@drawable/ic_button android:layout_height=wrap_content android:layout_width=wrap_content/ which extends ImageButton.: public class CustomView extends ImageButton { private static final int[] MODE = {R.attr.mode}; private int mMode = 1; @Override public int[] onCreateDrawableState(int extraSpace) { final int[] drawableState = super.onCreateDrawableState(extraSpace + 1); if (mMode != 0) { mergeDrawableStates(drawableState, MODE); } return drawableState; } public void setMode(int mode) { mMode = mode; refreshDrawableState(); } } I am defining my modes here: resources declare-styleable name=CaptureButton attr name=mode enum name=a value=0 / enum name=b value=1 / enum name=c value=2 / enum name=d value=3 / enum name=e value=4 / enum name=f value=5 / enum name=g value=6 / enum name=h value=7 / /attr /declare-styleable /resources My @drawable/ic_button is: selector xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res/com.pkg; item app:mode=c android:drawable=@drawable/ic_button_c / item android:drawable=@drawable/ic_button_a / /selector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] What is the function of Intent.ACTION_PRE_BOOT_COMPLETED?
Hi all, I want to know the exact functionality of Intent.ACTION_PRE_BOOT_COMPLETED. Currently, my requirement is to complete the task before the completion of booting of the device i.e. before the call of Intent.ACTION_BOOT_COMPLETED. Can anyone guide me on how to proceed to fulfil the requirement? Any help in this regard will be well appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] charging mats
Do any of you use those charging mats to save a little time charging your devices? I can't remember if those things mess with the micro-USB port on the 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] What is the function of Intent.ACTION_PRE_BOOT_COMPLETED?
On Thu, Jul 5, 2012 at 9:53 AM, Abhishek Kumar Gupta akgaec2...@gmail.com wrote: I want to know the exact functionality of Intent.ACTION_PRE_BOOT_COMPLETED. There is no ACTION_PRE_BOOT_COMPLETED in the Android SDK. Receivers of this broadcast have to be part of the system firmware (thank heavens). Currently, my requirement is to complete the task before the completion of booting of the device i.e. before the call of Intent.ACTION_BOOT_COMPLETED. Can anyone guide me on how to proceed to fulfil the requirement? Questions on how to create your own custom mod of Android belong elsewhere -- this list is for developing applications using the Android SDK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] charging mats
On Thu, Jul 5, 2012 at 9:54 AM, bob b...@coolfone.comze.com wrote: Do any of you use those charging mats to save a little time charging your devices? I can't remember if those things mess with the micro-USB port on the phone. This has nothing to do with this list, which is for developing applications with the Android SDK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Adding fancy volume controller
Have a look at: http://developer.android.com/design/building-blocks/seek-bars.html On Thu, Jul 5, 2012 at 5:20 PM, Sadhna Upadhyay sadhna.braah...@gmail.comwrote: Hi everybode, can anyone tell me how to add fancy volume contrller ina ndroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Java.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x
That is correct. It happened on my Samsung Nexus 2 and ASUS Eee Pad (All those testing devices are using platform 4.0.x). Some other phones like Motorola Atrix (2.3.6) displayed date with en-GB correctly. All of those devices are purchased from US. As I mentioned in the previous email, the Code in my App is: Locale currentLocale = Locale.*getDefault*(); // at this point, the setting is using en-GB dateFormatter = DateFormat.getDateInstance(**Dat**eFormat.SHORT, currentLocale); String formattedDateString = dateFormatter.format(new Date(System.currentTimeMillis())); The Date Format should be SHORT for all locales. I just try to use a generic way to handle the date time localization. Thanks, Edward On Wed, Jul 4, 2012 at 12:11 AM, Zsolt Vasvari zvasv...@gmail.com wrote: So are saying that if you go to Settings (NOT your code) and pick the Great Britain language setting, the phone shows all dates in US English format? On Wednesday, July 4, 2012 12:21:42 AM UTC+8, elin wrote: The getAvailableLocales returned en-GB locale. So the en-GB should be available on this Samsung device and I can switch it through Settings. In addition, if I choose the other locale on the 4.0.x devices through the Settings, such as Deutsch. It is working perfectly as date shown 03.07.2012, so what is wrong with en-GB? Thanks, Edward On Tue, Jul 3, 2012 at 10:56 AM, Edward Lin edwardlinw...@gmail.comwrote: Thanks for the reply! Here is the results I got from this line of code: Locale[] allLocales = Locale.getAvailableLocales(); [ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO, ar_KW, ar_LB, ar_LY, ar_MA, ar_OM, ar_QA, ar_SA, ar_SD, ar_SY, ar_TN, ar_YE, bg, bg_BG, ca, ca_ES, cs, cs_CZ, da, da_DK, de, de_AT, de_BE, de_CH, de_DE, de_LI, de_LU, el, el_GR, en, en_AU, en_BE, en_BW, en_BZ, en_CA, en_GB, en_HK, en_IE, en_IN, en_JM, en_MH, en_MT, en_NA, en_NZ, en_PH, en_PK, en_RH, en_SG, en_TT, en_US, en_US_POSIX, en_VI, en_ZA, en_ZW, es, es_AR, es_BO, es_CL, es_CO, es_CR, es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, es_PA, es_PE, es_PR, es_PY, es_SV, es_US, es_UY, es_VE, fa, fa_AF, fa_IR, fi, fi_FI, fil, fil_PH, fr, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, fr_MC, iw, iw_IL, hi, hi_IN, hr, hr_HR, hu, hu_HU, in, in_ID, it, it_CH, it_IT, ja, ja_JP, ko, ko_KR, lt, lt_LT, lv, lv_LV, nb, nb_NO, nl, nl_BE, nl_NL, pl, pl_PL, ps, pt, pt_BR, pt_PT, rm, ro, ro_RO, ru, ru_RU, ru_UA, sk, sk_SK, sl, sl_SI, sr, sv, sv_FI, sv_SE, th, th_TH, tr, tr_TR, uk, uk_UA, vi, vi_VN, zh, zh_CN, zh_HK, zh_HANS, zh_HANS_CN, zh_HANS_HK, zh_HANS_SG, zh_HANT, zh_HANT_HK, zh_HANT_MO, zh_HANT_TW, zh_MO, zh_SG, zh_TW] On Tue, Jul 3, 2012 at 10:43 AM, RichardC richard.critten@googlemail.** com richard.crit...@googlemail.com wrote: Reading a bit further I found getAvailableLocales () http://developer.android.com/**reference/java/util/Locale.** html#getAvailableLocales()http://developer.android.com/reference/java/util/Locale.html#getAvailableLocales() Try that and see what it returns. On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote: Please help me with this date time localization issue. I am trying to use Java.Text.DateFormat to get the default date format for different locale in the following. dateFormatter = DateFormat.getDateInstance(**Dat**eFormat.SHORT, Locale.UK); String formattedDateString = dateFormatter.format(new Date(System.currentTimeMillis())); When I am trying to format the date using en-GB locale for the date - July, 3rd, 2012 Android 2.2.x.-2.3.x result: 03/07/2012 (Correct) Android 4.0.x result: 07/03/2012 (Wrong) Apparently, It is working at Android platform 2.2.x to 2.3.x, but in devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not work anymore. Why is this behavior different between the API level? And how can I get the default date format for specific locale from now on? Thanks, Edward -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@** googlegroups.com android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://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
[android-developers] Buttons do not display properly in Graphical Layout Editor (ADT r20 Helios Mac:)
Just updated to ADT 20 and none of the buttons in my layouts are displaying properly in the editor. Anyone else having the problem? Basically the buttons display with no background (no default grey button background as they used to). So if I add a new button to the layout it just shows as text only. Also all existing buttons in my layouts do not display properly. During install of ADT 20 there were these issues (showed in a dialog box): !MESSAGE Marker id 345609 not found. !MESSAGE Marker id 345610 not found. !MESSAGE Marker id 345611 not found. Not sure if those are relevant or not. Tried uninstalling/re-installing adt 20 to no avail, same problem (but no dialog box errors on second install). Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: slow. just a big complaint.
Learning the difference between emulator and simulator might help. And also not being in denial of reality. I don't think Android is to blame for your real problem. You need to find other clients. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] that's a wrap?
Is there seriously no option for enabling word wrap in Eclipse? I'm using a Magic mouse, and whenever my finger slides slightly left or right the screen moves horizontally against my will. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Wide ListView horizontal scrolling?
Hi, I have a wide ListView that I need to scroll both vertically (for new items) and horizontal (to display entire row). Is it a good idea to do something like the code below? What are other options if any? Thanks beforehand. HorizontalScrollView android:id=@+id/scrollview android:layout_width=fill_parent android:layout_height=fill_parent android:scrollbars=none LinearLayout android:id=@+id/layout android:layout_width=wrap_content android:layout_height=fill_parent android:orientation=horizontal ListView android:id=@+id/list android:layout_width=fill_parent android:layout_height=fill_parent / /LinearLayout /HorizontalScrollView -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Bitmap.createBitmap to make an immutable copy of subregion, changes bitmap config on 2.2?
Hi, I'm investigating a bug that I've so far only reproduced on a Samsung i5500 running Android 2.2. I'm first creating a bitmap using ALPHA_8 config, like so: Bitmap textBmp = Bitmap.createBitmap(textureW, textureH, Bitmap.Config. ALPHA_8); Then I want to make an immutable copy of a subregion, so I use: Bitmap textureBmp = Bitmap.createBitmap(textBmp, 0, 0, subW, subH); I expect it to return an ALPHA_8 bitmap, and it also does this on my ICS devices, but on the above phone it suddenly is ARGB_ ! Is this a known problem? Anything I can do, except creating my bitmap manually and make a canvas and do a blit? Cheers, Olof -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Buttons do not display properly in Graphical Layout Editor (ADT r20 Helios Mac:)
Ok, solved this by changing the layouts to use anything but API:9 Android 2.3.1 (which is what they were set to). On Thursday, July 5, 2012 10:50:36 AM UTC-4, Paul wrote: Just updated to ADT 20 and none of the buttons in my layouts are displaying properly in the editor. Anyone else having the problem? Basically the buttons display with no background (no default grey button background as they used to). So if I add a new button to the layout it just shows as text only. Also all existing buttons in my layouts do not display properly. During install of ADT 20 there were these issues (showed in a dialog box): !MESSAGE Marker id 345609 not found. !MESSAGE Marker id 345610 not found. !MESSAGE Marker id 345611 not found. Not sure if those are relevant or not. Tried uninstalling/re-installing adt 20 to no avail, same problem (but no dialog box errors on second install). Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: slow. just a big complaint.
On Thu, Jul 5, 2012 at 10:54 AM, Nobu Games dev.nobu.ga...@gmail.com wrote: Learning the difference between emulator and simulator might help. And also not being in denial of reality. I don't think Android is to blame for your real problem. You need to find other clients. At the same time, it's a little annoying that the Android emulators just suck compared to real devices... 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
Re: [android-developers] What is the function of Intent.ACTION_PRE_BOOT_COMPLETED?
On Thu, Jul 5, 2012 at 9:53 AM, Abhishek Kumar Gupta akgaec2...@gmail.com wrote: Hi all, I want to know the exact functionality of Intent.ACTION_PRE_BOOT_COMPLETED. Currently, my requirement is to complete the task before the completion of booting of the device i.e. before the call of Intent.ACTION_BOOT_COMPLETED. Can anyone guide me on how to proceed to fulfil the requirement? Any help in this regard will be well appreciated. Don't cross post, this belongs on android-platform, where you originally posted it.. 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
[android-developers] Help with intent-filter
I've written an intent-filter to receive Picasa images shared from the Gallery app on Android 2.x (on 3+ it is not the same intent but this is a different topic): intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=text/plain /intent-filter Basically the data (Picasa image URL), is in the EXTRA_TEXT extra. This work fine but it has the side effect that my app also registers in the Youtube app share menu, and my app do not manage youtube links. The difference between the Gallery intent and the Youtube intent is that Youtube add a Url to the intent (pointing to the yoube page). My question is to know if it is possible (and if so how) to restrict the intent above to intent *not* having an Url. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android 4.1 Jelly Bean GIF Images Not Showing?
OK, this will be my last post on this one, but I certainly hope that Google will fix this in the future as I'm sure I'm not alone here. We have moved all images away from GIF and now everything works fine in our game. We will be releasing an update with the same once testing is completed. So, a note to Android developers: Stop using GIF or risk big problems. On Wednesday, July 4, 2012 7:32:17 AM UTC-7, Josh F. wrote: It is definitely nothing to do with WebKit or the browser or similar, this is a standard image view in a game trying to load a simple GIF with transparency. An interesting update: After updating to the latest build tooks and setting the target SDK all the way up to 16 (for 4.1) the images now show as just all black. Without any word from anyone from Google/Android, I'm gong to just go ahead and replace everything with PNG files which are all slightly larger than my GIF files which will be a memory hit, but I don't see any alternative if I want a fix done this week. On Tuesday, July 3, 2012 11:47:04 PM UTC-7, Zsolt Vasvari wrote: And we have no idea why you mention Webkit. On Wednesday, July 4, 2012 2:03:29 PM UTC+8, Subramanya Somayaji wrote: We have no Idea What are the webkit changes,updates in Jeallybean!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Wide ListView horizontal scrolling?
I have a wide ListView that I need to scroll both vertically (for new items) and horizontal (to display entire row). Is it a good idea to do something like the code below? I don't know if that will work... It might. Have you tried it? What are other options if any? I would try to redesign each row so that it doesn't have to scroll horizontally to display everything. If you are dead set against that, you could try putting a HorizontalScrollView in each item. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 9:03 AM, kodlan kod...@gmail.com wrote: Hi, I have a wide ListView that I need to scroll both vertically (for new items) and horizontal (to display entire row). Is it a good idea to do something like the code below? What are other options if any? Thanks beforehand. HorizontalScrollView android:id=@+id/scrollview android:layout_width=fill_parent android:layout_height=fill_parent android:scrollbars=none LinearLayout android:id=@+id/layout android:layout_width=wrap_content android:layout_height=fill_parent android:orientation=horizontal ListView android:id=@+id/list android:layout_width=fill_parent android:layout_height=fill_parent / /LinearLayout /HorizontalScrollView -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] that's a wrap?
Is there seriously no option for enabling word wrap in Eclipse? Try asking on a forum dedicated to Eclipse... Not sure if you've noticed, but this forum is specifically for questions related to developing Android app using the Android SDK. How does word wrap in Eclipse fit into this? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 8:59 AM, bob b...@coolfone.comze.com wrote: Is there seriously no option for enabling word wrap in Eclipse? I'm using a Magic mouse, and whenever my finger slides slightly left or right the screen moves horizontally against my will. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Wide ListView horizontal scrolling?
I don't know if that will work... It might. Have you tried it? It seems to work, but I don't know if thats a good idea to do so. Maybe that will cause some problems that I'm not aware of. I would try to redesign each row so that it doesn't have to scroll horizontally to display everything. If you are dead set against that, you could try putting a HorizontalScrollView in each item. Nope, redesigning is not an option. But thanks for the recommendation. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issues extending ListView in Android
On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote: Here are the sources of: ListView.java ... Those are publicly available sources! The source that would be most helpful is the source for CustomListView... -blake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Issues extending ListView in Android
Out of curiosity, what are you trying to achieve by overriding layoutChildren() in your custom listview? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 9:35 AM, G. Blake Meike blake.me...@gmail.comwrote: On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote: Here are the sources of: ListView.java ... Those are publicly available sources! The source that would be most helpful is the source for CustomListView... -blake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Wide ListView horizontal scrolling?
Nope, redesigning is not an option. But thanks for the recommendation. You are welcome... As the developer you know what can and can't be done with your app, but if I (as a user) came across an app that had a listview that behaved in this way, I would probably uninstall it. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 9:35 AM, kodlan kod...@gmail.com wrote: I don't know if that will work... It might. Have you tried it? It seems to work, but I don't know if thats a good idea to do so. Maybe that will cause some problems that I'm not aware of. I would try to redesign each row so that it doesn't have to scroll horizontally to display everything. If you are dead set against that, you could try putting a HorizontalScrollView in each item. Nope, redesigning is not an option. But thanks for the recommendation. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Week of calender view
http://catb.org/esr/faqs/smart-questions.html Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 3:25 AM, jagadeeshbabu mjagadeeshb...@gmail.comwrote: Hi All, ** ** I have made calendar view ,now I have to make with week selection view can any one help me for this. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issues extending ListView in Android
Hello Blake! Well, the source of CustomListView class is quite simple for now: package com.cghub.android.widgets; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.ListView; public class CustomListView extends ListView { public CustomListView(Context context) { this(context, null); } public CustomListView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public CustomListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); } protected void layoutChildren() { super.layoutChildren(); } View obtainView(int position, boolean[] isScrap) { Log.d(clv, getClass().getName()); Exception e = new Exception(); e.printStackTrace(); return null; } protected void attachViewToParent(View child, int index, LayoutParams params) { Log.d(clv, attach to parent); } protected boolean addViewInLayout(View child, int index, LayoutParams params, boolean preventRequestLayout) { Log.d(clv, add in layout); return true; } protected boolean addViewInLayout(View child, int index, LayoutParams params) { Log.d(clv, add in layout); return true; } } четверг, 5 июля 2012 г., 18:35:43 UTC+3 пользователь G. Blake Meike написал: On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote: Here are the sources of: ListView.java ... Those are publicly available sources! The source that would be most helpful is the source for CustomListView... -blake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Issues extending ListView in Android
Hello Justin! As I already mentioned in this topic, I'm trying to optimize the ListView for a large amount of images. Thank you, Alex четверг, 5 июля 2012 г., 18:39:34 UTC+3 пользователь MagouyaWare написал: Out of curiosity, what are you trying to achieve by overriding layoutChildren() in your custom listview? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 9:35 AM, G. Blake Meike blake.me...@gmail.comwrote: On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote: Here are the sources of: ListView.java ... Those are publicly available sources! The source that would be most helpful is the source for CustomListView... -blake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: call method after every 5 min
+1 Starting your own thread is broken: it won't work across process boundaries. G. Blake Meike Marakana The second edition of Programming Android is now on-line: http://shop.oreilly.com/product/0636920023005.do On Thursday, July 5, 2012 6:09:47 AM UTC-7, rahul kaushik wrote: Intent intent = new Intent(this, TimeAlarm.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0,intent, PendingIntent.FLAG_ONE_SHOT); am.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis() + (1 * 1000), pendingIntent); TimeAlarm.class is insame life as other classs am.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis() + (1 * 1000), pendingIntent); this line giving me error=null RK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Invitation to use Google Talk
--- You've been invited by Douglas Lang to use Google Talk. If you already have a Google account, login to Gmail and accept this chat invitation: http://mail.google.com/mail/b-a6fe5d5831-f1c97face8-s0ax-pQW_IGElyEV3V4Y_ywpN9U To sign up for a Google account and get started with Google Talk, you can visit: http://mail.google.com/mail/a-a6fe5d5831-f1c97face8-s0ax-pQW_IGElyEV3V4Y_ywpN9U?pc=en-rf---a Learn more at: http://www.google.com/intl/en/landing/accounts/ Thanks, The Google Team -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: no audio from bluetooth sco earpiece
I found the solution :-) I posted it on SO: http://stackoverflow.com/questions/7212783/android-playing-sound-over-sco-bluetooth-headset/11348952#11348952 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Put 3D object on screen and manage its location
Hi. I need to put a 3D object (obj, mtl or 3ds) on screen and see that image while I'm seeing camera view. That is easy but I need to manage the position of the object WITHOUT GPS signal, I mean, if I move the mobile phone I don´t have to see the object, only when I focus to the correct direction (for example I suppose I can use the compass for this), but I need to know how to do it. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Bitmap.createBitmap to make an immutable copy of subregion, changes bitmap config on 2.2?
It's an unfortunate bug that was fixed in 3.x or 4.x. On Jul 5, 2012 8:05 AM, Olof Hedman o...@illusionlabs.se wrote: Hi, I'm investigating a bug that I've so far only reproduced on a Samsung i5500 running Android 2.2. I'm first creating a bitmap using ALPHA_8 config, like so: Bitmap textBmp = Bitmap.createBitmap(textureW, textureH, Bitmap.Config. ALPHA_8); Then I want to make an immutable copy of a subregion, so I use: Bitmap textureBmp = Bitmap.createBitmap(textBmp, 0, 0, subW, subH); I expect it to return an ALPHA_8 bitmap, and it also does this on my ICS devices, but on the above phone it suddenly is ARGB_ ! Is this a known problem? Anything I can do, except creating my bitmap manually and make a canvas and do a blit? Cheers, Olof -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: NotificationManager, get methods
Why there is no read methods in NotificationManager? Because an app can keep track of its own notifications, and an app should not have access to other apps' notifications. Because an app can keep track of its own notifications... It's not an answer. You can keep track of everything you did, but somehow you have get methods almost everywhere. I don't want to have access to other apps notifications (in fact I want, but I understand why it's forbidden) But I don't really see any reason why NotificationManager.notify/cancel/cancelAll return void and not giving any indication my notifications. It's looks like a poor design for me. Is it on purpose? Most likely. Will it be added in future releases? You will find out when the rest of us find out, when future releases are released. If not, maybe somebody know how to get Intent object out of PendingIntent? There is no API for that, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
https://www.google.com/search?q=Android+Augmented+Reality -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: NotificationManager, get methods
It's not an answer. Yes it is. Just because you don't like the answer doesn't mean it isn't an answer. But I don't really see any reason why NotificationManager.notify/cancel/cancelAll return void and not giving any indication my notifications. It's looks like a poor design for me. Well, to me it would seem like a poor design to have it return something that you obviously should already have a reference to... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 11:39 AM, Sergey Tolkachov sergey.tolkac...@gmail.com wrote: It's not an answer. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] TS play with VideoView
Hi, I'm working on an application that needs to play videos in the format TS (transport strem), however, as the link http://developer.android.com/guide/appendix/media-formats.html,; I play with the codec H.264 AVC in version 3.0 + Android. However, I wrote a simple code to play a video file in this format but the error was: ***. When tested with a file in 3GP format, it works right. The following code snippet: ... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView videoView = (VideoView) findViewById(R.id.videoView1); MediaController mc = new MediaController(this); mc.setAnchorView(videoView); Uri uri = Uri.parse(http://myserver/files/video.ts;); // with 3GP it's works videoView.setMediaController(mc); videoView.setVideoURI(uri); videoView.start(); } ... Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
Yes, of course I´ve been looking for frameworks to do it and I´ve tried lookar, min3d and some more. I am sure that they can do what I need but I don´t know how to do it. I wrote here in order to find people who have already done what I want to do, so they can explain me how they did it or where they found the information (not a big tutorial, just some instructions). Thanks El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió: https://www.google.com/search?q=Android+Augmented+Reality -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
On Thu, Jul 5, 2012 at 12:47 PM, santy wrote: Yes, of course I have been trying with all the frameworks I have found (LooakAR, min3D...) and I am sure I can do what I need with them but I don´t know how. I wrote here in order to find someone who has done exactly the same I have to do (there must be a lot) and to know how they did it (I need a tutorial that explains it or some advices). Thanks El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió: https://www.google.com/search?q=Android+Augmented+Reality You need to make use of SensorManager and register a SensorListener in order to construct a device rotation matrix. Luckily Android already provides a method that calculates that matrix which is ready for use in OpenGL: SensorManager.getRotationMatrix()http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29 . *This matrix is ready to be used by OpenGL ES's glLoadMatrixf(float[], int)http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html#glLoadMatrixf%28float[],%20int%29. * * Note that because OpenGL matrices are column-major matrices you must transpose the matrix before using it. However, since the matrix is a rotation matrix, its transpose is also its inverse, conveniently, it is often the inverse of the rotation that is needed for rendering; it can therefore be used with OpenGL ES directly. * You also may want to implement an algorithm that reduces the noise from the sensor data, otherwise the 3D objects will jitter on the screen. The simplest approach is calculating a median and / or weighted average over time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NotificationManager, get methods
Ok, then suggest a method how to verify that notification exists. It's not so weird scenario to be able to check that some notification exists. On Thursday, July 5, 2012 8:51:25 PM UTC+3, MagouyaWare wrote: It's not an answer. Yes it is. Just because you don't like the answer doesn't mean it isn't an answer. But I don't really see any reason why NotificationManager.notify/cancel/cancelAll return void and not giving any indication my notifications. It's looks like a poor design for me. Well, to me it would seem like a poor design to have it return something that you obviously should already have a reference to... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 11:39 AM, Sergey Tolkachov sergey.tolkac...@gmail.com wrote: It's not an answer. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TS play with VideoView
Sorry, the error was: *Cannot played video Sorry, this video cannot be played Em quinta-feira, 5 de julho de 2012 14h57min02s UTC-3, Leonardo escreveu: Hi, I'm working on an application that needs to play videos in the format TS (transport strem), however, as the link http://developer.android.com/guide/appendix/media-formats.html,; I play with the codec H.264 AVC in version 3.0 + Android. However, I wrote a simple code to play a video file in this format but the error was: ***. When tested with a file in 3GP format, it works right. The following code snippet: ... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView videoView = (VideoView) findViewById(R.id.videoView1); MediaController mc = new MediaController(this); mc.setAnchorView(videoView); Uri uri = Uri.parse(http://myserver/files/video.ts;); // with 3GP it's works videoView.setMediaController(mc); videoView.setVideoURI(uri); videoView.start(); } ... Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issues extending ListView in Android
Whoah. I've only had a minute or two to look at this but, for the moment at least, I'm baffled. G. Blake Meike Marakana The second edition of Programming Android is now on-line: http://shop.oreilly.com/product/0636920023005.do On Thursday, July 5, 2012 8:44:51 AM UTC-7, Alex Belyaev wrote: Hello Blake! Well, the source of CustomListView class is quite simple for now: package com.cghub.android.widgets; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.ListView; public class CustomListView extends ListView { public CustomListView(Context context) { this(context, null); } public CustomListView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public CustomListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); } protected void layoutChildren() { super.layoutChildren(); } View obtainView(int position, boolean[] isScrap) { Log.d(clv, getClass().getName()); Exception e = new Exception(); e.printStackTrace(); return null; } protected void attachViewToParent(View child, int index, LayoutParams params) { Log.d(clv, attach to parent); } protected boolean addViewInLayout(View child, int index, LayoutParams params, boolean preventRequestLayout) { Log.d(clv, add in layout); return true; } protected boolean addViewInLayout(View child, int index, LayoutParams params) { Log.d(clv, add in layout); return true; } } четверг, 5 июля 2012 г., 18:35:43 UTC+3 пользователь G. Blake Meike написал: On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote: Here are the sources of: ListView.java ... Those are publicly available sources! The source that would be most helpful is the source for CustomListView... -blake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: NotificationManager, get methods
On Thu, Jul 5, 2012 at 2:02 PM, Sergey Tolkachov sergey.tolkac...@gmail.com wrote: Ok, then suggest a method how to verify that notification exists. Supply both contentIntent and deleteIntent, and track it yourself, as I originally described. You can also try FLAG_NO_CREATE with the getActivity() (or whatever) call to PendingIntent. In theory, if it returns null, there is no existing PendingIntent to be used, and therefore the Notification that had that PendingIntent in contentIntent is gone. Personally, I'm not completely comfortable with this model, as I am unclear on the behavior if your process goes away, but you are welcome to experiment with it. It's not so weird scenario to be able to check that some notification exists. IMHO, it is. If you want the Notification to be gone, cancel() it. If you want the Notification to be there, raise it again (with the same ID), and it will replace the one that is there if it happens to be there, or will create it anew if not. Most situations will fit one of the above two cases. Now, I won't deny that it would be *handy* to have an isNotificationActive() method or some such, but it is not there. Of course, you are welcome to add such a method in a contribution to the AOSP, if you feel sufficiently strongly about it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in DC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
Thank you very much Nobu. And is it possible to place the 3D object just to see the object with the camera on its position without using the GPS??? El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió: On Thu, Jul 5, 2012 at 12:47 PM, santy wrote: Yes, of course I have been trying with all the frameworks I have found (LooakAR, min3D...) and I am sure I can do what I need with them but I don´t know how. I wrote here in order to find someone who has done exactly the same I have to do (there must be a lot) and to know how they did it (I need a tutorial that explains it or some advices). Thanks El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió: https://www.google.com/search?q=Android+Augmented+Reality You need to make use of SensorManager and register a SensorListener in order to construct a device rotation matrix. Luckily Android already provides a method that calculates that matrix which is ready for use in OpenGL: SensorManager.getRotationMatrix()http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29 . *This matrix is ready to be used by OpenGL ES's glLoadMatrixf(float[], int)http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html#glLoadMatrixf%28float[],%20int%29. * * Note that because OpenGL matrices are column-major matrices you must transpose the matrix before using it. However, since the matrix is a rotation matrix, its transpose is also its inverse, conveniently, it is often the inverse of the rotation that is needed for rendering; it can therefore be used with OpenGL ES directly. * You also may want to implement an algorithm that reduces the noise from the sensor data, otherwise the 3D objects will jitter on the screen. The simplest approach is calculating a median and / or weighted average over time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
With that device rotation matrix you can only rotate your objects around the screen, where the rotation center point is the center of the device. This is independent of GPS location coordinates, and as the name of that matrix suggests, it is really rotation only, not translation (moving around the objects on any axis). But to answer your question: yes, it is possible to just use the sensor data without GPS and have 3D objects move around on the screen. And it will work well for most use cases, like augmented reality games where you usually sit as a player and move the camera around. If you need to change the positioning of the 3D objects according to the current device location and movement, it gets a bit more complicated. You could make use of the GPS coordinates for translation but it wouldn't be real time suitable, because GPS alone is usually not precise enough. You need to combine several sensors (including the camera) for making an augmented reality app possible that gives a seamless experience and allows the user to freely walk around. You could make use of acceleration sensor data for getting an idea of the current device / user movement direction. With that information you could predict a translation until the next GPS location update gives you certainty about the current location. You also could make use of realtime image analysis for calculating the current movement direction based on changes in the video preview frames. On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote: Thank you very much Nobu. And is it possible to place the 3D object just to see the object with the camera on its position without using the GPS??? El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió: On Thu, Jul 5, 2012 at 12:47 PM, santy wrote: Yes, of course I have been trying with all the frameworks I have found (LooakAR, min3D...) and I am sure I can do what I need with them but I don´t know how. I wrote here in order to find someone who has done exactly the same I have to do (there must be a lot) and to know how they did it (I need a tutorial that explains it or some advices). Thanks El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió: https://www.google.com/search?q=Android+Augmented+Reality You need to make use of SensorManager and register a SensorListener in order to construct a device rotation matrix. Luckily Android already provides a method that calculates that matrix which is ready for use in OpenGL: SensorManager.getRotationMatrix()http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29 . *This matrix is ready to be used by OpenGL ES's glLoadMatrixf(float[], int)http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html#glLoadMatrixf%28float[],%20int%29. * * Note that because OpenGL matrices are column-major matrices you must transpose the matrix before using it. However, since the matrix is a rotation matrix, its transpose is also its inverse, conveniently, it is often the inverse of the rotation that is needed for rendering; it can therefore be used with OpenGL ES directly. * You also may want to implement an algorithm that reduces the noise from the sensor data, otherwise the 3D objects will jitter on the screen. The simplest approach is calculating a median and / or weighted average over time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put 3D object on screen and manage its location
OK. I´ll try to do it. Thank you very much El jueves, 5 de julio de 2012 20:33:27 UTC+2, Nobu Games escribió: With that device rotation matrix you can only rotate your objects around the screen, where the rotation center point is the center of the device. This is independent of GPS location coordinates, and as the name of that matrix suggests, it is really rotation only, not translation (moving around the objects on any axis). But to answer your question: yes, it is possible to just use the sensor data without GPS and have 3D objects move around on the screen. And it will work well for most use cases, like augmented reality games where you usually sit as a player and move the camera around. If you need to change the positioning of the 3D objects according to the current device location and movement, it gets a bit more complicated. You could make use of the GPS coordinates for translation but it wouldn't be real time suitable, because GPS alone is usually not precise enough. You need to combine several sensors (including the camera) for making an augmented reality app possible that gives a seamless experience and allows the user to freely walk around. You could make use of acceleration sensor data for getting an idea of the current device / user movement direction. With that information you could predict a translation until the next GPS location update gives you certainty about the current location. You also could make use of realtime image analysis for calculating the current movement direction based on changes in the video preview frames. On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote: Thank you very much Nobu. And is it possible to place the 3D object just to see the object with the camera on its position without using the GPS??? El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió: On Thu, Jul 5, 2012 at 12:47 PM, santy wrote: Yes, of course I have been trying with all the frameworks I have found (LooakAR, min3D...) and I am sure I can do what I need with them but I don´t know how. I wrote here in order to find someone who has done exactly the same I have to do (there must be a lot) and to know how they did it (I need a tutorial that explains it or some advices). Thanks El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió: https://www.google.com/search?q=Android+Augmented+Reality You need to make use of SensorManager and register a SensorListener in order to construct a device rotation matrix. Luckily Android already provides a method that calculates that matrix which is ready for use in OpenGL: SensorManager.getRotationMatrix()http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29 . *This matrix is ready to be used by OpenGL ES's glLoadMatrixf(float[], int)http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html#glLoadMatrixf%28float[],%20int%29. * * Note that because OpenGL matrices are column-major matrices you must transpose the matrix before using it. However, since the matrix is a rotation matrix, its transpose is also its inverse, conveniently, it is often the inverse of the rotation that is needed for rendering; it can therefore be used with OpenGL ES directly. * You also may want to implement an algorithm that reduces the noise from the sensor data, otherwise the 3D objects will jitter on the screen. The simplest approach is calculating a median and / or weighted average over time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Supported Java packages for Android
Hello, I am in the process of moving my C++ skills over to Java. Could someone point me to reference about what Java packages are supported by Android. This will help me focus on Java as it only applies to Android development. -- Kind Regards, Rajinder Yadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Supported Java packages for Android
On Thu, Jul 5, 2012 at 2:45 PM, Dev Guy devguy...@gmail.com wrote: Hello, I am in the process of moving my C++ skills over to Java. Could someone point me to reference about what Java packages are supported by Android. This will help me focus on Java as it only applies to Android development. I just realized by looking through the Android reference I can pretty much figure out this answer. If there is anything else other experienced Android developer can share to help me ramp up please do. -- Kind Regards, Rajinder Yadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: NotificationManager, get methods
Supply both contentIntent and deleteIntent, and track it yourself, as I originally described. You can also try FLAG_NO_CREATE with the getActivity() (or whatever) call to PendingIntent. In theory, if it returns null, there is no existing PendingIntent to be used, and therefore the Notification that had that PendingIntent in contentIntent is gone. Personally, I'm not completely comfortable with this model, as I am unclear on the behavior if your process goes away, but you are welcome to experiment with it. As I wrote at my first post: I can do it via PendingIntents (thought it require to ask application developers to make a couple of things in code) I am doing exactly what you suggest here. The problem is that it's not straight forward approach and it require from developers to right special code (like giving action type to intent). Another problem that it will not give me opportunity to verify notification ticker (I am doing it right now by asking developers to add it to intent category) It's not so weird scenario to be able to check that some notification exists. IMHO, it is. If you want the Notification to be gone, cancel() it. If you want the Notification to be there, raise it again (with the same ID), and it will replace the one that is there if it happens to be there, or will create it anew if not. As I mentioned I am writing testing platform, so it's not about developer using this method. Most situations will fit one of the above two cases. Now, I won't deny that it would be *handy* to have an isNotificationActive() method or some such, but it is not there. Of course, you are welcome to add such a method in a contribution to the AOSP, if you feel sufficiently strongly about it. Good idea, probably I will do it. Thanks for answering. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in DC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: activity looses ArrayList items
I saw the notice about the syncronization of the Vector type, but it didn't help me find a solution to the problem. What I believe i need to do is... lock the ArrayList, Vector whatever update the ArrayList unlock the ArrayList but I don't know how to accomplish this. On Tuesday, July 3, 2012 1:36:58 PM UTC-7, RichardC wrote: I don't think Vector is thread safe in the way you expect did you read: *This class is equivalent to ArrayListhttp://developer.android.com/reference/java/util/ArrayList.html with synchronized operations. This has a performance cost, and the synchronization is not necessarily meaningful to your application: synchronizing each call to get, for example, is not equivalent to synchronizing on the list and iterating over it (which is probably what you intended). If you do need very highly concurrent access, you should also consider CopyOnWriteArrayListhttp://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html . * http://developer.android.com/reference/java/util/Vector.html The implication of the above is that your Vector change be changed from another thread whilst you are trying to serialize it. On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote: I have an activity that contains a private Vectormyobject, thread safe version of ArrayList. The activity adds items to the ArrayList, and in onSaveInstanceState() I save the data (see code below). The problem is that it looses items and it seems to have after the GC runs. So what am I missing? private static RecentItems _lstRecent; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); restoreRecents(savedInstanceState); } @Override protected void onSaveInstanceState(Bundle outState){ super.onSaveInstanceState(outState); String s=serializeIt(_lstRecent); bundle.putString(lstRecent, s); } @Override protected void onRestoreInstanceState(Bundle outState){ super.onSaveInstanceState(outState); this.restoreRecents(outState); } private void restoreRecents(Bundle bundle){ if (bundle!=null){ String s = bundle.getString(lstRecent); _lstRecent=deserializeIt(s); } if (_lstRecent ==null) _lstRecent=new RecentItems();//unt } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: process.destroy() logging exceptions in ICS
If anybody cares, I did find a workaround: ... finally { destroyProcess(process); } private static void destroyProcess(Process process) { try { if (process != null) { // use exitValue() to determine if process is still running. process.exitValue(); } } catch (IllegalThreadStateException e) { // process is still running, kill it. process.destroy(); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Regarding Ping command in android
Hi, Do we need super user permission to execute the following command in Android App Runtime.getRuntime().exec(ping -c + count + + host).getInputStream(); Thanks, Iniyan P -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: activity looses ArrayList items
All activity lifecycle callbacks are invoked on the same, main, UI thread. 2012/7/6 alex b alex_bramb...@yahoo.com I saw the notice about the syncronization of the Vector type, but it didn't help me find a solution to the problem. What I believe i need to do is... lock the ArrayList, Vector whatever update the ArrayList unlock the ArrayList but I don't know how to accomplish this. On Tuesday, July 3, 2012 1:36:58 PM UTC-7, RichardC wrote: I don't think Vector is thread safe in the way you expect did you read: *This class is equivalent to ArrayListhttp://developer.android.com/reference/java/util/ArrayList.html with synchronized operations. This has a performance cost, and the synchronization is not necessarily meaningful to your application: synchronizing each call to get, for example, is not equivalent to synchronizing on the list and iterating over it (which is probably what you intended). If you do need very highly concurrent access, you should also consider CopyOnWriteArrayListhttp://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html . * http://developer.android.com/**reference/java/util/Vector.**htmlhttp://developer.android.com/reference/java/util/Vector.html The implication of the above is that your Vector change be changed from another thread whilst you are trying to serialize it. On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote: I have an activity that contains a private Vectormyobject, thread safe version of ArrayList. The activity adds items to the ArrayList, and in onSaveInstanceState() I save the data (see code below). The problem is that it looses items and it seems to have after the GC runs. So what am I missing? private static RecentItems _lstRecent; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(**savedInstanceState); setContentView(R.layout.main); restoreRecents(**savedInstanceState); } @Override protected void onSaveInstanceState(Bundle outState){ super.onSaveInstanceState(**outState); String s=serializeIt(_lstRecent); bundle.putString(lstRecent, s); } @Override protected void onRestoreInstanceState(Bundle outState){ super.onSaveInstanceState(**outState); this.restoreRecents(outState); } private void restoreRecents(Bundle bundle){ if (bundle!=null){ String s = bundle.getString(lstRecent); _lstRecent=deserializeIt(s); } if (_lstRecent ==null) _lstRecent=new RecentItems();//unt } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: activity looses ArrayList items
I've isolated the problem and this has nothing to do with ArrayList or Vector and everything to do with Garbage Collector. Both of those are working fine exactly as I coded them when I run the code in an isolated activity. Apparently GC is destorying my activity and recreating it and my onSaveInstanceState()/onRestoreInstanceState() code isn't working correctly. On Thursday, July 5, 2012 1:35:07 PM UTC-7, alex b wrote: I saw the notice about the syncronization of the Vector type, but it didn't help me find a solution to the problem. What I believe i need to do is... lock the ArrayList, Vector whatever update the ArrayList unlock the ArrayList but I don't know how to accomplish this. On Tuesday, July 3, 2012 1:36:58 PM UTC-7, RichardC wrote: I don't think Vector is thread safe in the way you expect did you read: *This class is equivalent to ArrayListhttp://developer.android.com/reference/java/util/ArrayList.html with synchronized operations. This has a performance cost, and the synchronization is not necessarily meaningful to your application: synchronizing each call to get, for example, is not equivalent to synchronizing on the list and iterating over it (which is probably what you intended). If you do need very highly concurrent access, you should also consider CopyOnWriteArrayListhttp://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html . * http://developer.android.com/reference/java/util/Vector.html The implication of the above is that your Vector change be changed from another thread whilst you are trying to serialize it. On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote: I have an activity that contains a private Vectormyobject, thread safe version of ArrayList. The activity adds items to the ArrayList, and in onSaveInstanceState() I save the data (see code below). The problem is that it looses items and it seems to have after the GC runs. So what am I missing? private static RecentItems _lstRecent; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); restoreRecents(savedInstanceState); } @Override protected void onSaveInstanceState(Bundle outState){ super.onSaveInstanceState(outState); String s=serializeIt(_lstRecent); bundle.putString(lstRecent, s); } @Override protected void onRestoreInstanceState(Bundle outState){ super.onSaveInstanceState(outState); this.restoreRecents(outState); } private void restoreRecents(Bundle bundle){ if (bundle!=null){ String s = bundle.getString(lstRecent); _lstRecent=deserializeIt(s); } if (_lstRecent ==null) _lstRecent=new RecentItems();//unt } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HELP! Google removed my app with millions of users!
ICS doesn't have a hard menu button anymore, so the menu button occupies a bar at the bottom of the screen on apps that expect it and don't have their own soft-button. The issue could be that people accidentally click the ad trying to hit the menu button (complete speculation), so placing the ad at the top would resolve that. That falls into the I'll put it wherever they want as long as they tell me where they want it category you mentioned already. Before you mentioned the app name I was thinking it might have fallen into the intellectual property category if someone sent a DMCA-type notice, but that shouldn't be the issue here. On Tuesday, July 3, 2012 10:08:33 AM UTC-4, CVP wrote: I'm really looking for help from anyone, but I really need to get in contact with someone from google... Without warning, a few days ago my long standing successful app was removed from the play store. The app has been around for over 2 years now and has around 1.5 million active users, and nearly 5 million downloads. It's been in the top 5 of its category for well over a year. It has over 65,000 ratings with an average of 4.6/5. The email I received said that the app was removed because Google says *Violation of one or more of the following provisions of the Content Policy: spamhttp://www.android.com/us/developer-content-policy.html#spam , intellectual propertyhttp://www.android.com/us/developer-content-policy.html#IP, and impersonation or deceptive behaviorhttp://www.android.com/us/developer-content-policy.html#impersonation * and more specifically because *core features of your application causes users to accidentally click on advertisements* First of all, the ads are hardly accidentally clicked... The highest average click rate I've ever gotten was 0.8%. Even still I've read over the Content Policy http://www.android.com/us/developer-content-policy.html as well as the Distribution Agreementhttp://www.android.com/us/developer-distribution-agreement.html and neither call out specific ad placement rules, guidelines, or suggestions. The ad placements are also similar to hundreds of other most popular apps... I'm more than happy to upload a compliant version of the application putting the advertisements in whatever position is deemed acceptable by Google. I'm not unethical or a con-artist, I'm a recent college grad from a smaller town after all... Re-releasing the application under another package name would be unfair to the 1.5 million active users out there as they wouldn't get the update notification or keep their settings. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] null is the loneliest number
I'm looking at this function in Activity: public Window getWindow () Since: API Level 1 Retrieve the current Window for the activity. This can be used to directly access parts of the Window API that are not available through Activity/Screen. Returns Window The current window, or null if the activity is not visual. It says it returns null if the activity is not visual. In layman's terms, when does it return null? What constitutes a not visual activity? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] null is the loneliest number
Perhaps an activity that only launches another activity... There is a theme you can use when creating an activity that doesn't have a UI: android:theme=@android:style/Theme.NoDisplay Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jul 5, 2012 at 4:20 PM, bob b...@coolfone.comze.com wrote: I'm looking at this function in Activity: public Window getWindow () Since: API Level 1 Retrieve the current Window for the activity. This can be used to directly access parts of the Window API that are not available through Activity/Screen. Returns Window The current window, or null if the activity is not visual. It says it returns null if the activity is not visual. In layman's terms, when does it return null? What constitutes a not visual activity? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to display static google map on android imageview?
InputStream is = (InputStream) new URL(url).getContent(); drawable = Drawable.createFromStream(is, YourAppName); i_Map.setImageDrawable(drawable); i_Map.setScaleType(ScaleType.FIT_XY); On Thursday, July 5, 2012 2:48:22 AM UTC-4, Remo wrote: Hi All, I am new in android, I dont know how to display static google map on an imageview. Something similar to Whatsapp showing while share the location. How can I do this? From googly document i came to know that we need to pass the Url in image view. Please share the code to pass the Url in Imge view String latEiffelTower = 48.858235; String lngEiffelTower = 2.294571; String url = http://maps.google.com/maps/api/staticmap?center=; + latEiffelTower + , + lngEiffelTower + zoom=15size=200x200sensor=false Thanks Remo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to improve performance for drawing with background image?
Hi, I have done a few painting apps and they all worked fine as long as I don't use background images. Once I added background image, the painting becomes sluggish. I have tried 2 methods of adding background image: - use setBackgroundDrawable - in the layout, I created an overlapping imageView with the background image using FrameLayout Once I removed the background image, the drawing is smooth again. Is there any suggestions for me to improve the performance? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Updating text in a DialogFragment
Hi folks, I've been searching for a solution to this problem for the last couple hours but haven't turned up a solution. I'm very new to using Fragments, but building an app based around the ViewPager in the support library. For the most part, I haven't had any problems, but I am running into a situation where I'm using a DialogFragment in the hopes of building a progress indicator while my app does some things in the background. I have an indeterminate progress indicator running in my DialogFragment, and I want to update one of two TextViews I have in the dialog as it progresses. I'm sending updates from my background service thread via a Handler that is then to update the designated TextView. The problem is, that TextView isn't updating. I thought it might be an issue with the static field I assign the result of the findViewById() to (thinking that it may not exist before the dialog is displayed), so I do a check and secondary findViewById() prior to changing the text via TextView.setText(). Unfortunately, it appears that the TextView field is always null, and so the view isn't getting updated. What am I failing to do? Do I need to do something with FragmentTransaction or FragmentManager in order to update this TextView? Thank you for your assistance! Raymond -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to improve performance for drawing with background image?
Did you also try drawing directly into the background image bitmap? Make it a mutable bitmap, wrap that bitmap into a Canvas object and use that instead. Maybe that speeds things up a bit, because Android doesn't need to blend two views / layers all the time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Adding custom enum states to an ImageButton
Yes this must be booleans. There is no way to express anything else in StateListDrawable. On Thu, Jul 5, 2012 at 6:21 AM, li lianyu ice...@gmail.com wrote: It's seems that currently Android doesn't support non-boolean state. You can verify it by adding another item with non-a state in selector pair. I assume Android evaluates true/false only by checking whether corresonding state attribute be in drawableState returned by onCreateDrawableState. On Saturday, January 21, 2012 3:40:41 AM UTC+8, Nick wrote: I have searched around and I found good examples on adding custom boolean states to a drawable but I am having issues adding a state that is a list of enums. I am sure most of my problems lie within the onCreateDrawableState call so I have a few questions. 1) Is the extraSpace param to onCreateDrawableState the number of additional int[] that I would like to add or the size of the int[]? So since I am just adding MODE I should just be increasing extraSpace by 1 and not by MODE.length? 2) I don't quite understand the mergeDrawableStates method. If I put it in an IF statement I am getting what I expect, but I think I am just getting lucky. I don't feel my IF check is correct. My initial assumption was that I don't do a check and always call mergeDrawableStates but then the drawable never changes. I have seen where if the extra state is a boolean then the if statement checks for that. I don't quite know what to do about an enum. 3) When I do get it working, my ic_button_a is drawn correctly. However every time when ic_button_c is getting drawn, ic_button_c is resized and stretch to fit the View which includes a background graphic that is larger than ic_button_c. ic_button_a and ic_button_a are the same size. I have my custom view: com.pkg.CustomView android:background=@drawable/**ic_button_bg android:src=@drawable/ic_**button android:layout_height=wrap_**content android:layout_width=wrap_**content/ which extends ImageButton.: public class CustomView extends ImageButton { private static final int[] MODE = {R.attr.mode}; private int mMode = 1; @Override public int[] onCreateDrawableState(int extraSpace) { final int[] drawableState = super.onCreateDrawableState(**extraSpace + 1); if (mMode != 0) { mergeDrawableStates(**drawableState, MODE); } return drawableState; } public void setMode(int mode) { mMode = mode; refreshDrawableState(); } } I am defining my modes here: resources declare-styleable name=CaptureButton attr name=mode enum name=a value=0 / enum name=b value=1 / enum name=c value=2 / enum name=d value=3 / enum name=e value=4 / enum name=f value=5 / enum name=g value=6 / enum name=h value=7 / /attr /declare-styleable /resources My @drawable/ic_button is: selector xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android xmlns:app=http://schemas.**android.com/apk/res/com.pkghttp://schemas.android.com/apk/res/com.pkg item app:mode=c android:drawable=@drawable/**ic_button_c / item android:drawable=@drawable/**ic_button_a / /selector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to improve performance for drawing with background image?
Hi, Can you points me to any codes I can read regarding setting up background this way? Thanks! On Friday, July 6, 2012 10:09:08 AM UTC+8, Nobu Games wrote: Did you also try drawing directly into the background image bitmap? Make it a mutable bitmap, wrap that bitmap into a Canvas object and use that instead. Maybe that speeds things up a bit, because Android doesn't need to blend two views / layers all the time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] What is the max length of the purchaseToken field in the returned JSON of a subscription item (In-App Billing API 2)
Hi All, I am trying to find out what is the maximum length of the purchaseToken field within the returned JSON string when a subscription item is purchased through the In-App Billing? This new field was introduced recently with the support of in-app subscriptions. I am saving that field in a database and would like to know its maximum possible length. Google seems to have left out that small detail out of the documentation. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en