[android-developers] Re: Emulator on Linux 10 times slower than on Windows
@Michael MacDonald: Seems like a good advice, but i my case didn't help neither. @arnouf: - I'm not sure what you mean by using the good environment x86 / 64. I tested this on x86 hardware and on x64 hardware, but always with a 32 Bit Linux. Is seems as if the host processor bits have no impact on the speed of emulation. - I don't think that my speed issues are somehow related to the JDK I'm using. The most simple test for speed goes like this: Start the host computer, start a clean emulator from a terminal, wait for the boot process to finish, and slide the drawer on the homescreen several times. This does not involve any code compiled by me, but already shows great differences in performance. Those host hardware configurations that are slow on sliding the drawer are also slow on anything else related to the emulator. @all: It seems as if my adb is crashing/hanging rather often, on all hardware systems I'm using. I'm going investigate this a little bit more. Thank you all for your advices and help. Brian On 7 Dez., 17:56, arnouf arnaud.far...@gmail.com wrote: I had this problem with Ubuntu 8.10, two things : - check that you're using the good environment x86 / 64 - use preferly the SUN JDK 1.6 to compile Android development (you can use the JDK 1.5 to work with sources). Today I'm using a bipro intel, 4Gb, Ubuntu 9.10 and SUN JDK 1.5.0.20 and performance are really good. BR On Dec 7, 5:49 pm, Michael MacDonald googlec...@antlersoft.com wrote: I've had bad Linux/hardware interactions with the emulator from audio. The emulator AFAIK uses the SDL audio libraries. Try starting the emulator from the command line with the -noaudio flag and see if that works better. brian.schim...@googlemail.com wrote: To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free shared buffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892 948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do
[android-developers] Emulator on Linux 10 times slower than on Windows
Hi there, I know that many people are complaining about slow emulator performance, and mostly it can't be helped because of slow hardware and the fact that emulators somehow have to be slow by definition because of the way they work. But something really puzzles me: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. Both systems (of course) use the same hardware, and on both I'm using SDK 1.6 with a 1.5 AVD without google additions, and the very same app that I'm developing. I used to have a very old Graphics card that I had to access through plain old VESA drivers on both XP and Ubuntu. Now I'm on a new hardware which uses a proper driver to access the graphics hardware, but the emulator on Ubuntu is still as slow as before, so I think this is not the bottleneck. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Emulator on Linux 10 times slower than on Windows
To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free sharedbuffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do you have? What is the output of running 'free' in Ubuntu from a shell? -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.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
[android-developers] ListView turns black when focused/selected, although I already set cacheColorHint to transparent
Hi there, first of all, sorry for always complaining about ListView. For standard tasks it works perfectly, but in my current project, it seems that I'm just pushing it beyond its limits sometimes, or maybe beyond the limits of my understanding :) My list, which contains transparent items, used to turn black on every scroll, so I followed the instructions on http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html This works fine for scrolling, and also looks great when there is no interaction with the map. (Before explaining my problem, a note on the wording: Normally I'm quite sure when to say focused and when to say selected, but when talking about ListView, I'm always confused which is which. So here's what I mean: When I use the keyboard/scrollwheel/scrollball to navigate through the list, and any item is visually highlighted) When a list item is focused/selected, the whole list turns black again. As soon as the focus switches to another View outside the ListView, or as soon as I enter Touch Mode again, the list is redrawn with perfect transparency. The whole list also turns black when I press down my finger / mouse cursor on one item. As soon as I lift my finger, its transparent again. Also, when I keep my finger pressend, and move it far enough to initiate scrolling, the list switches to transparent display. Here's part of my layout.xml: ListView android:layout_width=80px android:layout_height=fill_parent android:id=@+id/lvGroups android:layout_marginTop=8px android:layout_marginBottom=8px * android:alwaysDrawnWithCache=true android:cacheColorHint=# * android:scrollingCache=true android:scrollbars=none android:divider=@null android:dividerHeight=0px * android:choiceMode=none android:listSelector=# * android:addStatesFromChildren=false * android:duplicateParentState=true /ListView All the attributes which begin with a * (of course these * are NOT in my actual file) have something in common: I only partly understand their meand, I suspect that they might have something to do with the black-list-problem as well, and I (rather randomly) tried a lot of different value combinations in order to see if any of them solved the problem. Maybe I don't even need any of those. So is there any help for me, to avoid the list being black ever? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ListView: invisible dividers still take up space. Is it a bug or a feature?
I'm using a ListView with a custom ListAdapter and a custom Drawable as divider. My list contains active elements and passive ones as well. By default, the ListView draws a divider only between two active items. This is exactly what I want it to do, expect that ListView leaves dividerHeight pixles free space above and under eacht inactive item. Because my ListView has no background-graphic (which is on purpose and can't be changed) I see slices of the underlying Views through my list. If you have any dificulties imagining what this means, have a look at http://brianschimmel.de/divider.jpg I'm rather sure this is a Bug, but maybe it's the intended behaviour. I wanted to hear your opinion (as well as a workaround, if there is any) before filing a bug at b.android.com I can even imagine a reason for the behaviour as it is: If you wanted to make list items active/ inactive at runtime, the current implementation does not change the positioning of the items, while the behaviour I proposes would do. But I'm not sure if activatin/inactivating items is a real need. I'm thinking about not using the build in divider feature at all and inserting a special divider item between each two active items manually. I think this will fix it, too, but I'd rather like another solution. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Soft references freed too early
Hi there, I'm using a caching mechanism for some objects which have a small memory footprint but are computation expensive to instantiate. Also, I'm using a loop to prebuffer all those objects on application startup, so that they are already in my cache when my UI starts displaying them later. Right now, my objects are so few and so small that I might just keep them all in memory. I first coded my caching based on standard references and it worked just fine. But my objectsd might grow in size and/or number, so I started using java.lang.ref.SoftReference inside my cache so that they won't cause an OutOfMemoryException. I have to admit that I never used soft references before, but after reading I'm rather sure I understood them correctly. Actually, something like that happens: Object 1 is cached Object 2 is cached Object 3 is cached Object 4 is cached Object 5 is cached Objects 1 to 4 are cleared by the GC Object 6 is cached Object 7 is cached Object 8 is cached Object 9 is cached Objects 5 to 8 are cleared by the GC and so on. So each time the UI want to display e.g. Object 1, it's not in the cache and I must recostruct it which takes about 300ms. Because of this, my caching is completely pointless. I know that this is legal behavior for Soft References: The GC may or may not clear them when he encounters them, ideally dependant on the amount of free memory, and it must clear all of them before an out of memory exception is thrown. The only odd thing is, my memory is mostly free, the heap grows up to 3 MB but the GC keeps the real usage under 2 MB most of the time. After some time running, when each object has been reconstructed 2 or 3 times (and the user has been annoyed by the time it took), suddently the GC changes its mind and stops clearing the refenreces, and all objects (about 40) are kept in memory and the UI works smoothly and my caching makes sense. Is there any way to bias the way those references are handled, e.g. tell the GC that it is totally ok to have a heap of 4 MB? In the end, thats what the GC does automatically after 30 seconds of doint it wrong. with best regards, Brian Schimmel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 style my own styleable with a style? (Custom view class with custom attribute)
Hi, I'm creating my own View class, and defining custom xml attributes with a attrs.xml. As long as I provide each attribute manually, there is no problem, but ?xml version=1.0 encoding=utf-8? resources declare-styleable id=my.package.CustomizedButtonView name=CustomizedButtonView attr name=borderDrawable format=reference|color/ /declare-styleable /resources To be honest, I don't understand the proper use of the attributes id and name in the above code, but somehow it works. I can now reference the borderDrawable-Attribute from a layout xml file: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:mypack=http://some.weird.url.com/seems/not/to/matter; my.package.CustomizedButtonView android:text=This is my text mypack:borderDrawable=@drawable/border243/ /LinearLayout My class CustomizedButtonView now reads the attribute like this: public CustomizedButtonView(Context context, AttributeSet attrs) { super(context, attrs); int borderDrawableId = attrs.getAttributeResourceValue( http://some.weird.url.com/seems/not/to/matter;, borderDrawable, -1); Until now, everything works fine. Many of my CustomizedButtonView will have the same borderDrawable, but not all of them, so I want to define a style. My styles.xml reads like this: style name=customStyle1 item name=android:textDefault text/item item name=mypack:borderDrawable@drawable/border243/item /style And the layout like that: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:mypack=http://some.weird.url.com/seems/not/to/matter; my.package.CustomizedButtonView style=@style/customStyle1/ /LinearLayout The android:text is properly set in my instance, but the borderDrawable is not. I guess this has something to do with namespaces, because inside the styles.xml, the name=mypack:borderDrawable is not handled by the XML parser's namespace facility, because its inside an attribute value. So mypack is in no way connected to http://some.weird.url.com/seems/not/to/ matter and adding it via xmlns:mypack... to the stylefile would not help, I guess. In the same file, android:text is somehow recognized, even though android is AFAIK only a ns-defintion for http:// schemas.android.com/apk/res/android, which is also not declared in that file. So what is the proper way to set a custom attribute in a 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] Getting the manifest.xml of applications from the market?
Hi there, is there some way to retrieve the manifest.xml of an application from the market, without installing the application? I think the official Market Application somehow get this file (or at least parts of it) to show needed permissions, etc. before installing. I'd be interested in seeing the IntentFilters defined by applications and their activities and processing this information in my application. thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] SDK 1.5 - where has aapt gone?
Hi there, I'm currently very confused about the 1.5 SDK. I used to call aapt.exe from my build script, but the new SDK does not contain aapt any more. Is there any replacement, or can I use on old version of aapt without getting into more problems? To be more precise, I was using autoandroid / androidant and its task android:aapt which basically tried to find the aapt.exe but doesn't find it any more. thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Understanding build.xml in SDK version 1.5 - where are the targets?
Hi there, I just tried to figure out the build.xml from the SDK 1.5. I used android update project an an existing project and got a very short build.xml. When I strip out all the comments, this is what's left: ?xml version=1.0 encoding=UTF-8? project name=com.webxells.ourproduct property file=local.properties/ property file=build.properties/ property file=default.properties/ path id=android.antlibs pathelement path=${sdk-location}/tools/lib/anttasks.jar / pathelement path=${sdk-location}/tools/lib/sdklib.jar / pathelement path=${sdk-location}/tools/lib/ androidprefs.jar / pathelement path=${sdk-location}/tools/lib/apkbuilder.jar / pathelement path=${sdk-location}/tools/lib/jarutils.jar / /path taskdef name=setup classname=com.android.ant.SetupTask classpathref=android.antlibs/ setup / /project The documentation tells me to call ant debug or ant release. As far as I know, debug and release must be the names of targets in this build.xml, but the build.xml does not contain any target at all. I would expect to get a message like Target debug does not exist in the project, but to my big surprise, it works and does something. Anyway, compilation fails for several reasons. If I knew where the javac task is called, I knew which parameters to add to fix it, but I can't find it anywhere in this small build.xml. There are many other things I'd like to customize, but I just don't get where to find them. thanks for your answers, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] List items not clickable when using ListAdapter, but clickable with SimpleAdapter
Hi, I was populating a list with a SimpleAdapter like this: final ListMapString, String data = someObject.getData(); SimpleAdapter dataAdapter = new SimpleAdapter (this, data, R.layout.listline, from, to); listView.setAdapter(dataAdapter); listView.setOnItemClickListener(...); The listView gets this from the layout.xml: android:choiceMode=singleChoice android:clickable=true R.layout.listline defines a layout for each line, having 4 TextViews and some more widgets. Everything works fine so far. But now I need to use a ListAdapter to populate my list. It was easy to write a class that implements all those methods required by that interface, and the resulting List looks exactly the same now. It performs well on scrolling, changing data, etc. but the lines are not clickable any more. My onItemClickListener.onClick is never called, not matter where I tap on my list line (e.g. on one of the TextViews or on the background of that line). In my implementation, I use View.inflate to inflate excactly the same xml as the SimpleAdapter did. Shouldn't the click behaviour of a list be independant of where data comes from? I guess SimpleAdapter does some internal magic that I'd need to perform in my own implementation as well, to make the line clickable. Can somebody point out what I'm missing? I'd also like to look at the source code of SimpleAdapter, but I coudn't find it anywhere on http://android.git.kernel.org/ - maybe I'm just to dumb to look in the right place. Can somebody point me to that code? (possibly without forcing me to install git and download the whole code base) thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 browse deeper into /data/data/package/app_somename/somedir
Hi, my app is creating a directory by using File thisDir = getDir(mycustomname, Context.MODE_WORLD_WRITEABLE); It is stored at /data/data/package/app_mycustomname/ I can browse that directory with DDMS or with 'adb shell', of course, it is empty. My App then creates some subdirectories there, and those have subdirectories too, and so on, and creates files in several of those. My app can read all those dirs and files, too. Sometimes I have to take a look at this directory tree, but I cannot browse deep into that tree, neither using DDMS (both inside Eclipse and standalone) nor using the shell. I can see that there is a directory called /data/data/package/app_mycustomname/mysubdirectory and I can even 'cd' into this directory. But when I do a 'ls' there, the directory is reported to be empty, though I'm sure there must be something inside. app_mycoustomname has the permissions drwxrwx-wx app_mycoustomname/mysubdirectory has the permissions drwxrwxrwx I have the same issue on the emulator and on the ADP1, both running a 1.1 firmware. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: List of private / hidden / system APIs?
Thank you for your answers so far, but I still think you're getting me wrong. I'm not planing to use private APIs - at least not as long as they remain private. I'm trying to create high quality software and I know that hacking won't get me there. But it would be nice if Google (or the Open Handset Alliance as a whole) would have some more trust in developers. Of course, the list which I proposed could encourage some more developers to use those APIs when they should not do it. But even as a righteous software developer, with no plans whatsoever to actually abuse those APIs, I would really benefit from candid information about them. Lets say I want my Application to search other bluetooth enabled devices: I look into the public API, search for bluetooth and see there is a permission called BLUETOOTH_ADMIN which sais Allows applications to discover and pair bluetooth devices.. Enough of a evidence that it should be possible, but I just can't figure out how to actually do it. So I'm just using a plain old google search on the web and what do I find? Well, if I do it now, I find some blog posts telling me that the bluetooth APIs were dropped from 0.9 to 1.0, but when I did this search some months ago, when 1.0 was already there, but blogs were too slow to pick up the topic, all I could find were code examples written againt the 0.9 SDK that strengthened my belief that it was possible - of course they did not actually state that they were written for 0.9, I found this out the hard way. So the basic problem is, there are many indications telling me that my App could do something: * Permissions left over from old API revisions * code examples (of coude inofficial ones) that target old SDKs or use hacks to access the private APIs on current versions * the official page at http://www.android.com/about/ telling that: Android does not differentiate between the phone's core applications and third-party applications. They can all be built to have equal access to a phone's capabilities providing users with a broad spectrum of applications and services. With devices built on the Android Platform, users are able to fully tailor the phone to their interests. They can swap out the phone's homescreen, the style of the dialer, or any of the applications. On the other hand, there are only few sources of information telling me what is not possible or not public: * blog posts (but only for very popular APIs, and all we know blogs about Android are full of misinformation) * changelogs (only if the API was public before, because if it's private from the beginning, there's no change) * or may be no information at all All I'm asking for is a simple place to go to and just have it clear: No, Brian, you cannot search for other bluetooth devices, this is a private API, and you know what it means: Don't even think about using it. Maybe that's bad news for me, but I can stomach that, I'd be glad to find that information from a trusted source, e.g. directly from you. In my opinion, that's what a developer might expect to find. I'm not talking about No, Brian, there is no public API to brew coffee on android because that's obvious. Just talking about the many cases where developers have some good reason to believe a feature was available when in fact it is not. Especially for bluetooth I know that it's private because it simply wasn't final when 1.0 came out. But I was surprised when 1.1 came without bluetooth, and I'm wondering if it will be in 1.2 or 1.3 or if it was simply kicked out of the schedule forever. But I'm not looking for a concrete answer to that specific question (If I was, I would have asked it right away) but I'm trying to understand (and maybe change) the way you are dealing with information about private APIs. If developers knew that you might release a new, final, pulic API for bluetooth very soon, it might as well stop them from using the private API now. But if they don't have information about it, I can understand they will resort to the only obvious alternative: using private APIs. Think about it, please. Sorry for the lenghty discussion, Brian On 14 Mrz., 00:47, Dianne Hackborn hack...@android.com wrote: Don't use private APIs. Seriously. Your app will break at some point when your users get a new version of the OS. In the vast majority of the cases where the built-in apps are using a private API, there is in fact a public API they can use to do the same thing. In the few cases where there isn't a public API, it is because that part of the platform is not ready to be stabiliized for public use, so that is very very likely something that will change in the future and bite you in the butt if you are using it. (And of course there are the set of APIs that simply are not for applications to use, for security reasons, and most of those should already be protected by permissions so even the private API won't do you any good.) On Fri, Mar 13, 2009 at 4:20 PM,
[android-developers] Re: List of private / hidden / system APIs?
Hi, MosthiddenAPIs are used by the framework itself and not by applications. Some applications do usehiddenAPIs but we definitely want to fix them to compile with the SDK. Does this mean those APIs, e.g. reading contacts, will be made a public part of the SDK? But I'm afraid there may be many more which I'm not aware of. Could we create an exhaustive list of them? I think no such list exists yet. No. Sorry, but this answer is not clear to me. What does this no relate to? * No, there are no more hidden APIs, there are just the 2 or 4 mentioned before. * No, we cannot create a list. * No, there is no such list. Please understand my point of view: I understand that there is a reason to have private APIs. I just don't understand why this should be kept secret. best regards, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] List of private / hidden / system APIs?
In this post http://groups.google.com/group/android-developers/browse_thread/thread/bedd7b2dcfad5e97/6257106b3d301527 i've read about all that stuff about private APIs which are annotated with @Hide. The presence of hidden APIs is not as well-known as the All Apps are equal-mantra, but I think there should be more information on it. As long as I belivied in the mantra, I had dialogues like that: Boss: Can you do Xyz on android? Me: Yes, of course, there are Apps on my phone which do it, so we can do it, too! Boss: Cool, go ahead and code that stuff. Customers will love it! ...two days later... Me: Hey boss, I just found out I need some private API for that. Forget all your business plans. I totally agree with those two reasons for private APIs: 1. some features would be too dangerous from a security perspective 2. some APIs were not ready to ship when 1.0 came out, so they should be published later The post I mentioned above is about two private APIs: * Installing Apps without any intervention by the User * Calling emergency phone numbers like 911 I'm sure there are more private APIs, I think those are good examples: * Everything related to Bluetooth * Reading Contancts from a SIM card / writing them there But I'm afraid there may be many more which I'm not aware of. Could we create an exhaustive list of them? I think no such list exists yet. For each API/feature it would be nice to know: * Why is it private? * Will it ever be public? * If yes, are there any schedules when this might come true, in terms of release numbers or in terms of a date? with best regars, Brian Schimmel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---