[android-developers] Re: Think twice before turning on the Copy Protection option! -- there's a serious bug in Market
I just hit the same issue and cannot disable copy protection any more. And the description in the Market is not exactly long enough to provide all the required information... :( In my case, the _new_ SQLite Database fails. There has never been one before in our app and still it breaks: 04-25 00:01:48.860: ERROR/AndroidRuntime(247): Caused by: android.database.sqlite.SQLiteException: unable to open database file 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java: 1421) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:537) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:558) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:551) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.app.ApplicationContext.openOrCreateDatabase (ApplicationContext.java:427) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:181) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:98) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at com.cab4me.android.db.Cab4MeDbManager.getFavorites (Cab4MeDbManager.java:93) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at com.cab4me.android.Cab4MeFavActivity.onResume(Cab4MeFavActivity.java: 47) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java: 1224) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.app.Activity.performResume(Activity.java:3359) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.app.ActivityThread.performResumeActivity(ActivityThread.java: 2492) On 2 Mrz., 09:13, csvy sou...@gmail.com wrote: I just had the same issue happen to my application. I decided to disable Copy Protection after reading how useless it was, and now everyone is getting Force Quit errors on Activities with a WebView!!! I have turned Copy Protection back on and added a note to the description saying to uninstall then reinstall. Is this the appropriate course of action? I can't believe this hasn't been fixed yet! (or at least put a warning in the Market Developer Console). :( On Feb 27, 6:31 am, wayne mcfadden- Red Droid waynemcfad...@gmail.com wrote: I'm also having this problem. I have a couple of apps using copy protection though and this is the first one that has run into this problem. I first tried to upload my app via firefox and forgot that that that interface is broken and has been broken for the past 2-3 weeks. So I switched to Safari and finished the upload from there. I'm wondering if this is only a regional problem, the few emails that I've gotten are googlemail accounts which are England and Germany I think. Have you found that? Or any work arounds? Looks like turning off copy protection is a bad idea? Wayne On Feb 26, 12:42 am, mac gr...@czesla.de wrote: That will be the same for my application. I startet with copy protection in the first version. After some people were not able todownloadthe application (another bug with some APN?) I switched off copy protection. Now I get crash reports that I can not understand after an upgrade. Uninstall and reinstall works. And I got plenty of 1 star ratings for that. Arg Mirko On 23 Feb., 00:50, N4Spd robert.c...@gmail.com wrote: I'm been tracking down this exact issue with my app and it matches what focuser describes. I turned on copy protection on a free app. People started getting crashes. The app starts with a help activity containing a webview. This web view is now throwing an exception trying to access a sqlite webview.db database on it's own thread and crashing. In addition, this help activity only starts up if there are no settings but even upgrades are getting this activity now. It problem extends to other android APIs as well because if I avoid the webview, it still crashes in other APIs. In summary, if you change copy protection for your app: 1. user preferences will be wiped 2. webview willcrash 3. other APIs willcrash Removing copy protection does not help because now I've got some users with and without copy protection and changes in either direction causes the problem. Argh... rob On Feb 22, 9:55 am, focuser linto...@gmail.com wrote: confirmed. If you first install an apk unlocked, and then install a locked one, you will get that sqlite exception. also, the old
[android-developers] Re: Can't upload my app in the market ! Market requires the minSdkVersion to be set in AndroidManifest.xml.
which is nice because even the new (I know, it is a pre-release, but stull) Eclipse plugin does not put this as the first line... Thanks for those who fought until it worked :) On 25 Apr., 07:30, 6real xirgon...@gmail.com wrote: Yes it works : uses-sdk android:minSdkVersion=2 / as first manifest child. THX !!! On 25 avr, 04:22, clark clarkd...@gmail.com wrote: Mark, You're right, I was very unclear there. I apologize as well. So it seems the solution so far is to put uses-sdk android:minSdkVersion=1 /, or whatever minSdkVersion you need, right under manifesthttp://groups.google.com/group/android-developers/browse_frm/thread/9... Worked for me. ~clark On Apr 24, 6:29 pm, Mark Murphy mmur...@commonsware.com wrote: clark wrote: My comment about being kept in the dark was regarding not being told of the market dependency. I was well aware of that setting and that it was suppose to be optional, but looks like the optional part went out the door along with not being able to directly turn GPS on and off anymore. That wasn't clear from your original message. I apologize for my confusion. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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] Re: Think twice before turning on the Copy Protection option! -- there's a serious bug in Market
I just hit the same issue and cannot disable copy protection any more. And the description in the Market is not exactly long enough to provide all the required information... :( In my case, the _new_ SQLite Database fails. There has never been one before in our app and still it breaks: 04-25 00:01:48.860: ERROR/AndroidRuntime(247): Caused by: android.database.sqlite.SQLiteException: unable to open database file 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java: 1421) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:537) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:558) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:551) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.app.ApplicationContext.openOrCreateDatabase (ApplicationContext.java:427) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:181) 04-25 00:01:48.860: ERROR/AndroidRuntime(247): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:98) On 2 Mrz., 09:13, csvy sou...@gmail.com wrote: I just had the same issue happen to my application. I decided to disableCopyProtectionafter reading how useless it was, and now everyone is getting Force Quit errors on Activities with a WebView!!! I have turnedCopyProtectionback on and added a note to the description saying to uninstall then reinstall. Is this the appropriate course of action? I can't believe this hasn't been fixed yet! (or at least put a warning in the Market Developer Console). :( On Feb 27, 6:31 am, wayne mcfadden- Red Droid waynemcfad...@gmail.com wrote: I'm also having this problem. I have a couple of apps usingcopy protectionthough and this is the first one that has run into this problem. I first tried to upload my app via firefox and forgot that that that interface is broken and has been broken for the past 2-3 weeks. So I switched to Safari and finished the upload from there. I'm wondering if this is only a regional problem, the few emails that I've gotten are googlemail accounts which are England and Germany I think. Have you found that? Or any work arounds? Looks like turning offcopyprotectionis a bad idea? Wayne On Feb 26, 12:42 am, mac gr...@czesla.de wrote: That will be the same for my application. I startet withcopy protectionin the first version. After some people were not able todownloadthe application (another bug with some APN?) I switched off copyprotection. Now I get crash reports that I can not understand after an upgrade. Uninstall and reinstall works. And I got plenty of 1 star ratings for that. Arg Mirko On 23 Feb., 00:50, N4Spd robert.c...@gmail.com wrote: I'm been tracking down this exact issue with my app and it matches what focuser describes. I turned oncopyprotectionon a free app. People started getting crashes. The app starts with a help activity containing a webview. This web view is now throwing an exception trying to access a sqlite webview.db database on it's own thread and crashing. In addition, this help activity only starts up if there are no settings but even upgrades are getting this activity now. It problem extends to other android APIs as well because if I avoid the webview, it still crashes in other APIs. In summary, if you changecopyprotectionfor your app: 1. user preferences will be wiped 2. webview willcrash 3. other APIs willcrash Removingcopyprotectiondoes not help because now I've got some users with and withoutcopyprotectionand changes in either direction causes the problem. Argh... rob On Feb 22, 9:55 am, focuser linto...@gmail.com wrote: confirmed. If you first install an apk unlocked, and then install a locked one, you will get that sqlite exception. also, the old preferences seems to be deletedafterthe locked apk is installed. Another thing is, even installed locked from scratch (uninstall and adb install -l), there are some problems with resources. Our app displays an HTML page when it starts, but now I get Web page not available:file:///android_asset/welcome.html This works fine if it's installed unlocked. This might explain the resource problem that I had before? On Feb 22, 9:18 am, Carter ccjerni...@gmail.com wrote: I can confirm that there is a bug with the forward locking on the Android Market. The problem I've experienced is that users
[android-developers] sqlite, big tables and like/glob statement
hi, anyone working with big sqlite tables and trying to match rows using patterns (for example for autocomplete purposes) ? recently i played with LIKE statement and it seems it will never use table index (if any), you have to use GLOB instead. but... the weird thing is that you cannot use selectionParams in your query: you have to specify your pattern in selection like: sel = select * from words where key GLOB 'test*' db.rawQuery(sel, null) my words table has two TEXT columns: 'key' and 'value' and index on 'key' for example: i have table with ~28000 rows and when using selectionParams my query took 1500 ms and without selectionParams 20 ms does it have anything to do with android or its sqlite weird feature? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: URGENT!!!!! Can't update apps in android market!!!
I just did it with no problem I used uses-*sdk* android:minSdkVersion=1 / put it right after the openin manifest tag. On Fri, Apr 24, 2009 at 6:40 PM, s...@zooropa.com s...@zooropa.com wrote: I'm still having the same problem as below when I insert the: uses- sdk android:minSdkVersion=1/uses-sdk right after the manifest. There must be a trick to where it's put?? On Apr 24, 3:10 pm, Hw3699 hw3...@gmail.com wrote: What's your solution? I got the same issure. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.innersocial.planner android:versionCode=1 android:versionName=1.1.1 uses-sdk android:minSdkVersion=1/uses-sdk It doesn't work. On Apr 24, 1:14 pm, havexz bali.param...@gmail.com wrote: This is the right solution.but why such a wierd but Google only knows..:) I also faced the same problem and tried different combination and then it worked fine finally. On Apr 24, 10:38 am, yhfudev yhfu...@gmail.com wrote: You may move the uses-sdk android:minSdkVersion=1/uses-sdk to the first line, after the manifest On Apr 24, 6:04 am, s...@zooropa.com s...@zooropa.com wrote: Okay I just sent a message to Google we'll see what they say. On Apr 24, 6:17 am, Al Sutton a...@funkyandroid.com wrote: There's little the people on this list can do to help you with the inner workings of Market. Your best option would be to try and contact Google. Al. --- * Written an Android App? - List it athttp://andappstore.com/* == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Yan Shi Sent: 24 April 2009 09:15 To: Android Developers Subject: [android-developers] Re: URGENT! Can't update apps in android market!!! Anyone please? On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote: When I upload an apk update for one of my apps(Hello Yahoo), I was told that Market requires the minSdkVersion to be set in AndroidManifest.xml.. So I can't do the update! I already set this attribute in AndroidManifest.xml. What's wrong?? I even set it to uses-sdk minSdkVersion=3 /, but still I can't do the update. Has anyone met this problem? BTW, when I go tohttp://market.android.com/publish/Hometoday, I have accepted Term and Service again. I think already accepted it the first time I registered for it. Why should I accept it again? Could any google stuff look into this please? Thanks very much- 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Making VideoView play automatically
Hi, How can I make a VideoView play immediately, without the user having to select the MediaPlayer UI Play button? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Making VideoView play automatically
HI... Create one one obect of VideoView then give objectname .start(); Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5: How to get the BT state?
Thank you very much. I am aware that it is not part of the public API. :) On Apr 24, 10:41 pm, Nick Pelly npe...@google.com wrote: On Fri, Apr 24, 2009 at 7:09 AM, code_android_festival_way festival.s...@googlemail.com wrote: At the moment I am trying to update my application to Android 1.5. In Android 1.1 I was able to detect the BT state with catching the following broadcasts: action android:name=android.bluetooth.intent.action.ENABLED / action android:name=android.bluetooth.intent.action.DISABLED / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_FOUND / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECTED / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_CONNECTED / action android:name=android.bluetooth.intent.action.BONDING_CREATED / After testing with Android 1.5 I recognized that only: action android:name=android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED / 1) These are not part of the public API. If you use them it is at your own risk, and your app will probably break again going forward beyond cupcake. 2) Your question is easily answered by looking at the source. /** Broadcast when the local Bluetooth device state changes, for example * when Bluetooth is enabled. Will contain int extra's BLUETOOTH_STATE and * BLUETOOTH_PREVIOUS_STATE. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String BLUETOOTH_STATE_CHANGED_ACTION = android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED; is available. How can I detect the specific state of Bluetooth in 1.5? With the settings I can only differentiate between BT on and off. I'm looking forward reading your answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5: How to get the BT state?
Well after testing the whole thing I recognized that the state is not delivered via an Intent extra. (although mentioned in the SDK) Here is what I tried: Log.e(TAG,Received Bt change. Change action: +intent.getAction ()); int state = intent.getIntExtra(BLUETOOTH_STATE, 404); int previousState = intent.getIntExtra (BLUETOOTH_PREVIOUS_STATE, 404); The action is fine but the states are always 404. So there is no state returned. Could you lead me to the file where you have found the things you mentioned. I haven't found it in the source. :( Thank you very much. Regards. On Apr 25, 9:11 am, scanning_it festival.s...@googlemail.com wrote: Thank you very much. I am aware that it is not part of the public API. :) On Apr 24, 10:41 pm, Nick Pelly npe...@google.com wrote: On Fri, Apr 24, 2009 at 7:09 AM, code_android_festival_way festival.s...@googlemail.com wrote: At the moment I am trying to update my application to Android 1.5. In Android 1.1 I was able to detect the BT state with catching the following broadcasts: action android:name=android.bluetooth.intent.action.ENABLED / action android:name=android.bluetooth.intent.action.DISABLED / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_FOUND / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECTED / action android:name=android.bluetooth.intent.action.REMOTE_DEVICE_CONNECTED / action android:name=android.bluetooth.intent.action.BONDING_CREATED / After testing with Android 1.5 I recognized that only: action android:name=android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED / 1) These are not part of the public API. If you use them it is at your own risk, and your app will probably break again going forward beyond cupcake. 2) Your question is easily answered by looking at the source. /** Broadcast when the local Bluetooth device state changes, for example * when Bluetooth is enabled. Will contain int extra's BLUETOOTH_STATE and * BLUETOOTH_PREVIOUS_STATE. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String BLUETOOTH_STATE_CHANGED_ACTION = android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED; is available. How can I detect the specific state of Bluetooth in 1.5? With the settings I can only differentiate between BT on and off. I'm looking forward reading your answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: sqlite, big tables and like/glob statement
On 25 Kwi, 05:34, skink psk...@gmail.com wrote: hi, anyone working with big sqlite tables and trying to match rows using patterns (for example for autocomplete purposes) ? recently i played with LIKE statement and it seems it will never use table index (if any), you have to use GLOB instead. but... the weird thing is that you cannot use selectionParams in your query: you have to specify your pattern in selection like: sel = select * from words where key GLOB 'test*' db.rawQuery(sel, null) my words table has two TEXT columns: 'key' and 'value' and index on 'key' for example: i have table with ~28000 rows and when using selectionParams my query took 1500 ms and without selectionParams 20 ms does it have anything to do with android or its sqlite weird feature? and, yes, i know its insecure but it's the only way to convince sqlite/ android to use table index --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: minsdkversion required in manifest to upload an app upgrade
Thanks Clark! That solved it. -Wes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] WebView visited links
Hello, Is there a way to programatically tell a WebView that certain links have been visited, and thus should be displayed using dark blue instead of bright blue? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Making VideoView play automatically
On Apr 25, 2:55 pm, Nithin Varamballi nithi...@gmail.com wrote: HI... Create one one obect of VideoView then give objectname .start(); Thanks for the reply! Nothing happens, though. No logcat logs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Making VideoView play automatically
Try this code... This code woks for me.. package mypack.mydemos; import android.app.Activity; import android.graphics.PixelFormat; import android.os.Bundle; import android.widget.MediaController; import android.widget.VideoView; public class demo extends Activity { /** Called when the activity is first created. */ private VideoView myVideo,myVideo1; private MediaController mc,mc1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); myVideo1=(VideoView)findViewById(R.id.video); myVideo1.setVideoPath(/sdcard/nithin.mp4); myVideo1.start(); mc1=new MediaController(this); mc1.setMediaPlayer(myVideo1); myVideo1.setMediaController(mc1); //mc.show(RESULT_OK); myVideo1.requestFocus(); } } Thsnk You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout bugs
Mark - I've spent a lot of time developing for a lot of mobile platforms. It's true that they all have their quirks, and they all need a bit of tweakiness, but this stack business seems to me to be more than ordinarily tweaky. The Android layout scheme has been a strange thing to work with. It's powerful, but it is complicated, and it's not been easy to get the results we need from it. It is definitely one of the awkward bits of Android development. Now it's more awkward. Reworking existing layouts, using more laborious techniques when making new ones, building a UI to economise on views instead of to serve the user, having to measure the deepest possible nesting in an environment where views can be built at runtime - none of this is helpful. I expect we are stuck with the teeny stack for 1.5. I'm sure the Android engineers haven't gone this way for trivial reasons, and I'm sure they won't change it just because I have a moan about it. But, I'd like to be clear that this is not just an 'excuse for a bit of optimisation' - it's a real (even if unavoidable) step backwards. R. On Apr 24, 7:00 pm, Mark Murphy mmur...@commonsware.com wrote: jarkman wrote: Scratching about looking for ways to use less stack, and to avoid complicated view structures, doesn't feel very 2009. Well, bear in mind, you are far closer to doing embedded systems development than desktop or server development when you write for mobile devices. These sorts of hiccups and optimizations are par for the course when working on embedded systems, as I understand it. My hope is that we can collectively work out a set of design guidelines to help avoid stack issues, while we await more stack space, or more efficient use of existing stack space, or something. Cases in point: Romain Guy wrote a couple of blog posts earlier this year about using RelativeLayout instead of nested LinearLayouts and using merge to eliminate redundant layouts needed solely to satisfy XML requirements. I link to them in a blog post I wrote up on this topic earlier today: http://androidguys.com/?p=4688 At the time he wrote those posts, my reaction was meh, because I didn't see the value. Now, of course, the value is much more obvious and immediate. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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] Re: Layout bugs
Jeff - I believe you are posting that from the future, when all the Android devices in the world have 1.5 running on them... :-) R. On Apr 24, 7:11 pm, Jeff Sharkey jshar...@android.com wrote: FastScrollView ListView You can now specify android:fastScrollEnabled=true on the ListView instead of wrapping in a FastScrollView. ;) -- Jeff Sharkey jshar...@android.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] screenshot for scrolling display
hi, i have a calendar app with monthly display. how could i do realize a soft scrolling from one month to another. I thought about doing a screenshot of the act. calendar and creating a screenshot of the next (hidden) month. but first how to do a screenshot and than realize the scrolling :) any other ideas how to realize that are welcome. (horizontal listview if that would be possible or anything else) greets chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Making VideoView play automatically
On Apr 25, 4:32 pm, Nithin Varamballi nithi...@gmail.com wrote: Try this code... This code woks for me.. Yes, it works! The key is to start() before attaching the MediaController. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Making VideoView play automatically
On Apr 25, 4:32 pm, Nithin Varamballi nithi...@gmail.com wrote: Try this code... This code woks for me.. Yes, it works! The key is to start() before attaching the MediaController. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] IMP: Central repository creation
HI EXPERTS, I HAVE BEEN WAITING FOR YOUR REPLIES TO THIS QUERY FOR 2-3 WEEKS. PLEASE LET ME KNOW UR UNDERSTANDING ABOUT MAKING DATA factory configurable.. I HOPE I GET TO HEAR FROM YOU GUYS SOON. Thanks. On Apr 1, 7:40 pm, Zhubham sahilz...@gmail.com wrote: Hi, How can i make any string/integer factory configurable in android?? eg. Alert dialog displays a text which is directly picked from a (centralrepository) file. Now we change the text in this file and make a rom image (but DO NOT compile the whole code) and flash it on the phone. Now the alert dialog would display the new text. This is what we callcentralrepositorydata retrieval in symbian. How is this achievable in Android?? Please help me on this. Thanks. Best Regards, Zhubham. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Memory usage query.
Hi Experts, I need your help to know what can be the equivalent of following memory usage scenarios for any given android application Memory usage Section Memory (Bytes) (i) Code- i guess this equals apk size?? (ii) RO (constant data) - (iii) RW (Initialised section) - (iv) ZI (Zero initialised section) - (v) Run time (Heap) - (vi) Stack usage- (vi) Size of maximum allocation - I await your response . Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Recording Audio in a call
John Doe wrote: Hi guys. I have a question and i am looking for an answer for a very long time. I am trying to record audio when i call someone and when someone calls me.I am using phonestatelisteners and i am able to record audio from outside (my voice) when i call someone. however when somebody calls me it doesnt record my voice at all . I am trying to record my voice. Even if somebody calls me. But it works only in one direction :( If i call it records my voice if somebody calls it doesnt record my voice. Do you know if this is possible ? No, it is not possible, as I understand it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy 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] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings
For the most part, My Vista computer only prompts during install to get permission to write to the programs directory. Personally I find the Andoid model much more annoying because it is so fine grained and meaningless to the average user. On Apr 24, 10:44 am, Mark Murphy mmur...@commonsware.com wrote: patg wrote: I am surprised that Android's security model asking for permissions when every application is installed is tollerated while WIndows Vista basically doing the same thing in a simpler way receives howls of protest. Android's permission model involves an install-time prompt to grant permission. Vista's involves a run-time prompt to grant permission. That is a huge difference for an application that is run more than a couple of times. Additionally, I don't think the average teenager or grand-mother knows what any of the fine grain permissions in Android mean and will just go ahead and allow any app to have the permissions it wants. Solve that problem, and you have yourself a very lucrative consulting business. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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] Re: Layout bugs
jarkman wrote: Mark - I've spent a lot of time developing for a lot of mobile platforms. It's true that they all have their quirks, and they all need a bit of tweakiness, but this stack business seems to me to be more than ordinarily tweaky. *shrugs* It all depends on what you're used to. I'm a graybeard. I had been programming various machines and languages for a decade-plus before I got my hands on anything with the G1's specs. When you cut your teeth on developing in 16KB of RAM total, dealing with the Android stack depth issue isn't terribly tweaky. insert obligatory get-off-my-lawn rant here Now it's more awkward. Reworking existing layouts, using more laborious techniques when making new ones, building a UI to economise on views instead of to serve the user, having to measure the deepest possible nesting in an environment where views can be built at runtime - none of this is helpful. I expect we are stuck with the teeny stack for 1.5. I'm sure the Android engineers haven't gone this way for trivial reasons, and I'm sure they won't change it just because I have a moan about it. But, I'd like to be clear that this is not just an 'excuse for a bit of optimisation' - it's a real (even if unavoidable) step backwards. Don't get me wrong -- I'm just trying to help explain and assist with an unpleasant situation. In an ideal world, view depth would not be an issue, because Android would either use less stack per view layer or would have, say, double the stack space. Of course, in an ideal world, my G1 would have as much horsepower as my quad-core desktop, battery life longer than my Prius, and would have Natalie Portman in my speed-dial. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy 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] Re: IMP: Central repository creation
Zhubham wrote: I HAVE BEEN WAITING FOR YOUR REPLIES TO THIS QUERY FOR 2-3 WEEKS. PLEASE LET ME KNOW UR UNDERSTANDING ABOUT MAKING DATA factory configurable.. I cannot speak for anyone else on this list, but the reason I did not respond to your original message is because, to me, your message did not make much sense. How can i make any string/integer factory configurable in android?? The factory pattern (GoF, p. 107) is not typically used for something as trivial as an integer. Hence, it would help if you would explain what you think a string/integer factory is. eg. Alert dialog displays a text which is directly picked from a (centralrepository) file. What is a (centralrepository) file? Now we change the text in this file and make a rom image (but DO NOT compile the whole code) and flash it on the phone. Questions involving the Android source code are best asked on a list pertaining to the Android source code: http://source.android.com/discuss Now the alert dialog would display the new text. This is what we callcentralrepositorydata retrieval in symbian. How is this achievable in Android?? At the application level, they are called string resources: http://developer.android.com/guide/topics/resources/resources-i18n.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy 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] apk-builder sdk 1.5
I know that some new commands may have been added to apk-builder but are the command line ones we used before still valid? For example, can I still denote the junit path usign the same command line sequence? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Layout bugs
I started coding on a 1Kb ZX-81 (http://en.wikipedia.org/wiki/Sinclair_ZX81), but that doesn't mean I'd expect to see the same problems and limitations on modern hardware, and I do see the stack depth limitations as tweaky. Dianne has already pointed out that even the guys at Google consider it a less than optimal, lets hope a 1.6 or whatever brings some improvements. Al. P.S. If 16Kb RAM makes you a greybeard I'd better start getting ready to draw my pension :). --- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy Sent: 25 April 2009 14:05 To: android-developers@googlegroups.com Subject: [android-developers] Re: Layout bugs jarkman wrote: Mark - I've spent a lot of time developing for a lot of mobile platforms. It's true that they all have their quirks, and they all need a bit of tweakiness, but this stack business seems to me to be more than ordinarily tweaky. *shrugs* It all depends on what you're used to. I'm a graybeard. I had been programming various machines and languages for a decade-plus before I got my hands on anything with the G1's specs. When you cut your teeth on developing in 16KB of RAM total, dealing with the Android stack depth issue isn't terribly tweaky. insert obligatory get-off-my-lawn rant here Now it's more awkward. Reworking existing layouts, using more laborious techniques when making new ones, building a UI to economise on views instead of to serve the user, having to measure the deepest possible nesting in an environment where views can be built at runtime - none of this is helpful. I expect we are stuck with the teeny stack for 1.5. I'm sure the Android engineers haven't gone this way for trivial reasons, and I'm sure they won't change it just because I have a moan about it. But, I'd like to be clear that this is not just an 'excuse for a bit of optimisation' - it's a real (even if unavoidable) step backwards. Don't get me wrong -- I'm just trying to help explain and assist with an unpleasant situation. In an ideal world, view depth would not be an issue, because Android would either use less stack per view layer or would have, say, double the stack space. Of course, in an ideal world, my G1 would have as much horsepower as my quad-core desktop, battery life longer than my Prius, and would have Natalie Portman in my speed-dial. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy 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] Re: OnTouchListener OnClickListener
Did you find any answers to this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Seeing Double ListView
I am wondering if anyone else is encountering this issue (or if its just me). I converted an app I have been working on from using a regular view to using SurfaceView. The app accesses listviews to change properties of the elements I am drawing on a canvas. The listviews called from the SurfaceView version draw over themselves mis-registered when I scroll long lists quickly. If anyone out there has had a similar problem and/or has an idea what might be going on and/or has a suggestion as to how to fix this, please do! Thank You, Jason Van Anden --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout bugs
On Sat, Apr 25, 2009 at 9:57 AM, Al Sutton a...@funkyandroid.com wrote: Dianne has already pointed out that even the guys at Google consider it a less than optimal, lets hope a 1.6 or whatever brings some improvements. To be clear, the main improvement I expect is a very clear delineation of the maximum stack depth, that will be consistently reported to developers and enforced in the SDK, which the framework will guarantee to support. View hierarchies of the depth we are talking about are just too inefficient to manage on G1 class of hardware; it is something people should just be avoiding. I do think we should look at what we can do in the platform about the situation where an activity is embedded inside of another activity to reduce the amount of nesting the system imposes there, but I don't know how much can/will be done. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: orientation change runtime option?
I would suggest not doing anything special and letting users select what they want in the global pref that is in 1.5. On Fri, Apr 24, 2009 at 7:21 PM, andrew andrewsach...@gmail.com wrote: Hi, Is it possible to have a user choose how an app should respond to orientation changes? I have it set to android:screenOrientation=sensor in the manifest but I would like users to be able to turn this on and off or set landscape or portrait orientation permanently. Thanks, Andrew -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: URGENT!!!!! Can't update apps in android market!!!
When I didn't add the minSdkVersion, I got the error message: Market requires the minSdkVersion to be set in AndroidManifest.xml. But even after I added it, there was still error: The server could not process your apk. Try again. I have added the uses-sdk as the first child of manifest: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=leoliang.bettermylocation android:versionCode=9 android:versionName=1.4.1 uses-sdk android:minSdkVersion=2 / On Apr 25, 3:10 am, Hw3699 hw3...@gmail.com wrote: What's your solution? I got the same issure. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.innersocial.planner android:versionCode=1 android:versionName=1.1.1 uses-sdk android:minSdkVersion=1/uses-sdk It doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: orientation change runtime option?
Thanks for your quick response. My app is kind of specialized and I think users might want it to respond differently to orientation changes than the default (I get a lot of requests for that, hence the android:screenOrientation=sensor ). Is there any other approach I can take that would essentially change the value of the screenOrientation at runtime? I think I have seen apps where the user selects how to respond to orientation changes. On Apr 25, 12:30 pm, Dianne Hackborn hack...@android.com wrote: I would suggest not doing anything special and letting users select what they want in the global pref that is in 1.5. On Fri, Apr 24, 2009 at 7:21 PM, andrew andrewsach...@gmail.com wrote: Hi, Is it possible to have a user choose how an app should respond to orientation changes? I have it set to android:screenOrientation=sensor in the manifest but I would like users to be able to turn this on and off or set landscape or portrait orientation permanently. Thanks, Andrew -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Blank screen when switching activities
Hey, I've got a basic list activity with a few images that when you select one starts a new activity with a SurfaceView (based on the Lunar Lander sample). Some times the screen is just blank, from some debugging I can see that the background .png is being loaded and doDraw() is being called by the activity doesn't display anything for anything from 4 to 20 seconds. Other times the game activity is loaded just fine. I assumed it was some kind of garbage collection problem but I can't see anything in LogCat and the second activity is actually loaded, just not displayed for some reason. Help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Layout bugs
What's the rationale for hard-coding stack sizes at 8k? That's pretty small, even for Java apps that don't allocate things on the stack. Windows will actually grow the stack for you when you exceed the limits, up to the point at which you run out of memory. This really isn't a Views-heirarchy specific issue is it. Theoretically any app that is close to the 8k limit can be broken by having some additional recursion in a platform library. Growing the stack automatically appears to be the only robust, general solution. BTW I hope one day we have escape analysis/stack allocation in Dalvik. That'd probably go a long way towards taking the pressure off the GC system and making it easier to write smoothly performing games. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add a button widget to a custom ImageView.
Hi All, I am trying to add a button to a custom imageview. I have created a custom view to display an image to the screen, now i wanted to add a custom button on this veiw and display a layout in onClick. The following is my custom view. /** testimgview.java*/ package com.android.testview; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.util.Log; import android.view.ImageView; public class testimgview extends ImageView { private static final boolean DEBUG = true; private Bitmap sourceImage; private int pWidth, pHeight; private float x, y; public testimgview(Context context) { super(context); BitmapFactory.Options bfo = new BitmapFactory.Options(); bfo.inPreferredConfig = Bitmap.Config.RGB_565; sourceImage = BitmapFactory.decodeResource( getResources () ,R.drawable.img, bfo); } } @Override protected void onDraw(Canvas canvas) { x = getWidth()*1.0f / pWidth; y = getHeight()*1.0f / pHeight; canvas.drawBitmap( sourceImage, null , new Rect(0,0,getWidth (),getHeight()),tmpPaint); for (int i = 0; i eyesMidPts.length; i++) { canvas.drawCircle(x, y, 10.0f ,..); } } } /**testview.java*/ package com.android.testview; import android.app.Activity; import android.os.Bundle; public class testview extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); testimgview test = new (this); setContentView(test); } } Please advice me. How to save Rect or region to a file as an image file. Thank you for all support. SMN. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings
I too think this change is a bad idea and will decrease the user's experience with my application. Perhaps, but it'll probably improve the users experience with the phone in general. I'm sure the battery life complaints have reduced G1 sales, and yet my own G1 doesn't seem to have such terrible battery life. If JBQ says their research linked these complaints to specific apps (like Locale) then I believe them. Kill the few to save the many? Additionally, I don't think the average teenager or grand-mother knows what any of the fine grain permissions in Android mean and will just go ahead and allow any app to have the permissions it wants. Some people won't read them, I agree. They might lose. However, this is still a huge upgrade from the current state of desktop computing, where no matter how skilled or careful you are, you are guaranteed to lose because you have no idea or control over what apps do. Being somewhat knowledgable, I wonder if the app is using the permission for the stated purpose or does it do more than it says. I agree that some permissions could be better thought out, the Prevent phone from sleeping permission needs to go (and probably can be removed when Android surfaces battery usage information better). The access internet permission needs to be split into several permissions IMHO, for instance basic internet access with caveats should be permission free, but internet access over a certain rate or on certain ports (eg smtp) should require permissions. Perhaps a same origin policy could be designed such that internet access to a programs home site is free but other sites require a permission. Of course it's not clear how you define home site. After all, what is the point of this permission? Preventing users getting big charges? Saving the net from abuse? I think the use case for this permission needs to be carefully thought out and then better permissions designed. However, I also see that the Android team have a ton of things on their plate, and that currently this permission isn't being abused. Fortunately it's possible to change permissions after the fact - permissions that aren't necessary any more can be silently granted, and permissions that need to be split can be done by making old apps request every new component. The only thing that can't be easily done is add permissions to things that previously didn't require them, this thread shows how painful that is. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Seeing Double ListView
... am I trying to do the impossible by using a SurfaceView and ListView in the same app? What it looks like to me is that the double buffering on the list is getting flummoxed. j On Sat, Apr 25, 2009 at 1:25 PM, Jason Van Anden jason.van.an...@gmail.com wrote: I am wondering if anyone else is encountering this issue (or if its just me). I converted an app I have been working on from using a regular view to using SurfaceView. The app accesses listviews to change properties of the elements I am drawing on a canvas. The listviews called from the SurfaceView version draw over themselves mis-registered when I scroll long lists quickly. If anyone out there has had a similar problem and/or has an idea what might be going on and/or has a suggestion as to how to fix this, please do! Thank You, Jason Van Anden --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Difficulty Resuming SurfaceView
Does GLSurfaceView do what you want? See the latest blog post. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Transparency on Views behaving differently in 1.5
Hi! I have a lot of Views where I have set a background image on the top LinearLayout and then I have nested a new linear layout below with a background that is semi-transparent. This works great in 1.1, but in 1.5 the transparency is just disregarded and this breaks my app as the text on top is now unreadable. Is this a bug or a feature? Is there a better way of doing this? Very grateful for any tips! Code example: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/ field android:id=@+id/root LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content android:id=@+id/bg android:background=#aa00 ... -Christer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Disable XSL transforms in HTTPClient
Is there a reference for that behavior? Can it really be true that an HTTP library includes an XSL transformer? That's some serious scope creep if so! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Smooth scrolling in surfaceview possible?
Anyone successfully managed to get smooth scrolling of large image in surfaceview. Always seems a bit jerky to me. I've checked garbage collection and used the code from lunar lander game but not very happy with results. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Recording Audio in a call
Is it going to be possible somehow? in g2 ? cupcake ? i wonder whether it is because of software limitations or hardware limitations... On Apr 25, 5:33 am, Mark Murphy mmur...@commonsware.com wrote: John Doe wrote: Hi guys. I have a question and i am looking for an answer for a very long time. I am trying to record audio when i call someone and when someone calls me.I am using phonestatelisteners and i am able to record audio from outside (my voice) when i call someone. however when somebody calls me it doesnt record my voice at all . I am trying to record my voice. Even if somebody calls me. But it works only in one direction :( If i call it records my voice if somebody calls it doesnt record my voice. Do you know if this is possible ? No, it is not possible, as I understand it. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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] Re: Cross process cursor using AbstractWindowedCursor
Never mind... I found a way to do it that 1) avoids messing around with custom cursors across process boundaries and 2) is likely more efficient anyway for large numbers of exported records. Setup: - Add export flag to table containing potentially exported records At export time: - Set export flag to 0 for all records - Set export flag to 1 for records matching export selection criteria - SQLite trigger (also added during setup) sets export flag to 2 for related records - Export query selects those records with a non-zero export flag If the user opts to not export related records, I simply skip the whole updating of the export flag and use the original export selection criteria in the export query. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: URGENT!!!!! Can't update apps in android market!!!
I am also getting this error. All I did, beyond incrementing my android:versionCode by one, was add: uses-sdk android:minSdkVersion=1 / to the XML. After that, I cannot upload any upgrade. Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] opengl display issue when using g.getHolder().setFormat(PixelFormat.RGBA_8888);
Ok, so I wanted to create a transparent activity where I draw some cubes on the screen. Well I initially was developing with the default settings where g.getHolder().setFormat(PixelFormat.RGBA_); my view in a real narrow scope see below code for sample. when not setting a alpha channel. it works as expected. when using g.getHolder().setFormat(PixelFormat.RGBA_); it causes me to zoom way out where my objects are really really small like 1/80th the screen AND i end up with dual view. where the screen is divided evenly in two where the objects are drawn two times in each view. whats going on? CODE... //i write directly to my actvitiy my surface view not using a layout.xml file g =new MySurfaceView(this,this.ballContext); g.setFocusable(true); v = g; setContentView((View)v); // Use a surface format with an Alpha channel: g.getHolder().setFormat(PixelFormat.RGBA_); when i glu my look at GLU.gluLookAt(gl, 0, 0, 3,0,0,0, 0,1,0); and my objects get drawn at a -7 depth into the screen. so not very far away. they are maybe 1/8 the screen when not using the alpha format float zOffset = -7.0f; initial gl set up gl.glEnable(GL10.GL_LIGHTING); gl.glEnable(GL10.GL_LIGHT0); gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_AMBIENT, matAmbient, 0); gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_DIFFUSE, matDiffuse, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, lightAmbient, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, lightDiffuse, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, lightPos, 0); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDepthFunc(GL10.GL_LEQUAL); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClearDepthf(1.0f); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, cubeBuff); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texBuff); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); gl.glEnable(GL10.GL_CULL_FACE); gl.glShadeModel(GL10.GL_SMOOTH); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: opengl display issue when using g.getHolder().setFormat(PixelFormat.RGBA_8888);
I forgot an interesting tid bit of information. There is not issue/ difference on the emulator when i use or dont use the alpha channel. the issue only occurs on the actual phone On Apr 25, 4:54 pm, William william.caine...@gmail.com wrote: Ok, so I wanted to create a transparent activity where I draw some cubes on the screen. Well I initially was developing with the default settings where g.getHolder().setFormat(PixelFormat.RGBA_); my view in a real narrow scope see below code for sample. when not setting a alpha channel. it works as expected. when using g.getHolder().setFormat(PixelFormat.RGBA_); it causes me to zoom way out where my objects are really really small like 1/80th the screen AND i end up with dual view. where the screen is divided evenly in two where the objects are drawn two times in each view. whats going on? CODE... //i write directly to my actvitiy my surface view not using a layout.xml file g =new MySurfaceView(this,this.ballContext); g.setFocusable(true); v = g; setContentView((View)v); // Use a surface format with an Alpha channel: g.getHolder().setFormat(PixelFormat.RGBA_); when i glu my look at GLU.gluLookAt(gl, 0, 0, 3,0,0,0, 0,1,0); and my objects get drawn at a -7 depth into the screen. so not very far away. they are maybe 1/8 the screen when not using the alpha format float zOffset = -7.0f; initial gl set up gl.glEnable(GL10.GL_LIGHTING); gl.glEnable(GL10.GL_LIGHT0); gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_AMBIENT, matAmbient, 0); gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_DIFFUSE, matDiffuse, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, lightAmbient, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, lightDiffuse, 0); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, lightPos, 0); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDepthFunc(GL10.GL_LEQUAL); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClearDepthf(1.0f); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, cubeBuff); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texBuff); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); gl.glEnable(GL10.GL_CULL_FACE); gl.glShadeModel(GL10.GL_SMOOTH); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SDK1.5 AudioRecord sample rate problem
Dave, Yoni, Thank you for replying. Is this on the emulator? If so, it may be a limitation of the emulator. Yes, I experienced the problem using the 1.5 prerelease SDK emulator. I dont know how the G1 would behave. Make sure you're using 16 bit samples.. I have tried pretty much ALL permutations of the different parameters, including PCM_16BIT, with no DEFAULTS. Still, Recording works only with a sample rate of 8000Hz. From now on I will assume its an issue with the pre release 1.5 emulator that will get fixed into the final version. Dave, is it enough that you know about this issue, or am I supposed to fill out a bugreport somewhere? Best regards, -szabolcs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: URGENT!!!!! Can't update apps in android market!!!
The market doesn't seem to accept minSdkVersion=2. You must use 1. On Apr 25, 10:42 am, aleung leoli...@gmail.com wrote: When I didn't add the minSdkVersion, I got the error message: Market requires theminSdkVersionto be set in AndroidManifest.xml. But even after I added it, there was still error: The server could not process your apk. Try again. I have added the uses-sdk as the first child of manifest: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=leoliang.bettermylocation android:versionCode=9 android:versionName=1.4.1 uses-sdk android:minSdkVersion=2 / On Apr 25, 3:10 am, Hw3699 hw3...@gmail.com wrote: What's your solution? I got the same issure. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.innersocial.planner android:versionCode=1 android:versionName=1.1.1 uses-sdk android:minSdkVersion=1/uses-sdk It doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Proper usage of object passing for TabActivity/TabHost
I'm working on a TabActivity with 4 tabs, each of which works on various data pieces in a single data object. I have a few questions: - What is the best way to make this object available across all these activities? Is it as an object defined in the TabActivity and visible to each of the children? - How do you pass the result set by a child activity back through the parent? I'm always getting RESULT_CANCELED at the activity calling the TabActivity regardless of what I set in the child activity. - getLastNonConfigurationInstance() doesn't seem to work with these child activities, is this expected? When my child activity was a standalone activity the code worked fine but now as a child it does not. Any help is appreciated. There doesn't seem to be lots of good information about TabActivity/TabHost out there anywhere. Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlitecursor exceptions while debugging
Hi, When I debug I constantly get SQLiteCursor exceptions (see below) that don't seem to affect the program functioning or reference any of my code but make debugging a pain. Is this normal or indicative of a problem with my system or code? Daemon System Thread [5 HeapWorker] (Suspended (exception IllegalStateException)) SQLiteCursor.finalize() line: 448 NativeStart.run() line: not available [native method] Thanks, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: opengl display issue when using g.getHolder().setFormat(PixelFormat.RGBA_8888);
On Apr 25, 9:54 pm, William william.caine...@gmail.com wrote: Ok, so I wanted to create a transparent activity where I draw some cubes on the screen. Well I initially was developing with the default settings where g.getHolder().setFormat(PixelFormat.RGBA_); my view in a real narrow scope see below code for sample. when not setting a alpha channel. it works as expected. As well as setting the SurfaceHolder format you need to tell EGL that you want a matching config: egl.eglChooseConfig(display, new int[] { EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_ALPHA_SIZE, 8, // No depth buffer: EGL10.EGL_DEPTH_SIZE, 0, EGL10.EGL_NONE }, configs, configs.length, new int[1]); Unfortunately, when you done that you'll probably run into issue 1963: http://code.google.com/p/android/issues/detail?id=1963 I don't have a solution for that one. -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] What UI Elements in AppWidget?
Just wonder what limitations there are for UI elements in AppWidgets? I tried a ListView and was met with an error... I saw the other post that EditText isn't available. Just wondering if there was a full list somewhere? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: What UI Elements in AppWidget?
Here ya go: http://groups.google.com/group/android-developers/msg/a5247467151f5e3a j On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software justin.shapc...@gmail.com wrote: Just wonder what limitations there are for UI elements in AppWidgets? I tried a ListView and was met with an error... I saw the other post that EditText isn't available. Just wondering if there was a full list somewhere? -- Jeff Sharkey jshar...@google.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Get scroll speed of a Listview
Thanks for pointing me on the right direction, I also found that List13 example on ApiDemos uses the same method. Ivan Soto Fernandez Web Developer http://ivansotof.com On Fri, Apr 24, 2009 at 8:36 PM, Romain Guy romain...@google.com wrote: Use ListView's scroll listener. You can see how I used it to implement exactly what you describe in my app called Shelves: http://code.google.com/p/shelves On Fri, Apr 24, 2009 at 6:48 PM, Ivan Soto ivanso...@gmail.com wrote: (Oops, I tabbed extra then Enter... msg sent, blame gmail hehe) I've been playing around with some apps for iphone I realized that a lot of them load pictures from lists when they are slowing down (or stopped). That really increases the overall performance On those apps, if I scroll fast I don't really see any picture loaded on the lists, but If the scrolls starts slowing down or stops all pictures come. Anyone has an idea how to achieve this? Is there a way to know if a Listview is scrolling and how fast it's going? Thanks! Ivan Soto Fernandez Web Developer http://ivansotof.com On Fri, Apr 24, 2009 at 7:40 PM, Ivan Soto ivanso...@gmail.com wrote: Ivan Soto Fernandez Web Developer http://ivansotof.com -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What UI Elements in AppWidget?
Awesome. Thanks. Not sure why it didn't come up in my search? Oh well, I appreciate the quick response... It helps a lot. On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote: Here ya go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a j On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software justin.shapc...@gmail.com wrote: Just wonder what limitations there are for UI elements in AppWidgets? I tried a ListView and was met with an error... I saw the other post that EditText isn't available. Just wondering if there was a full list somewhere? -- Jeff Sharkey jshar...@google.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ImageView 's layout_width and layout_height
On Sun, Apr 19, 2009 at 12:31 PM, Mark Murphy mmur...@commonsware.com wrote: Lucius Fox wrote: Do I need to set the height/width specifically for my ImageView to match my backgroundDrawable? Or it will pick up automatically. ImageView scales the image to fit the view size, not the other way around. I would assume you need to tell the ImageView's layout the new size to use for the ImageView to prevent such scaling. Thank you. How can I set the ImageView in java code programically? I tried calling imageView.setMinimumWidth(), setMinimumHeight(), but Hierchary View still shows the width is 80 and height is 100. Can you please tell me how to solve my problem? Thank you. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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] Re: URGENT!!!!! Can't update apps in android market!!!
Even with 1 this does not work. I still get The server could not process your apk. Try again. I've pasted the relevant AndroidManifest.xml code below. Is there anything else that is wrong? Perhaps use of the custom Application (vs. the default Application) is throwing the XML parser for a loop? (I hope not; I've been using this structure for AndroidManifest for over a month now!) ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.my.package android:versionName=1.071 android:versionCode=20 uses-sdk android:minSdkVersion=1 / application android:icon=@drawable/icon android:label=@string/ app_name android:name=com.my.package.MyApplication activity android:name=.MyAppActivity android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=RouteChooser/activity activity android:name=DirChooser/activity activity android:name=StopChooser/activity activity android:name=UserRouteNameActivity/activity activity android:name=PreferencesActivity/activity activity android:name=com.my.package.map.MapViewActivity/ activity uses-library android:name=com.google.android.maps / /application uses-permission android:name=android.permission.VIBRATE/uses- permission uses-permission android:name=android.permission.INTERNET/uses- permission /manifest Thanks for the help! Jason On Apr 25, 5:14 pm, Randy McEoin rmce...@gmail.com wrote: The market doesn't seem to accept minSdkVersion=2. You must use 1. On Apr 25, 10:42 am, aleung leoli...@gmail.com wrote: When I didn't add the minSdkVersion, I got the error message: Market requires theminSdkVersionto be set in AndroidManifest.xml. But even after I added it, there was still error: The server could not process your apk. Try again. I have added the uses-sdk as the first child of manifest: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=leoliang.bettermylocation android:versionCode=9 android:versionName=1.4.1 uses-sdk android:minSdkVersion=2 / On Apr 25, 3:10 am, Hw3699 hw3...@gmail.com wrote: What's your solution? I got the same issure. manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.innersocial.planner android:versionCode=1 android:versionName=1.1.1 uses-sdk android:minSdkVersion=1/uses-sdk It doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 draw a rectangle on screen using layout.xml file
Hi, I am trying to draw a rectangle using layout.xml file without java code. So this is what I tried: LinearLayout color android:layout_width=wrap_content android:layout_height=10dp android:color=#00ff00 / /LinearLayout But I get these error when i run it in emulator: E/AndroidRuntime( 760): Caused by: java.lang.ClassNotFoundException: android.view.color in loader dalvik.system.pathclassloa...@435c9be8 E/AndroidRuntime( 760):at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) E/AndroidRuntime( 760):at java.lang.ClassLoader.loadClass(ClassLoader.java:573) E/AndroidRuntime( 760):at java.lang.ClassLoader.loadClass(ClassLoader.java:532) E/AndroidRuntime( 760):at android.view.LayoutInflater.createView(LayoutInflater.java:465) E/AndroidRuntime( 760):at android.view.LayoutInflater.onCreateView(LayoutInflater.java:543) E/AndroidRuntime( 760):at com.android.internal.policy.impl.PhoneLayoutInfl Can you please tell me how can I do 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Transparency on Views behaving differently in 1.5
I can't think of anything that could have changed here -- there is really nothing special the view hierarchy does in this case, it is just drawing the views on on top of the other in Z-order. And we certainly have transparent background working in many other places, such as the background image used for buttons etc. Does this change happen with the current binary of your app, or after you recompile it against 1.5? On Sat, Apr 25, 2009 at 12:32 PM, Chister Nordvik cnord...@gmail.comwrote: Hi! I have a lot of Views where I have set a background image on the top LinearLayout and then I have nested a new linear layout below with a background that is semi-transparent. This works great in 1.1, but in 1.5 the transparency is just disregarded and this breaks my app as the text on top is now unreadable. Is this a bug or a feature? Is there a better way of doing this? Very grateful for any tips! Code example: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/ field android:id=@+id/root LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content android:id=@+id/bg android:background=#aa00 ... -Christer -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: orientation change runtime option?
You can certainly have a user preference that lets them select between sensor, nosensor, portrait, landscape, and set that in the activity when it starts with the API on Activity. On Sat, Apr 25, 2009 at 11:15 AM, andrew andrewsach...@gmail.com wrote: Thanks for your quick response. My app is kind of specialized and I think users might want it to respond differently to orientation changes than the default (I get a lot of requests for that, hence the android:screenOrientation=sensor ). Is there any other approach I can take that would essentially change the value of the screenOrientation at runtime? I think I have seen apps where the user selects how to respond to orientation changes. On Apr 25, 12:30 pm, Dianne Hackborn hack...@android.com wrote: I would suggest not doing anything special and letting users select what they want in the global pref that is in 1.5. On Fri, Apr 24, 2009 at 7:21 PM, andrew andrewsach...@gmail.com wrote: Hi, Is it possible to have a user choose how an app should respond to orientation changes? I have it set to android:screenOrientation=sensor in the manifest but I would like users to be able to turn this on and off or set landscape or portrait orientation permanently. Thanks, Andrew -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---