[android-developers] Re: Allocation too large for this process
Well Mike, I don't know either, but just remember from my own app that I too had a zillion unexplained Clamp target GC heap messages at that 16 MB limit (while my app definitely needs far less memory than that), until I got rid of Drawables altogether. It could have been a coincidence, but together with the report from a Google Android Team member that http://groups.google.com/group/android-developers/browse_thread/thread/4ed17d7e48899b26/ this is a known bug (without being more specific) and his Drawable- free workaround it suggested that this could be related to your problem. Of course there are plenty of other things that could be wrong... This is for an ImageSwitcher, so I need a Drawable of some sort I have never used ImageSwitcher myself (Android seems to often offer at least three totally different ways to do the same thing, which is nice if two-out-of-three are still too buggy for deployment g). Yet to avoid Drawables there I could imagine trying ImageSwitcher.setImageURI(new ContentURI(/data/data/mypackage/files/ myimage.jpg)) if the image is in internal flash, or ImageSwitcher.setImageURI(new ContentURI(/sdcard/mypath/ myimage.jpg)) when loading from SD card. Just my two cent guess. Regards On Nov 15, 7:57 am, EboMike [EMAIL PROTECTED] wrote: Hey blind, you're right, I'm using Drawables -- BitmapDrawables, to be precise. This is for an ImageSwitcher, so I need a Drawable of some sort (since I'm loading jpeg images off the storage device, so I can't use resources). I've tried BitmapFactory.decodeFile() instead of BitmapDrawables constructor that takes a String, but I get the same result, except that the OutOfMemoryException is now in BitmapFactory.decodeFile() itself instead of a cryptic callstack like before. I also call the gc right before creating the Bitmap... and the TTY is kind of interesting: 06:50:43.970: INFO/dalvikvm-heap(6039): Clamp target GC heap from 17.019MB to 16.000MB 06:50:43.990: DEBUG/dalvikvm(6039): GC freed 8139 objects / 927224 bytes in 171ms 06:50:45.271: ERROR/dalvikvm-heap(6039): 38400-byte external allocation too large for this process. 06:50:45.271: ERROR/(6039): VM won't let us allocate 38400 bytes 06:50:45.280: DEBUG/skia(6039): allocPixelRef failed The gc freed 927KB, and then cannot allocate 38KB? Um, what? -Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
Applications have a hard limit of 16 MB. As for the other bug you mention, it has nothing to do with memory usage; the implementation of BitmapFactory that reads images from URL will fail over slow connections. Besides, when you load a Drawable from the resources, it simply calls the BitmapFactory to decode the resource anyway. If you hit an out of memory exception, your app *is* using too much memory (which you might very well be leaking, it's not that hard, especially if you use static fields in your code.) You can use DDMS and its allocation tracker, as well as its various GC/heap monitors to see when and how your application is allocating so much memory. I have run myself into this issue several times over the past 18 months and every time, the application was leaking something (especially on screen rotation.) On Sat, Nov 15, 2008 at 12:55 AM, blindfold [EMAIL PROTECTED] wrote: Well Mike, I don't know either, but just remember from my own app that I too had a zillion unexplained Clamp target GC heap messages at that 16 MB limit (while my app definitely needs far less memory than that), until I got rid of Drawables altogether. It could have been a coincidence, but together with the report from a Google Android Team member that http://groups.google.com/group/android-developers/browse_thread/thread/4ed17d7e48899b26/ this is a known bug (without being more specific) and his Drawable- free workaround it suggested that this could be related to your problem. Of course there are plenty of other things that could be wrong... This is for an ImageSwitcher, so I need a Drawable of some sort I have never used ImageSwitcher myself (Android seems to often offer at least three totally different ways to do the same thing, which is nice if two-out-of-three are still too buggy for deployment g). Yet to avoid Drawables there I could imagine trying ImageSwitcher.setImageURI(new ContentURI(/data/data/mypackage/files/ myimage.jpg)) if the image is in internal flash, or ImageSwitcher.setImageURI(new ContentURI(/sdcard/mypath/ myimage.jpg)) when loading from SD card. Just my two cent guess. Regards On Nov 15, 7:57 am, EboMike [EMAIL PROTECTED] wrote: Hey blind, you're right, I'm using Drawables -- BitmapDrawables, to be precise. This is for an ImageSwitcher, so I need a Drawable of some sort (since I'm loading jpeg images off the storage device, so I can't use resources). I've tried BitmapFactory.decodeFile() instead of BitmapDrawables constructor that takes a String, but I get the same result, except that the OutOfMemoryException is now in BitmapFactory.decodeFile() itself instead of a cryptic callstack like before. I also call the gc right before creating the Bitmap... and the TTY is kind of interesting: 06:50:43.970: INFO/dalvikvm-heap(6039): Clamp target GC heap from 17.019MB to 16.000MB 06:50:43.990: DEBUG/dalvikvm(6039): GC freed 8139 objects / 927224 bytes in 171ms 06:50:45.271: ERROR/dalvikvm-heap(6039): 38400-byte external allocation too large for this process. 06:50:45.271: ERROR/(6039): VM won't let us allocate 38400 bytes 06:50:45.280: DEBUG/skia(6039): allocPixelRef failed The gc freed 927KB, and then cannot allocate 38KB? Um, what? -Mike -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
Thank you for your clarification, Romain! That is very helpful. I was initially using a fixed final Drawable array for my switching background images, and did not find any reason for memory leaks while I did not have to wait long for hitting the heap limit, but I am aware that it is easy to overlook such things. Even though my PNG background images together take only about 35 KB on disk, the decompressed versions will of course eat a lot more. Yet after moving over to using a final Bitmap array for the same image set I had far less memory related problems, and to further minimize memory usage I later changed to loading images one by one by doing a BitmapFactory.decodeResource (getResources(),) dynamically, only for the active background image. DDMS currently indicates zero leakage for my app, but I do not know how this was for my older breaking versions, because (at that time being unfamiliar with DDMS) I initially had trouble getting the heap info display to update. I hope Mike can do some allocation tracking like you indicate, and playing with some alternative implementations may help narrow down the possible causes of his problems, which may be entirely different from mine (and the one in the other thread). Thanks On Nov 15, 10:01 am, Romain Guy [EMAIL PROTECTED] wrote: Applications have a hard limit of 16 MB. As for the other bug you mention, it has nothing to do with memory usage; the implementation of BitmapFactory that reads images from URL will fail over slow connections. Besides, when you load a Drawable from the resources, it simply calls the BitmapFactory to decode the resource anyway. If you hit an out of memory exception, your app *is* using too much memory (which you might very well be leaking, it's not that hard, especially if you use static fields in your code.) You can use DDMS and its allocation tracker, as well as its various GC/heap monitors to see when and how your application is allocating so much memory. I have run myself into this issue several times over the past 18 months and every time, the application was leaking something (especially on screen rotation.) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Where can I find MapActivity source as well as the whole package com.google.android.maps?
Sorry, maps is proprietary to Google and not available as open source. On Nov 14, 9:06 pm, Obormot [EMAIL PROTECTED] wrote: Hi, everyone. I'd like to learn how the routing is implemented in the default MapActivity used to display google maps. Unfortunately, I don't see the source anywhere. Could you please point me to the right direction so I could find the sources? Thank you in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
I forgot to mention that on the emulator I never had memory trouble even with my older versions: my app would run for over 1,300 iterations without ever crashing whereas the G1 would crash with some OutOfMemoryError within 10 to 20 iterations. However, the camera part is of course very different for emulator and G1, so I cannot exclude the possibility that in my case the main problems originated there since it is now known that G1 camera programming must be done with white gloves. I did and do not have a G1 to look at possible memory leaks on the physical device. On Nov 15, 10:30 am, blindfold [EMAIL PROTECTED] wrote: Thank you for your clarification, Romain! That is very helpful. I was initially using a fixed final Drawable array for my switching background images, and did not find any reason for memory leaks while I did not have to wait long for hitting the heap limit, but I am aware that it is easy to overlook such things. Even though my PNG background images together take only about 35 KB on disk, the decompressed versions will of course eat a lot more. Yet after moving over to using a final Bitmap array for the same image set I had far less memory related problems, and to further minimize memory usage I later changed to loading images one by one by doing a BitmapFactory.decodeResource (getResources(),) dynamically, only for the active background image. DDMS currently indicates zero leakage for my app, but I do not know how this was for my older breaking versions, because (at that time being unfamiliar with DDMS) I initially had trouble getting the heap info display to update. I hope Mike can do some allocation tracking like you indicate, and playing with some alternative implementations may help narrow down the possible causes of his problems, which may be entirely different from mine (and the one in the other thread). 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADB via USB
Dan Pou wrote: There seems to be some problems with udev matching the rules. I don't seem to get a match looking at `/sbin/udevadm test` on the device. Can someone who adb works without root permission copy some output from these commands? udevadm test /sys/class/usb_device/usbdev7.13/ where 7.13 is replaced with the results of: lsusb |grep 'High Tech' (mine says Bus 007 Device 013: ID 0bb4:0c02 High Tech Computer Corp.) There is no /sys/class/usb_device on Ubuntu 8.04 on my PC. The closest match to what you're seeking is /sys/class/usb_endpoint, but then I have five entries of possible relevance: usbdev4.10_ep00 usbdev4.10_ep01 usbdev4.10_ep02 usbdev4.10_ep81 usbdev4.10_ep82 udevd --version reports 125 for me 117 here. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Interested in LBS AR? Android Developer Needed
I already have a the start of an alpha framework called delivery to allow me to bridge OSevents to webview. You actually need said framework to develop Brightkite using the WebView..as Googl e did not make their framework that they use for the Gmail client accessible. Maybe that might be why Fred Wilson agreed to see one of my demos? On Nov 13, 7:38 pm, Brightkite [EMAIL PROTECTED] wrote: Looking for an Android developer to join our mobile development team. Feel at home on Facebook Twitter? Like tackling tough groundbreaking problems? Interested in location based services augmented reality? We’d like to meet you! What can we provide to you? A decent hourly rate, a flexible schedule. Must be able work at least part-time from our Denver offices. If you’re interested, send us an email: [EMAIL PROTECTED] Learn more about us at blog.brightkite.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: File Browser
You can't read most of the G1 files whether you can in the emulator... On Nov 15, 5:20 am, 心蓝 [EMAIL PROTECTED] wrote: in my program can display all the file! 2008/11/15 Sunit Katkar [EMAIL PROTECTED] Can you share your code? On Thu, Nov 13, 2008 at 9:40 PM, Chihau Chau [EMAIL PROTECTED] wrote: I have programmed a File Browser for android and this display the root directory content then it's que next /sqlite_stms_journals /cache /sdcard /etc /system /sys /sbin /proc /init.rc /init.goldfish.rc /init /default.prop /data /root /dev but I have seen the DDMS File explorer and this display only 3 directories: /data /sdcard /system who can explain me that? -- Chihau Chau -- - Sunit Katkar http://sunitkatkar.blogspot.com/- Android OS Tutorials -- Welcome to my site about GPhone:http://51gphone.cn I am a GFans!!欢迎你来到我的GPhone网站!!http://51gphone.cn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListActivity and progressbars?
I have simular issues with TabActivity. On Nov 14, 7:00 pm, aadamson [EMAIL PROTECTED] wrote: I've about pulled out my hair over this one. Not that it's a huge deal, but I would like to know why this doesn't work? I have a main class that extends listactivity. In it's oncreate method, I issue the appropriate Window.Progress usage function call. In the locations in the code where I want the progress bar in the title, I call the progressbar function with true or false in it's parameter list. However, the progress bar, never shows up. Below is the shortened code for example. It appears that because this is a listactivity, that the listview doesn't respond to the call for the progress display, even tho listactivity says it supposts the methods. I also tried this with the showDialog version and the same thing happend, I never get a dialog. So, I must be doing something wrong, any takers? Thanks in advance, Alan public class StockApp extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); // If no data was given in the intent (because we were started // as a MAIN activity), then use our default content provider. Intent intent = getIntent(); if (intent.getData() == null) { intent.setData(Stock.CONTENT_URI); } // Inform the list we provide context menus for items getListView().setOnCreateContextMenuListener(this); // Perform a managed query. The Activity will handle closing and requerying the cursor // when needed. mCursor = managedQuery(getIntent().getData(), PROJECTION, null, null, Stock.DEFAULT_SORT_ORDER); // Used to map stock entries from the database to views SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.main, mCursor, new String[] { Stock.SYMBOL, Stock.PRICE, Stock.DAY, Stock.NAME }, new int[] { R.id.stock_symbol, R.id.stock_price, R.id.stock_day, R.id.comp_name }); setListAdapter(adapter); refreshStock(); } private void refreshStock() { Uri mUri = getIntent().getData(); mCursor.moveToFirst(); int symbol_column = mCursor.getColumnIndex(Stock.SYMBOL); int id_column = mCursor.getColumnIndex(Stock._ID); setProgressBarIndeterminateVisibility(true); do { // do some processing which takes a few seconds } while (mCursor.moveToNext()); setProgressBarIndeterminateVisibility(false); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Html5 Client-Side Storage support for android
This is not supported in the current version of Android. Cheers, JBQ On Sat, Nov 15, 2008 at 4:35 AM, Matteo Crippa [EMAIL PROTECTED] wrote: Just a little question, i tried to find this information but with no luck atm. Is Html5 Client-Side Storage supported by Android browser? If you own an Android mobile you to test it @ http://webkit.org/misc/DatabaseExample.html Let me know! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADB via USB
There is no /sys/class/usb_device on Ubuntu 8.04 on my PC. Whoops, i forgot to mention my kernel version Debian 2.6.26-1-amd64 We may be running different versions of sysfs - I see the endpoints too, but none of the usbdevX.XX_epXX/dev seem to correlate with the usb_device under my tree. Out of curiousity, what does udevinfo -q path -n /dev/bus/usb/004/010 print? I am assuming you have procbususb mounted. Mine points to the usb_device (it increments every time I plug in). The closest match to what you're seeking is /sys/class/usb_endpoint, but then I have five entries of possible relevance: usbdev4.10_ep00 usbdev4.10_ep01 usbdev4.10_ep02 usbdev4.10_ep81 usbdev4.10_ep82 udevd --version reports 125 for me 117 here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADB via USB
Ok, so now I get it, I just had to follow the Dapper rule in the adb docs. http://androidcommunity.com/forums/f4/how-to-install-apps-using-adb-4482/ Since my system makes a usb_device, that is the subsystem rule I have to use, instead of usb. I guess Ubuntu removed procbususb in newer versions (I found a lot of reports of VMware failing because of dependency) About the procbususb, to check, run `mount |grep procbus` to see if you have it mounted. So the moral of the story would be to add both rules if you are not sure. That is at least more restrictive than using sudo/root. My personal prefence is to add android group and keep 0664 mode, then add users to adroid group. Thanks for the help. On Sat, Nov 15, 2008 at 9:22 AM, Mark Murphy [EMAIL PROTECTED]wrote: Dan Pou wrote: Whoops, i forgot to mention my kernel version Debian 2.6.26-1-amd64 Linux 2.6.24-19-generic Out of curiousity, what does udevinfo -q path -n /dev/bus/usb/004/010 print? It's now 004/011 after having unplugged and replugged the G1 in. /devices/pci:00/:00:1d.7/usb4/4-1/4-1.4/4-1.4.3 I am assuming you have procbususb mounted. *shrugs shoulders* Whatever the Ubuntu 8.04 default is, I suppose. I don't recall fussing with it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL Hardware Acceleration in G1
Android supports OpenGL ES, which is a subset of the OpenGL API. On Nov 14, 7:59 pm, Romain Guy [EMAIL PROTECTED] wrote: Yes. :) On Fri, Nov 14, 2008 at 10:39 AM, razialx [EMAIL PROTECTED] wrote: I have not been able to find anything definitive on this yet, despite searching. Does the G1 support hardware acceleration for OpenGL? Thank you, Tim -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to disable image shrinking for setBackgroundDrawable
I am calling setBackgroundDrawable(Drawable d) and it always scale (by shrinking) my background image to fit the screen (my drawable is big). How do I make it just crop out the proper size from my drawable instead? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to disable image shrinking for setBackgroundDrawable
Hi, Just set the drawable's gravity to Gravity.CENTER for instance. On Sat, Nov 15, 2008 at 10:29 AM, j [EMAIL PROTECTED] wrote: I am calling setBackgroundDrawable(Drawable d) and it always scale (by shrinking) my background image to fit the screen (my drawable is big). How do I make it just crop out the proper size from my drawable instead? -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to disable image shrinking for setBackgroundDrawable
But the Drawable class does not have a setGravity method... only the Layout classes have setGravity method. I am setting the background of a ListView. On Nov 15, 11:07 am, Romain Guy [EMAIL PROTECTED] wrote: Hi, Just set the drawable's gravity to Gravity.CENTER for instance. On Sat, Nov 15, 2008 at 10:29 AM, j [EMAIL PROTECTED] wrote: I am calling setBackgroundDrawable(Drawable d) and it always scale (by shrinking) my background image to fit the screen (my drawable is big). How do I make it just crop out the proper size from my drawable instead? -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: CRT Monitors
Yeah man. There is no way the SDK knows about any sort of physical attributes of your monitor other than what resolution it is currently displaying and how fast the refresh rate is. On Nov 15, 1:43 am, Dan B. [EMAIL PROTECTED] wrote: there is no connection between the SDK and your monitor... what kind of problem are you having exactly? On Nov 14, 4:30 pm, Amonre [EMAIL PROTECTED] wrote: Are there any known issues between the Android SDK and CRT [box-style] monitors? The potentially problematic monitor is approximately 5 years old and part of a Dell system. Dell used non-standard power schemes during that time period, not sure if they still do, which *might* be conflicting with the SDK's expectations (i.e. more juice than resistors can handle). I'm not a guru in this field, so there's a decent chance that the problem is unrelated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
Hi Romain, I don't know what you're doing with the Camera but a picture coming from the Camera uses several MB of memory so... In part for this reason I normally use the camera preview mode, which on the T-Mobile G1 takes only 3 * 480 * 320 / 2 ~= 230 KB per image, so no memory problem there, and even when expanding this into an integer pixel array for further image processing it would still be a manageable 480 * 320 * 4 ~= 614 KB. However, for my purposes I need only 64 x 64 pixel views, such that sub-sampling during YUV411 decoding and prior to further image processing keeps the extra memory use (on top of G1's hard-coded 230 KB preview data) far below this 614 KB (namely just 64 * 64 * 4 ~= 16 KB). The uncompressed still images from takePicture() are indeed several MB by default because of G1's 2048 * 1536 pixel snapshots, or about 6 MB when mapping to an RGB_565 bitmap. In fact it is one of the still unanswered questions which still image resolutions are supported by the G1. There is of course the heap-devouring 2048 * 1536, and experimentally it was determined that 480 * 320 also works (I tested that yesterday together with another developer who has a G1), but we have no comprehensive and authoritative list of supported resolutions to make proper trade-offs with memory use, while Android (SDK 1.0 r1) has no API for querying the camera about supported resolutions. The latter makes that Android-based camera applications cannot be made future-proof for when other Android phones with other cameras hit the market. I find this a serious concern as I have expressed on multiple occasions. Thank you for your further explanation about the internals of Drawable. I cannot be sure if my getting rid of using Drawable was indeed the reason that all my heap problems vanished, but your explanation further encourages me not to touch it with a stick unless I fully understand what I am doing - or what Android is doing. :-) Peter On Nov 15, 8:10 pm, Romain Guy [EMAIL PROTECTED] wrote: I don't know what you're doing with the Camera but a picture coming from the Camera uses several MB of memory so... One issue with Drawable is that they have a Callback pointer to a View. That means if you keep your Drawable in a static field (directly or indirectly), you forever keep a reference to a View. And that View has a reference to the Context (your Activity), which has references to all the widgets and resources on the current screen. That makes it very easy to blow up the heap :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Content of ViewGroup in SurfaceView
Hi, all! How can I draw the content of ViewGroup in SurfaceView? I don't see anything at screen. I use the extended class AbsoluteLayout from ViewGroup. My pseudo code likes this: ... class SomeView extends View { public SomeView(Context context) { super(context); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(34, 34); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setColor(Color.RED); canvas.drawRect(0, 0, getWidth(), getHeight(), paint); } } ... AbsoluteLayout layout = new AbsoluteLayout(context); layout.addView(new SomeView(context), new AbsoluteLayout.LayoutParams (35,35, 100,100)); ... SurfaceHolder holder = surface.getHolder(); ... // In some thread with SurfaceHolder I do: public void run() { while (running) { Canvas canvas = null; try { canvas = holder.lockCanvas(null); synchronized (holder) { layout.draw(canvas); } } finally { if (canvas != null) { holder.unlockCanvasAndPost(canvas); } } } } ... I don't understand why this code don't show anything. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Change layout for different orientation
I was hoping someone might guide me in the best direction. I want to apply a different layout depending on the orientation of the phone. For example, when the keyboard is closed, I want to apply main_vertical.xml. When its in landscape, main_landscape.xml. What is the best way to do 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Change layout for different orientation
Hi, You currently have a layout in res/layout/main.xml. Simply create another layout in res/layout-land/main.xml and that's it! res/layout is the default configuration, but you can use layout-port for portrait orientation, layout-land for landscape, layout-fr for a layout when the phone is in French, layout-land-stylus for a layout in landscape on screens that work with a stylus, etc. All the possible attributes are listed at the end of this document: http://code.google.com/android/devel/resources-i18n.html On Sat, Nov 15, 2008 at 1:08 PM, hodg [EMAIL PROTECTED] wrote: I was hoping someone might guide me in the best direction. I want to apply a different layout depending on the orientation of the phone. For example, when the keyboard is closed, I want to apply main_vertical.xml. When its in landscape, main_landscape.xml. What is the best way to do this? -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Change layout for different orientation
hodg wrote: I was hoping someone might guide me in the best direction. I want to apply a different layout depending on the orientation of the phone. For example, when the keyboard is closed, I want to apply main_vertical.xml. When its in landscape, main_landscape.xml. What is the best way to do this? Put the portrait one in res/layout. Put the landscape one in res/layout-land. Name them both the same (e.g., main.xml). And, *poof*, it works. I have three recent blog posts up on AndroidGuys, covering how to handle rotation events. Here's the third, which has links to the first two: http://androidguys.com/?p=2723 -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Including SQLite database with application
Hi everyone. I'm writing an application that uses an SQLite database. The data is not going to be different between one device or another, and it does not need to be changed by the program at any point. I'm unable to find how I can ship my database with my application. There are a few old threads about it, but they all deal with old versions, and none of them (that I've found) are what you'd call conclusive. Most of them just stop without any answers. I don't really want to populate the database at the first run, it just seems a bit pointless when I could prevent this time consuming activity by including a pre-populated db. Thanks for reading, regards, Stuart. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADB via USB
On Nov 14, 12:05 pm, willfe [EMAIL PROTECTED] wrote: Try creating a file called /etc/udev/rules.d/50-android.rules and plugging the following line into it: SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 Reload udev's configuration (/etc/init.d/udev reload) and try again as a normal user. Isn't that the exact same set of instructions I'm saying don't work? I've done all that. There is still a permissions problem unless I run the adb server as root. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse Plug-in Site down?
Same problem. The Eclipse says No repository found at https://dl-ssl.google.com/android/eclipse/.; On Nov 14, 1:25 pm, Steve918 [EMAIL PROTECTED] wrote: I'm getting a 404 when I try to install the eclipse plugin from: https://dl-ssl.google.com/android/eclipse/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Including SQLite database with application
Stu wrote: I'm unable to find how I can ship my database with my application. I don't really want to populate the database at the first run, it just seems a bit pointless when I could prevent this time consuming activity by including a pre-populated db. AFAIK, applications are not unpacked from the APK when installed, and SQLite has no notion of working with a database file given just an InputStream, which is all you can get for things packed in your APK. I am only aware of three options: 1. Bundle a database as either an asset/ or a res/raw/, then use appropriate methods to get an InputStream on the database, and copy it somewhere where you can read/write to. I'm uncertain as to whether this approach is a good idea. 2. Use the sqlite3 console utility (or an equivalent tool) to dump the database a set of SQL statements required to rebuild it. Bundle that file with your application (e.g., in res/raw/) and execute that script on first run. This may feel pointless, but done properly, you can integrate all this into your build process, so you don't, as a developer, have to deal with anything -- you just edit your master database copy on your development PC. 3. Use the classic approach of just populating the tables yourself in Java code as part of creating the database. If the table is bigger than a few rows, I'd probably go with #2. But, that's just me. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Including SQLite database with application
Hi Mark, thanks for your help. I guess I'll just have a play around with a couple of those suggestions and see which one works for me. :) Regards, Stuart. On Nov 15, 9:57 pm, Mark Murphy [EMAIL PROTECTED] wrote: Stu wrote: I'm unable to find how I can ship my database with my application. I don't really want to populate the database at the first run, it just seems a bit pointless when I could prevent this time consuming activity by including a pre-populated db. AFAIK, applications are not unpacked from the APK when installed, and SQLite has no notion of working with a database file given just an InputStream, which is all you can get for things packed in your APK. I am only aware of three options: 1. Bundle a database as either an asset/ or a res/raw/, then use appropriate methods to get an InputStream on the database, and copy it somewhere where you can read/write to. I'm uncertain as to whether this approach is a good idea. 2. Use the sqlite3 console utility (or an equivalent tool) to dump the database a set of SQL statements required to rebuild it. Bundle that file with your application (e.g., in res/raw/) and execute that script on first run. This may feel pointless, but done properly, you can integrate all this into your build process, so you don't, as a developer, have to deal with anything -- you just edit your master database copy on your development PC. 3. Use the classic approach of just populating the tables yourself in Java code as part of creating the database. If the table is bigger than a few rows, I'd probably go with #2. But, that's just me. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] limitation on ExpandableListView
It seems one can only set one group indicator for the ExpanableListView. Shouldn't there be at least 3 of them?: 1. groupindicator when there is no child 2. groupindicator when the item is collapsed, and has children 3. groupindicator when the item is expanded Any Android coders who can comment on whether this is reasonable, and when will it be added to the SDK? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there a way to build route using MapActivity?
Hi, everyone. I'm wondering if it's possible to build a route with MapActivity? I know that it used to be an API for that, but it's not supported in the latest SDK. I also know that by providing specific data URI it's possible to launch google maps on the phone with the route in it. However, I would need to stay in my own activity and still being able to display the route somehow. Is it at all possible now? Thank you in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Issue with installing ADT for Eclipse Ganymede 3.4
I don't :( Work on windows for this. On 28 oct, 00:42, Rich [EMAIL PROTECTED] wrote: I'm getting this error now. Also usingUbuntu, Sun-Java-6. Ever solve this,Frantz? =/ On Oct 5, 5:23 pm, Fräntz Miccoli [EMAIL PROTECTED] wrote: Nobody has an idea ? On 4 oct, 14:42, Fräntz Miccoli [EMAIL PROTECTED] wrote: Yeah, i've realized after post that the problem wasn't the same. I've tried to use the archive in order to install and i got this when I'm trying to make a new Android project : Plug-in com.android.ide.eclipse.adtwas unable to load class com.android.ide.eclipse.adt.project.internal.NewProjectWizard. An error occurred while automatically activating bundle com.android.ide.eclipse.adt(581). When I want to set the parameters of the plugin I got a new error : Unable to create the selected preference page. An error occurred while automatically activating bundle com.android.ide.eclipse.adt(581). Any idea around all this problem ? I found nothing around troubleshooting that could be helpful Thank you Fräntz On 4 oct, 14:18, Charlie Collins [EMAIL PROTECTED] wrote: The issue with updating via the update site is different. For that one, make sure you have tried the troubleshooting steps in the install doc: http://code.google.com/android/intro/installing.html. Note that if you can't get to the update site, you can usually still download the plugin locally and install it as a local archive (see the troubleshooting section). On Oct 4, 7:21 am, Fräntz Miccoli [EMAIL PROTECTED] wrote: I got the same problem... The path given on android website is :https://dl-ssl.google.com/android/eclipse/ This give me an error in my firefox browser, is this a problem that came from google's server ? On 20 sep, 04:04, Trevor [EMAIL PROTECTED] wrote: I'm having this issue as well, only after having installed everything just today to start developing. UsingUbuntuHardy Eclipse SDK Version: 3.2.2 Build id: M20070212-1330 (Ubuntuversion: 3.2.2-5ubuntu2) Update Manager for Eclipse also seems to be taking an eternity to run as well. Perhaps the issues are linked? On Sep 19, 2:35 am, Sidhartha [EMAIL PROTECTED] wrote: Hi All, I am trying to insatll theADTplug-in for Eclipse Ganymede 3.4 using the archive path. I had provided the archive for installing theADT. It gives me an error stating some resource files are missing. When i try to create a new project i get the following error: The selected wizard could not be started. Plug-in com.android.ide.eclipse.adtwas unable to load class com.android.ide.eclipse.adt.project.internal.NewProjectWizard. com/android/ide/eclipse/adt/project/internal/NewProjectWizard (Unsupported major.minor version 49.0) This was working till Sep 17th, not sure i some new version's been released. Could someone provide some pointers as how to solve this issue. Thanks, Sidhartha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem accessing r.drawable.somestuff
Eclipse tells me that there's an error but I can't see where it is ... It said that in the following code the drawable ressource cannot be resolved. v.setImageDrawable(MyApp.getInstance().getResources().getDrawable (R.drawable.t01)); But t01.png is in the good folder and Eclipse shows it in the project browser. It is also referenced in the R.java file... If anyone can help me. Have a good day. Fräntz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] using StAX API in an Android application
I'd like to use the StAX API (also known as JSR-173) in an Android application javax.xml.stream javax.xml.stream.events javax.xml.stream.util Are there any plans to add these to the core platform? Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Write PNG to PIcture Directory (FileOutputStream)
Hello all, How can I write an image so that it shows up under 'Pictures'? I've got a FileOutputStream like this: --Mypic is a valid bitmap. try { FileOutputStream stream = super.openFileOutput(picture.png, MODE_PRIVATE); Mypic.compress(CompressFormat.PNG, 100, stream); stream.flush(); stream.close(); }catch(Exception e) {Log.e(MyLog, e.toString()); } Any help is appreciated. Josh Beck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Write PNG to PIcture Directory (FileOutputStream)
Actually, that code above isn't quite correct. I am writing png files to the sdcard with no problem. I'd like them to show up when the user chooses wallpaper - Pictures or camera - menu - Pictures. Are those displays databased or something? Thanks again, Josh Beck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse Plug-in Site down?
Just remove the s and get it http// instead of https// On Nov 15, 2008 3:57 PM, Hong Ji [EMAIL PROTECTED] wrote: Same problem. The Eclipse says No repository found at https://dl-ssl.google.com/android/eclipse/.; On Nov 14, 1:25 pm, Steve918 [EMAIL PROTECTED] wrote: I'm getting a 404 when I try to i... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Exchange Server Support
It appears the Big hurdle right now... is a bug in org.apache.harmonyx, which is completely stalling my progress... I cannot seem to find a work-around for a non-root ssl cert. In the meantime, Im setting up a local exchange server, that i can disable ssl on... so i can get on to the heart of this project =P at that point, whenever the bug in harmonyX gets fixed... it should just work =P On Nov 13, 11:03 pm, davin_thompson [EMAIL PROTECTED] wrote: Im about to have a look into that one, and see how he got past the hurdle im currently stuck on. it seems that java.net has NTLM authentication, but has no way to implment propfind and search requests. org.apache.http is extensable, and i have propfind and search working there, but no NTLM. Once i get past that hurdle, the rest of it should just be a porting job On Nov 13, 4:21 am, Timbobsteve [EMAIL PROTECTED] wrote: I am currently looking @ another OpenSource project called ExchangeIt (available in the Market). Brian has got the beginnings of a Java WebDAV connection happening on Android. I am going to review the code and see where we can go from there. Hopefully, depending on time, Brian will also come on-board if we get project off the ground. FYI, source is @http://code.google.com/p/exchangeit Regards, Timbobsteve davin_thompson wrote: Unfortunatly... Im not very good with with java... but I'm working on it. However, prepairing for this project, I have written anexchange webdav client in php, so I solidly have the concept. Hopefully, in a few days, i'll have something working in java (so far I've made it to a basic http request =P). Wish me luck, and i'll share my results On Oct 17, 11:12 am, Timbobsteve [EMAIL PROTECTED] wrote: Hi Zero, For what it's worth I can supply my time and effort to anExchangeclient/library. From what I can see most of the opensource stuff on MAPI is limited toExchange2000. Most other implementations accessExchangethrough Outlook Web Access (OWA) + WebDAV. I will read up on using WebDAV and then we can look into getting an Android WebDAV client library in place. I'm not the best programmer, but everyone starts somewhere right? Cheers. zero wrote:if there would be a group of developers willing to build an opensource implementation of MAPI for java, i'd be happy to contribute. but it's way to huge to tackle it alone. at least, for me. there's propably a few other ways, like webdav, to connect toexchange, but they differ in stability, and clearly an opensource mapi implementation would be way more elegant. zero openintents.org zeroblog.exu-mobile.com On Oct 17, 1:20 pm, Timbobsteve[EMAIL PROTECTED]wrote:Hi All, This isn't another thread asking ifexchangeserver is supported on Android... so don't worry :P I just wanted to start a dialog with other developers about how to possibly tackle the MSExchangesupport issues on Android. I'm not the best coder in the world, so I can't really provide example code or anything, but this is more of a discussion-type thread. From what I can tell, my iPhone uses WebDAV to connect toExchangeto get mail (correct me if I'm wrong). So I started looking @ opensource implementations of Java WebDAV clients and came across Apache SLIDE Server and Client. Unfortunately Slide has been discontinued. There is not that it was replaced by Apache JackRabbit, but from what I can see JackRabbit is a Server implementation of WebDAV technologies. I was also searching for Java MAPI support, but a lot of the MAPI APIs for Java are closed-source and licensed... which is not good IMHO. What other options forexchangesupport do people see? Do you think it is a worthwhile pursuit? Do you think it will happen and will it be a paid-for product on AndroidMarket, or will someone make an open-source client? There is a lot of reading to be done on WebDAV and how it integrates intoExchange... so I am going to start doing some reading. Feel free to share your ideas and thoughts.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: there is no ViewInflate in sdk 1.0?
View.inflate()? On Nov 15, 8:22 pm, Andrew [EMAIL PROTECTED] wrote: In Android sdk 1.0, I can't find the class ViewInflate. Then how can I load a view from the xml? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to import a new CA certificate
Having a very similar issue... I really think we need to create some form of a global keystore import app idealy... or, fix the AllowAllHostnameVerifier() method at least. Im still digging to try to make a successfully connection on an invalid cert... On Oct 20, 3:59 am, vel [EMAIL PROTECTED] wrote: Here is a way to configure to the SSLContext TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return acceptedIssuers; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { } } }; // Install the all-trusting trust manager try { sc = SSLContext.getInstance( TLS ); sc.init( null, trustAllCerts, new java.security.SecureRandom() ); HttpsURLConnection.setDefaultSSLSocketFactory( sc.getSocketFactory() ); } catch( Exception e ) { e.printStackTrace(); } Still i am not able to connect to any https connection even though checkServerTrusted method is called... java.io.IOException: Hostname sample.test.com was not verified can any one help me On Sep 24, 4:45 am, Megha Joshi [EMAIL PROTECTED] wrote: It is recommended to build an application-specific keystore with only the needed certificate(s) in it. If you have a specific server certificate you want to trust, even if it isn't part of a complete chain, put in into this store. Same for client certificates that might be need for authenticating the client. In the client application, configure the SSLContext appropriately. You could point either the key manager or the trust manager to your application store. There's a method that allows to load the keystore contents from a stream. 2008/9/8 maennel [EMAIL PROTECTED] Hi all, I am trying to connect with Android to a server which I develop myself. Now it should be possible to connect to that server using an encrypted connection (namely HTTPS). As I do not use this application in a commercial way I don't want to invest money to buy a real certificate. So, I try to test the system using a test certificate from thawte on server side. What happens: Because the CA that signed this test certificate is not stored on Android, it simply rejects the certificate and does not connect to the server by stopping the handshake procedure by a TCP-Fin-Ack. I tried to connect to other, public secured servers and there the connection is established without any problem (tests done with HttpClient and HttpMethod). Is there any possibility to add the two certificates (test intermediate CA test root CA) to the Android keystore in order to have an effect as if the certificate I use was a real one? Or does anybody knows if there are other possibilities to connect to test servers? Thank you for responding, maennel- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: there is no ViewInflate in sdk 1.0?
It's called LayoutInflater. On Sat, Nov 15, 2008 at 8:22 PM, Andrew [EMAIL PROTECTED] wrote: In Android sdk 1.0, I can't find the class ViewInflate. Then how can I load a view from the xml? -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---