[android-developers] Re: need help with softkeyboard development
Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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: Failed to upload .apk on device
I have just fixed this problem. You can turn off usb debug in Setting --- Apllication Development, then turn on usb debug. On Sep 3, 7:09 am, Phil wolf...@gmail.com wrote: I had this same error come up after successfully uploading to my android device many times. My solution was to use a different USB cable. I've read a different USB port might also solve the issue. On Aug 17, 10:36 pm, Lukas Adamec luk.ada...@gmail.com wrote: Phone has debugging allowed and I've set android:debuggable=true in manifest. Is it what that what you mean? It's not solve my problem. On 18 srp, 03:46, Jenus Dong jenus.ne...@gmail.com wrote: You should set the phone to debug allowed. Cause your apk is packaged with debug signature. Try it. On Tue, Aug 17, 2010 at 4:47 PM, Lukas Adamec luk.ada...@gmail.com wrote: I've checked what you adviced me, but the problem hasn't been solved. Here is log from DDMS: [2010-08-17 10:29:50 - ddms]transfer error: Permission denied [2010-08-17 10:29:50 - Device]Unabletoopensyncconnection! reason: Unableto upload file: Permission denied Device runs on Android 1.5, so I've set minSdkVersion=3 in manifest and target=android-3 in default.properties. When I copy .apk to SD card, application runs normally. But in Eclipse not. I need debugging, so I need run it from Eclipse. I don't know, what is wrong. On 16 srp, 15:49, RichardC richard.crit...@googlemail.com wrote: I can't seen anything in your manifest that might be a problem. Things to try/check: Have you set the flag - settings Application Unknown sources ? Try setting targetSdkVersion to 4 in your manifest On Aug 16, 5:27 am, Lukas Adamec luk.ada...@gmail.com wrote: AndroidManifest.xml: ?xml version=1.0 encoding=utf-8 ? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=cz.xadamec1.apps.bitmap android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true activity android:name=.BitmapDrawing android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest On 15 srp, 21:13, RichardC richard.crit...@googlemail.com wrote: Can we see your manifest please? On Aug 15, 7:43 pm, LukasAdamecluk.ada...@gmail.com wrote: If somebody dealt with this kind of problem, could you give me some advice. I would really appreciate it. Thanks On 12 srp, 14:47, LukasAdamecluk.ada...@gmail.com wrote: Hi, I have problem with uploading my .apk file on device Highscreen Zeus. In emulator everything works fine, but when I can upload application on the device, I always get following error: [2010-08-12 14:41:25 - BitmapDrawing] Failed to upload BitmapDrawing.apk on device 'ZUSM1M10A02691' [2010-08-12 14:41:25 - BitmapDrawing]java.io.IOException:Unable to upload file: Permission denied [2010-08-12 14:41:25 - BitmapDrawing] Launch canceled! Could somebody advise me, how to solve this problem? Thanks a lot. Lukas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Failed to upload .apk on device
I have just fixed this problem. You can turn off usb debug in Setting --- Apllication Development, then turn on usb debug. On Sep 3, 7:09 am, Phil wolf...@gmail.com wrote: I had this same error come up after successfully uploading to my android device many times. My solution was to use a different USB cable. I've read a different USB port might also solve the issue. On Aug 17, 10:36 pm, Lukas Adamec luk.ada...@gmail.com wrote: Phone has debugging allowed and I've set android:debuggable=true in manifest. Is it what that what you mean? It's not solve my problem. On 18 srp, 03:46, Jenus Dong jenus.ne...@gmail.com wrote: You should set the phone to debug allowed. Cause your apk is packaged with debug signature. Try it. On Tue, Aug 17, 2010 at 4:47 PM, Lukas Adamec luk.ada...@gmail.com wrote: I've checked what you adviced me, but the problem hasn't been solved. Here is log from DDMS: [2010-08-17 10:29:50 - ddms]transfer error: Permission denied [2010-08-17 10:29:50 - Device]Unabletoopensyncconnection! reason: Unableto upload file: Permission denied Device runs on Android 1.5, so I've set minSdkVersion=3 in manifest and target=android-3 in default.properties. When I copy .apk to SD card, application runs normally. But in Eclipse not. I need debugging, so I need run it from Eclipse. I don't know, what is wrong. On 16 srp, 15:49, RichardC richard.crit...@googlemail.com wrote: I can't seen anything in your manifest that might be a problem. Things to try/check: Have you set the flag - settings Application Unknown sources ? Try setting targetSdkVersion to 4 in your manifest On Aug 16, 5:27 am, Lukas Adamec luk.ada...@gmail.com wrote: AndroidManifest.xml: ?xml version=1.0 encoding=utf-8 ? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=cz.xadamec1.apps.bitmap android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true activity android:name=.BitmapDrawing android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest On 15 srp, 21:13, RichardC richard.crit...@googlemail.com wrote: Can we see your manifest please? On Aug 15, 7:43 pm, LukasAdamecluk.ada...@gmail.com wrote: If somebody dealt with this kind of problem, could you give me some advice. I would really appreciate it. Thanks On 12 srp, 14:47, LukasAdamecluk.ada...@gmail.com wrote: Hi, I have problem with uploading my .apk file on device Highscreen Zeus. In emulator everything works fine, but when I can upload application on the device, I always get following error: [2010-08-12 14:41:25 - BitmapDrawing] Failed to upload BitmapDrawing.apk on device 'ZUSM1M10A02691' [2010-08-12 14:41:25 - BitmapDrawing]java.io.IOException:Unable to upload file: Permission denied [2010-08-12 14:41:25 - BitmapDrawing] Launch canceled! Could somebody advise me, how to solve this problem? Thanks a lot. Lukas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: need help with softkeyboard development
An IME is essentially just a regular UI that is running as an InputMethodService, which makes calls on InputConnection to do whatever editing operations it wants. If you are stuck on changing the keyboard UI to some other kind of UI, that isn't really anything specific to writing an IME but just standard android UI -- look at the documentation on View etc to see how to write UI. You can simply make a single View that you set as your UI, and do all your drawing in onDraw() and receive touch events in onTouchEvent(). Then based on whatever you do for that do calls on InputConnection as the soft keyboard sample shows. On Sat, Sep 11, 2010 at 11:01 PM, Saied saie...@gmail.com wrote: Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to launch the app from the Web page?
Please don't use a scheme unless it is one that you have registered. Schemes are global to the universe, and since you will be putting this out in the universe via your web page you want to follow the rules for them. Another approach you can take is to just create an Intent that you want to have launched, and print the result of Intent.toUri() to get the string to use in your link. (This should be an intent: URI.) Then you probably want to just make your own action following the standard naming conventions which that Intent will use. You can even use Intent.setPackage() to make sure that only your app can be launched from the link, if you want. (Do note you can't use Intent.setComponent() for this for security reasons.) On Sat, Sep 11, 2010 at 6:46 PM, ls02 agal...@audible.com wrote: I added to the manifest file for the activity to be launched: intent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category category android:name=android.intent.category.BROWSABLE/category data android:scheme=my_scheme/ /intent-filter I load the link in WebView: mWebView.loadData(a href=\my_scheme://launch_my_app/refresh_all \Launch App/a, text/html, utf-8); When I click on the link I get the error -10 The protocol is not supported in My WebViewClient.OnReceivedError override. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: is there a way to implement screenshot functionality in android
Actually, I want to get access to the screen as well. I have a market application called Steamy Windows which appears to do exactly this. So I am thinking it must be possible ... On Sep 11, 12:06 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 10, 2010 at 9:53 AM, dadada ytbr...@gmail.com wrote: question as above! This is not supported, for security reasons. There are apparently ways you can get something to work if you root your phone. And, of course, you can do screenshots from outside your phone using DDMS. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Possible to display a string or button on top a listview?
Hi, I can seems to get it write. What is wrong with my layout? ---code--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/main android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/test / !-- Note built-in ids for 'list' and 'empty' -- ListView android:id=@android:id/list android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@android:id/empty android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/empty / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: is there a way to implement screenshot functionality in android
This application is just a transparent activity. On Sat, Sep 11, 2010 at 11:39 PM, Peter Webb r.peter.w...@gmail.com wrote: Actually, I want to get access to the screen as well. I have a market application called Steamy Windows which appears to do exactly this. So I am thinking it must be possible ... On Sep 11, 12:06 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 10, 2010 at 9:53 AM, dadada ytbr...@gmail.com wrote: question as above! This is not supported, for security reasons. There are apparently ways you can get something to work if you root your phone. And, of course, you can do screenshots from outside your phone using DDMS. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com 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: Testing C2DM service on Android 2.2 emulator
Hi, I have the same problem - not quite sure what I'm doing wrong. I'd like to use the emulator to be able to check the networking. Perhaps my c2dm account isn't really set up yet. Regards, Julius. On Sep 10, 9:08 pm, Hatch tomislav.hecimo...@gmail.com wrote: Been trying for ages (at least, so it seems) I am using Google APIs 8,rev2. Keep getting the same result. Something just isn't geting digested in the auth layer :( Any tips ? (scenario: simple c2dm registration - failing, chrome to phone - working ok !) Regards, Hatch On Aug 19, 12:15 pm, xianhao lv xianhao...@gmail.com wrote: Try Google APIs by Google Inc., Android API 8, revision2 if SDK api8 revision 2 doesn't work. On Thu, Aug 19, 2010 at 6:09 PM, xianhao lv xianhao...@gmail.com wrote: Maybe you should use SDK platform Android 2.2 API 8 revision 2 to have a try. But I got the following errors: 8-19 09:56:08.777: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.557: WARN/DefaultRequestDirector(171): Authentication error: Unable to respond to any of these challenges: {} 08-19 09:56:10.557: DEBUG/C2DMRegistrar(171): [C2DMRegistrar.22] register: http error 401 08-19 09:56:10.557: ERROR/C2DMRegistrar(171): [C2DMReg] handleRequest caught org.apache.http.auth.AuthenticationException 08-19 09:56:10.647: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.967: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:36.147: WARN/DeviceRegistrar(275): Registration error Read error: Failure in SSL library, usually a protocol error On Thu, Aug 12, 2010 at 4:24 AM, Mark Murphy mmur...@commonsware.comwrote: Make sure you have set up a Google account in the emulator (Settings Accounts). On Wed, Aug 11, 2010 at 4:00 PM, Sean Liao wirelessw...@gmail.com wrote: I am having the same problem ... any solution or any pointer? On Tue, Jul 6, 2010 at 9:59 AM, guligo igors.gulbins...@gmail.com wrote: Hi guys, I am playing around with C2DM service. What I am concerned about is that I cannot test my device-side application from Android 2.2 emulator. The application was built more or less according to http://code.google.com/android/c2dm/index.htmldoc, but when register intent is sent from application, Logcat shows this: Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found I also tried to run chrometophone and jumpnote applications and the result is the same when registring device. Any ideas? ...main question probably - is it possible to test C2DM service from Android emulator? 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Possible to display a string or button on top a listview?
You can't use wrap_content with a list view, because that will cause it to expand to whatever size its full contents are. If you want the list view to expand to fill all space except the text views above and below, use android:layout_height=0px and android:layout_weight=1 on it. On Sat, Sep 11, 2010 at 11:42 PM, Mystique joven.ch...@gmail.com wrote: Hi, I can seems to get it write. What is wrong with my layout? ---code--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/main android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/test / !-- Note built-in ids for 'list' and 'empty' -- ListView android:id=@android:id/list android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@android:id/empty android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/empty / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can android support more than one sdcard?
Hi Dianne, Thank you for confirming my expectations. I hope your colleagues will consider device enumeration as being important for limiting future fragmentation of a supposedly open platform and for encouraging new application areas, going well beyond nice. Regards On Sep 12, 12:40 am, Dianne Hackborn hack...@android.com wrote: Well you are totally missing my point. Of course it would be *nice* to support an arbitrary number of everything. To actually ship a product on time, though, you probably aren't going to be able to do so. The SD card is an especially good case of this, because it's not just a matter of adding an API -- you also need to figure out the whole UX around this, which is fairly non-trivial. Anyway, done with this thread. On Sat, Sep 11, 2010 at 1:51 AM, blindfold seeingwithso...@gmail.comwrote: A marketing or engineering department that can't accept limitations is an organization that will never ship a product. When you are a research department you aim to develop new products rather than shorten time to market. When even the basic building blocks are already highly restrictive it becomes much harder to innovate. Although this thread is mostly about having a second SD card, your comments seem to indicate a general attitude towards and lack of interest in generalized API support for enumerating peripherals: I'll only support one camera! Okay. Not OK! If one wants to compete on the market one has to look at competitors that already sport two cameras, such as a front-facing camera. Think many Nokia phones, and Apple's iPhone 4G. (I added second camera support to my own Nokia Java MIDlet app back in 2006.) Do you want every Android phone manufacturer to invent and develop their own proprietary Android API extensions even to just keep up with existing functionality elsewhere? You encourage fragmentation! Also, please look across platform boundaries as well as look at broadening the scope towards gaming devices. What Microsoft is doing with Kinect (formerly Natal) involves either a stereo camera or a time- of-flight camera. Do you want individual Android device manufacturers to create proprietary API extensions here too? Why make it impossible to develop an Android counterpart of the Nintendo 3DS by sticking to a conventional single camera API, forcing proprietary extensions? Thanks! The vOICe for Android http://www.seeingwithsound.com/android.htm On Sep 11, 3:04 am, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 2:33 PM, Doug Gordon gordo...@gmail.com wrote: I am really surprised that the Android design would only account for one of anything. In my experience, any time you say we're only going to support one of feature X, the marketing or engineering departments decide to add another X. In any case, having support for more than one is the same as having support for any quantity. U... I'll only support one touch screen! Okay. I'll only support one DPAD! Okay. I'll only support one CPU! Okay. I'll only support one graphics accelerator! Okay. I'll only support one SIM! Okay. I'll only support one headphone output! Okay. I'll only support one camera! Okay. A marketing or engineering department that can't accept limitations is an organization that will never ship a product. (And you don't note all of the complexity that comes from going from 1 to 2 -- how is this reflecting in the UI? How does the user decide where they want their stuff to go? How about telling them how much space is where? And now you've got to let them move stuff around. I can make a good argument that multiple SD cards is just intrinsically a crummy user experience and should be avoided. Heck even one SD card significantly complicates the UX.) -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because
[android-developers] Re: how to compile a helloworld in AOSP- Entire android source code..!! Couldnt see apk generated.
I think it' s not good to refer Launcher2's Android.mk see here http://source.android.com/porting/build_cookbook.html The following is a very simple example. You just need to change LocalPackage to Helloworld you want to create as APK's name. Building a simple APK --- LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) # Build all java files in the java subdirectory LOCAL_SRC_FILES := $(call all-subdir-java-files) # Name of the APK to build LOCAL_PACKAGE_NAME := LocalPackage # Tell it to build an APK include $(BUILD_PACKAGE) - On Sep 12, 12:11 pm, mani smanikanda...@gmail.com wrote: I wanted to run a helloworld application with the AOSP and see it in emulator. [ Not through Android SDK setup] I followed the steps inhttp://source.android.com/source/download.html and compiled successfully the full code from / directory. I could see contacts.apk, camera.apk all applications apk in ~/mydroid/out/target/product/generic/system/app. I tried two things. 1 - Went to /package/apps folder. Took a helloworld application( helloworld folder which was created in android-sdk), and copied a 'Android.mk' file from Launcher2 folder, kept my new name for application 'LOCAL_PACKAGE_NAME := helloworld' and placed the folder in packages/app folder and compiled at /. I couldnt see .apk file created for helloworld in ~/mydroid/out/ target/product/generic/system/app. 2 - I went to Launcher2 folde /package/apps/Launcher2. I changed the package name for Launcher2 in packages/app folder in 'Android,mk' file and compiled at root. I couldnt see a new apk created on the new packaged name( i gave) under ~/mydroid/out/target/product/generic/system/app. I tried several times with changes in activity names, application names in manifest.xml file. Nothing reflects.But it is sure, both helloworld, and change in package name is getting picked up while compiling. I could see intermediate classes getting created. ~/mydroid/out/target/common/obj/APPS/manifirst_intermediates/src/com/ android/mani -- manifirst is like a helloworld which i created and run. ~/mydroid/out/target/common/obj/APPS/Launcher2_intermediates/src/com/ android/launcher Could anyone please share the steps of compiling a simple Helloworld program in AOSP.? Thanks, Mani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I write Android.mk for an application using com.google.android.maps.jar
Yes, you're right. it's more related to android-platform. Anyway thank you for reply. Actually. as you mentioned, it's done already. but I'll check it again.. Thank you... On Sep 8, 4:55 pm, FrankG frankgru...@googlemail.com wrote: What is wrong? IMHO first of all the group, as this is more related to android- platform. The strange thing for me is, why Google -Maps is not part of your platform as vendor extension under app\mydroid\vendor\google\frameworks ? I have no idea whether your approach can work. I think you need to create your own google maps extension dir and put their a Android.mk which will force to install the maps jar under /system/ framework Somethink like this .. LOCAL_MODULE := com.google.android.maps.jar LOCAL_MODULE_CLASS := JAVA_LIBRARIES LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES) LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) Take this as a starting point only as this is not complete. Good luck ! Frank On 27 Aug., 02:56, Binggrae bangg...@gmail.com wrote: Hi I am developing an application using com.google.android.maps.jar It is OK to develop it with Eclipse SDK. but an build-error happens when building system.img with GMS licence (com.google.android.maps.jar is already installed at out/target/common/ obj/JAVA_LIBRARIES/com.google.android.maps.jar_intermediates/ com.google.android.maps.jar) make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/ com.google.android.maps.jar_intermediates/javalib.jar', needed by `out/ target/common/obj/APPS/LifeStory_intermediates/classes-full- debug.jar'. Stop. Here is my Android.mk #=== LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := user # List of static libraries to include in the package LOCAL_STATIC_JAVA_LIBRARIES := com.google.android.maps.jar LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := Test include $(BUILD_PACKAGE) #=== What is wrong? please help me.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Testing C2DM service on Android 2.2 emulator
Hi, Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found Oh maybe this can't be done in the emulator: To develop and debug on an actual device, you need a device running an Android 2.2 system image that includes the Market application. I don't have Market in the emulator. If this is why I can't do this, it would be great to know. Cheers, Julius. On 12/09/2010, at 6:48 PM, julius wrote: Hi, I have the same problem - not quite sure what I'm doing wrong. I'd like to use the emulator to be able to check the networking. Perhaps my c2dm account isn't really set up yet. Regards, Julius. On Sep 10, 9:08 pm, Hatch tomislav.hecimo...@gmail.com wrote: Been trying for ages (at least, so it seems) I am using Google APIs 8,rev2. Keep getting the same result. Something just isn't geting digested in the auth layer :( Any tips ? (scenario: simple c2dm registration - failing, chrome to phone - working ok !) Regards, Hatch On Aug 19, 12:15 pm, xianhao lv xianhao...@gmail.com wrote: Try Google APIs by Google Inc., Android API 8, revision2 if SDK api8 revision 2 doesn't work. On Thu, Aug 19, 2010 at 6:09 PM, xianhao lv xianhao...@gmail.com wrote: Maybe you should use SDK platform Android 2.2 API 8 revision 2 to have a try. But I got the following errors: 8-19 09:56:08.777: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.557: WARN/DefaultRequestDirector(171): Authentication error: Unable to respond to any of these challenges: {} 08-19 09:56:10.557: DEBUG/C2DMRegistrar(171): [C2DMRegistrar.22] register: http error 401 08-19 09:56:10.557: ERROR/C2DMRegistrar(171): [C2DMReg] handleRequest caught org.apache.http.auth.AuthenticationException 08-19 09:56:10.647: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.967: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:36.147: WARN/DeviceRegistrar(275): Registration error Read error: Failure in SSL library, usually a protocol error On Thu, Aug 12, 2010 at 4:24 AM, Mark Murphy mmur...@commonsware.comwrote: Make sure you have set up a Google account in the emulator (Settings Accounts). On Wed, Aug 11, 2010 at 4:00 PM, Sean Liao wirelessw...@gmail.com wrote: I am having the same problem ... any solution or any pointer? On Tue, Jul 6, 2010 at 9:59 AM, guligo igors.gulbins...@gmail.com wrote: Hi guys, I am playing around with C2DM service. What I am concerned about is that I cannot test my device-side application from Android 2.2 emulator. The application was built more or less according to http://code.google.com/android/c2dm/index.htmldoc, but when register intent is sent from application, Logcat shows this: Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found I also tried to run chrometophone and jumpnote applications and the result is the same when registring device. Any ideas? ...main question probably - is it possible to test C2DM service from Android emulator? 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google
[android-developers] Re: Possible to display a string or button on top a listview?
Hi, thanks for the advice. Not sure what is wrong, I try putting android:layout_height=0px and android:layout_weight=1 but it still doesn't appear. On Sep 12, 2:55 pm, Dianne Hackborn hack...@android.com wrote: You can't use wrap_content with a list view, because that will cause it to expand to whatever size its full contents are. If you want the list view to expand to fill all space except the text views above and below, use android:layout_height=0px and android:layout_weight=1 on it. On Sat, Sep 11, 2010 at 11:42 PM, Mystique joven.ch...@gmail.com wrote: Hi, I can seems to get it write. What is wrong with my layout? ---code--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/main android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/test / !-- Note built-in ids for 'list' and 'empty' -- ListView android:id=@android:id/list android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@android:id/empty android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/empty / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Call Blocking through ndk or latest sdk
Hi , is it possible to block a call through ndk in Android 2.1 and later OS ,please refer to some materiel/code snippt to how to achieve that ? or still it is impossible to do ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Testing C2DM service on Android 2.2 emulator
Uh disregard that I didn't see the next bit: To develop and test on the Android Emulator, you need to download the Android 2.2 version of the Google APIs Add-On into your SDK using the Android SDK and AVD Manager. Specifically, you need to download the component named Google APIs by Google Inc, Android API 8. Then, you need to set up an AVD that uses that system image. On 12/09/2010, at 7:30 PM, Julius Spencer wrote: Hi, Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found Oh maybe this can't be done in the emulator: To develop and debug on an actual device, you need a device running an Android 2.2 system image that includes the Market application. I don't have Market in the emulator. If this is why I can't do this, it would be great to know. Cheers, Julius. On 12/09/2010, at 6:48 PM, julius wrote: Hi, I have the same problem - not quite sure what I'm doing wrong. I'd like to use the emulator to be able to check the networking. Perhaps my c2dm account isn't really set up yet. Regards, Julius. On Sep 10, 9:08 pm, Hatch tomislav.hecimo...@gmail.com wrote: Been trying for ages (at least, so it seems) I am using Google APIs 8,rev2. Keep getting the same result. Something just isn't geting digested in the auth layer :( Any tips ? (scenario: simple c2dm registration - failing, chrome to phone - working ok !) Regards, Hatch On Aug 19, 12:15 pm, xianhao lv xianhao...@gmail.com wrote: Try Google APIs by Google Inc., Android API 8, revision2 if SDK api8 revision 2 doesn't work. On Thu, Aug 19, 2010 at 6:09 PM, xianhao lv xianhao...@gmail.com wrote: Maybe you should use SDK platform Android 2.2 API 8 revision 2 to have a try. But I got the following errors: 8-19 09:56:08.777: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.557: WARN/DefaultRequestDirector(171): Authentication error: Unable to respond to any of these challenges: {} 08-19 09:56:10.557: DEBUG/C2DMRegistrar(171): [C2DMRegistrar.22] register: http error 401 08-19 09:56:10.557: ERROR/C2DMRegistrar(171): [C2DMReg] handleRequest caught org.apache.http.auth.AuthenticationException 08-19 09:56:10.647: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:10.967: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 08-19 09:56:36.147: WARN/DeviceRegistrar(275): Registration error Read error: Failure in SSL library, usually a protocol error On Thu, Aug 12, 2010 at 4:24 AM, Mark Murphy mmur...@commonsware.comwrote: Make sure you have set up a Google account in the emulator (Settings Accounts). On Wed, Aug 11, 2010 at 4:00 PM, Sean Liao wirelessw...@gmail.com wrote: I am having the same problem ... any solution or any pointer? On Tue, Jul 6, 2010 at 9:59 AM, guligo igors.gulbins...@gmail.com wrote: Hi guys, I am playing around with C2DM service. What I am concerned about is that I cannot test my device-side application from Android 2.2 emulator. The application was built more or less according to http://code.google.com/android/c2dm/index.htmldoc, but when register intent is sent from application, Logcat shows this: Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found I also tried to run chrometophone and jumpnote applications and the result is the same when registring device. Any ideas? ...main question probably - is it possible to test C2DM service from Android emulator? 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed
[android-developers] Getting platform files from command line
Hi Everyone, I apologize if I'm in the wrong place, and I apologize if you've already seen this message, but to the best of my knowledge this message never made it through (since I was a brand new user at the time) I can't figure out how to get the platform files for development, without running 'android' and starting the GUI. I want to avoid running GUI applications on my dev server, since it's headless and I don't want to forward X particularly. I can't imagine that it does anything more than figure out your platform, pull down a tarball and unpack it, surely this doesn't necessitate a gui, does anyone know how I can get the platform files without it? Cheers, Dan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: HTTP Multipart POST: data + text
Here code in server (example.php): ?php $target_path = uploads/; $target_path = $target_path . basename( $_FILES['myFile']['name']); if(move_uploaded_file($_FILES['myFile']['tmp_name'], $target_path)) { echo The file . basename( $_FILES['myFile']['name']). has been uploaded; } else{ echo There was an error uploading the file, please try again!; } //Text echo $_POST['textData']; ? I hope this helps On Sep 12, 8:43 am, David Tiago davidtiagoconcei...@gmail.com wrote: Hello, I would like to develop an application that uploads an image and some text data about that image. To do that, I am trying to create a HTTP Multipart Post, as follows: [code] HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(servlet address); FileBody file = new FileBody(new File(image file)); StringBody text = new StringBody(text data); MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); reqEntity.addPart(myFile, file); reqEntity.addPart(textData, text); [/code] My doubt is: how can I extract those values in the server? I would like to develop a Servlet to receive and process the post requests. In this Servlet I would need to extract these values in th request. Can you help me? Do you have any sample of server to answer the android multipart requests? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Possible to display a string or button on top a listview?
Try using hierarchyviewer to see what is going on with your layout. On Sun, Sep 12, 2010 at 12:30 AM, Mystique joven.ch...@gmail.com wrote: Hi, thanks for the advice. Not sure what is wrong, I try putting android:layout_height=0px and android:layout_weight=1 but it still doesn't appear. On Sep 12, 2:55 pm, Dianne Hackborn hack...@android.com wrote: You can't use wrap_content with a list view, because that will cause it to expand to whatever size its full contents are. If you want the list view to expand to fill all space except the text views above and below, use android:layout_height=0px and android:layout_weight=1 on it. On Sat, Sep 11, 2010 at 11:42 PM, Mystique joven.ch...@gmail.com wrote: Hi, I can seems to get it write. What is wrong with my layout? ---code--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/main android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/test / !-- Note built-in ids for 'list' and 'empty' -- ListView android:id=@android:id/list android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@android:id/empty android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/empty / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] is there a way to retrieve the latest image taken using system camera?
hi all, so i have an intent that use the system camera. so after i taken the photo, it brings me back my application. I want to display the image (just taken) as a thumbnail. How do i retrieve that latest image from MediaStore.Images.Thumbnails. thanks! bryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] java issues in mac and window
Which JDK version do you have installed on the Mac? Which JDK version is the tool that had issues using? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can android support more than one sdcard?
Do you practice at being this way, or is it a talent? On Sat, Sep 11, 2010 at 11:59 PM, blindfold seeingwithso...@gmail.comwrote: Hi Dianne, Thank you for confirming my expectations. I hope your colleagues will consider device enumeration as being important for limiting future fragmentation of a supposedly open platform and for encouraging new application areas, going well beyond nice. Regards On Sep 12, 12:40 am, Dianne Hackborn hack...@android.com wrote: Well you are totally missing my point. Of course it would be *nice* to support an arbitrary number of everything. To actually ship a product on time, though, you probably aren't going to be able to do so. The SD card is an especially good case of this, because it's not just a matter of adding an API -- you also need to figure out the whole UX around this, which is fairly non-trivial. Anyway, done with this thread. On Sat, Sep 11, 2010 at 1:51 AM, blindfold seeingwithso...@gmail.com wrote: A marketing or engineering department that can't accept limitations is an organization that will never ship a product. When you are a research department you aim to develop new products rather than shorten time to market. When even the basic building blocks are already highly restrictive it becomes much harder to innovate. Although this thread is mostly about having a second SD card, your comments seem to indicate a general attitude towards and lack of interest in generalized API support for enumerating peripherals: I'll only support one camera! Okay. Not OK! If one wants to compete on the market one has to look at competitors that already sport two cameras, such as a front-facing camera. Think many Nokia phones, and Apple's iPhone 4G. (I added second camera support to my own Nokia Java MIDlet app back in 2006.) Do you want every Android phone manufacturer to invent and develop their own proprietary Android API extensions even to just keep up with existing functionality elsewhere? You encourage fragmentation! Also, please look across platform boundaries as well as look at broadening the scope towards gaming devices. What Microsoft is doing with Kinect (formerly Natal) involves either a stereo camera or a time- of-flight camera. Do you want individual Android device manufacturers to create proprietary API extensions here too? Why make it impossible to develop an Android counterpart of the Nintendo 3DS by sticking to a conventional single camera API, forcing proprietary extensions? Thanks! The vOICe for Android http://www.seeingwithsound.com/android.htm On Sep 11, 3:04 am, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 2:33 PM, Doug Gordon gordo...@gmail.com wrote: I am really surprised that the Android design would only account for one of anything. In my experience, any time you say we're only going to support one of feature X, the marketing or engineering departments decide to add another X. In any case, having support for more than one is the same as having support for any quantity. U... I'll only support one touch screen! Okay. I'll only support one DPAD! Okay. I'll only support one CPU! Okay. I'll only support one graphics accelerator! Okay. I'll only support one SIM! Okay. I'll only support one headphone output! Okay. I'll only support one camera! Okay. A marketing or engineering department that can't accept limitations is an organization that will never ship a product. (And you don't note all of the complexity that comes from going from 1 to 2 -- how is this reflecting in the UI? How does the user decide where they want their stuff to go? How about telling them how much space is where? And now you've got to let them move stuff around. I can make a good argument that multiple SD cards is just intrinsically a crummy user experience and should be avoided. Heck even one SD card significantly complicates the UX.) -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: Can android support more than one sdcard?
Please stay on topic. Device enumeration is a generalization of the ability to have and use more than one SD card. You have made it quite clear now that you have little interest in that or in adding device enumeration for other device classes. On Sep 12, 9:54 am, Dianne Hackborn hack...@android.com wrote: Do you practice at being this way, or is it a talent? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to compile a helloworld in AOSP- Entire android source code..!! Couldnt see apk generated.
Hi Binggare thanks for the reply...!! I changed the .mk file as below and kept my helloworld folder under / package/apps and compiled at / Still i couldnt see the .apk generated in ~/mydroid/out/target/product/generic/system/app. I couldnt see in the emulator list though...!! Why is it so tough to build a Helloworld along with full source code. THere is no wiki available in http://source.android.com . - mani On Sep 12, 12:17 pm, Binggrae bangg...@gmail.com wrote: I think it' s not good to refer Launcher2's Android.mk see herehttp://source.android.com/porting/build_cookbook.html The following is a very simple example. You just need to change LocalPackage to Helloworld you want to create as APK's name. Building a simple APK --- LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) # Build all java files in the java subdirectory LOCAL_SRC_FILES := $(call all-subdir-java-files) # Name of the APK to build LOCAL_PACKAGE_NAME := LocalPackage # Tell it to build an APK include $(BUILD_PACKAGE) --- -- On Sep 12, 12:11 pm, mani smanikanda...@gmail.com wrote: I wanted to run a helloworld application with the AOSP and see it in emulator. [ Not through Android SDK setup] I followed the steps inhttp://source.android.com/source/download.html and compiled successfully the full code from / directory. I could see contacts.apk, camera.apk all applications apk in ~/mydroid/out/target/product/generic/system/app. I tried two things. 1 - Went to /package/apps folder. Took a helloworld application( helloworld folder which was created in android-sdk), and copied a 'Android.mk' file from Launcher2 folder, kept my new name for application 'LOCAL_PACKAGE_NAME := helloworld' and placed the folder in packages/app folder and compiled at /. I couldnt see .apk file created for helloworld in ~/mydroid/out/ target/product/generic/system/app. 2 - I went to Launcher2 folde /package/apps/Launcher2. I changed the package name for Launcher2 in packages/app folder in 'Android,mk' file and compiled at root. I couldnt see a new apk created on the new packaged name( i gave) under ~/mydroid/out/target/product/generic/system/app. I tried several times with changes in activity names, application names in manifest.xml file. Nothing reflects.But it is sure, both helloworld, and change in package name is getting picked up while compiling. I could see intermediate classes getting created. ~/mydroid/out/target/common/obj/APPS/manifirst_intermediates/src/com/ android/mani -- manifirst is like a helloworld which i created and run. ~/mydroid/out/target/common/obj/APPS/Launcher2_intermediates/src/com/ android/launcher Could anyone please share the steps of compiling a simple Helloworld program in AOSP.? Thanks, Mani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents
Another option could be periodically starting a service with an alarm, try to get the location and then shut down the location updates. In this way I would be pretty sure the radio is off when I don't need location updates. Right. Creating a variation on WakefulIntentService that supports this pattern is one of the 18,000 items on my to-do list. :-) I bring up this thread again, because I am trying to implement this solution, but I am having some issues. I think a classic service would be more suitable than an IntentService for this purpouse. The intent service, and therefore your wakeful one, does its job and then dies after the onHandleIntent is called. If you implement a locationlistener, you'll never know (or, you can't predict) when you will get the first location update (which is also the one you need, at least until the next alarm triggering), so you need something that stays alive until it gets the first fix. However, also in this situation, I can start the service and make it kill himself where the location is found (or after a reasonable amount of time). I gave also a look at the code of MyTracks, and they just keep the locationlistener still alive for all the duration of the recording period. It would be a lot easier if the radio is turned on only during the location updates, but looking at android code, it seems that GpsLocationProvider is just enabled (and then I suppose the radio is turned on). Thanks again Federico -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Asynctask and database lock
Hello guys, My problem is about asynctask and database lock. I have an asynctask which does a full restore (from an amazon s3 storage) of my database. In order to avoid any inconsistency I use a sqllite transaction. From the UI thread I display a loading message while launching this asynctask and was thinking It was not possible for the user to use the application at the same time but for example if I click on search it goes to the search screen of my application and then I encounter database lock problem... Do you have any idea how I can handle it ? (i.e. be sure the user is locked to my loading message) Thanks, Regards, Kim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents
On Sun, Sep 12, 2010 at 5:23 AM, Federico Paolinelli fedep...@gmail.com wrote: I think a classic service would be more suitable than an IntentService for this purpouse. Correct. The intent service, and therefore your wakeful one, does its job and then dies after the onHandleIntent is called. If you implement a locationlistener, you'll never know (or, you can't predict) when you will get the first location update (which is also the one you need, at least until the next alarm triggering), so you need something that stays alive until it gets the first fix. Also correct. However, also in this situation, I can start the service and make it kill himself where the location is found (or after a reasonable amount of time). Still correct. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents
On Sun, Sep 12, 2010 at 12:09 PM, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 5:23 AM, Federico Paolinelli fedep...@gmail.com wrote: I think a classic service would be more suitable than an IntentService for this purpouse. Correct. The intent service, and therefore your wakeful one, does its job and then dies after the onHandleIntent is called. If you implement a locationlistener, you'll never know (or, you can't predict) when you will get the first location update (which is also the one you need, at least until the next alarm triggering), so you need something that stays alive until it gets the first fix. Also correct. However, also in this situation, I can start the service and make it kill himself where the location is found (or after a reasonable amount of time). Still correct. -- I'm starting to understand something about this stuff :-) Thanks again. Federico -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to launch the app from the Web page?
On Sat, Sep 11, 2010 at 9:46 PM, ls02 agal...@audible.com wrote: I added to the manifest file for the activity to be launched: intent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category category android:name=android.intent.category.BROWSABLE/category data android:scheme=my_scheme/ /intent-filter I load the link in WebView: mWebView.loadData(a href=\my_scheme://launch_my_app/refresh_all \Launch App/a, text/html, utf-8); When I click on the link I get the error -10 The protocol is not supported in My WebViewClient.OnReceivedError override. See this sample project for some ways to launch an activity from a link in a Web page: http://github.com/commonsguy/cw-advandroid/tree/master/Introspection/URLHandler/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Getting platform files from command line
Try getting the files on a GUI-capable machine, then copying your SDK directory to your dev server. I think the latest rev of the dev tools added some sort of headless-update option, but I haven't gone looking for details. On Sun, Sep 12, 2010 at 3:44 AM, Dan Roberts ademan...@gmail.com wrote: Hi Everyone, I apologize if I'm in the wrong place, and I apologize if you've already seen this message, but to the best of my knowledge this message never made it through (since I was a brand new user at the time) I can't figure out how to get the platform files for development, without running 'android' and starting the GUI. I want to avoid running GUI applications on my dev server, since it's headless and I don't want to forward X particularly. I can't imagine that it does anything more than figure out your platform, pull down a tarball and unpack it, surely this doesn't necessitate a gui, does anyone know how I can get the platform files without it? Cheers, Dan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Min SDK Bug ???
When you don't set minSdkVersion/targetSdkVersion, it is considered to be 1 by default. One thing that does is convince the system you don't support all screen types: http://developer.android.com/guide/topics/manifest/supports-screens-element.html So on a Nexus One the system will report a smaller screen size to your app and scale it up for you. This can throw off positions and change the performance of graphics. On Aug 24, 3:22 pm, guruk ilovesi...@gmail.com wrote: just for info .. I made the design in adp1 . so i thought it would fit with more devices (as it resized fine) But the mainproblem and I cant believe its on that.. when I set minSDK the APP comes unbelievable slow !!! Its totaly strange .. remember by nexus is 2.2 sdk8 so what comes different when I set minsdk ?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can android support more than one sdcard?
On Sun, Sep 12, 2010 at 2:59 AM, blindfold seeingwithso...@gmail.com wrote: I hope your colleagues will consider device enumeration as being important for limiting future fragmentation of a supposedly open platform and for encouraging new application areas, going well beyond nice. I imagine that they will add support for multiple forms of external storage as manufacturers request it (or, perhaps, where manufacturers contribute back code). As Ms. Hackborn indicated, an API for things like this is the tip of the iceberg. It's not also terribly relevant until the rest of the iceberg exists, and there's no sense in them spending time trying to design an API until they know what that API is going to need to contain. With respect to future fragmentation, the pattern for handling this is rather obvious. Let's take external storage: -- The zero-parameter getExternalStorageDirectory() and kin do what they do today, reporting on the default external storage -- New versions of the same methods are added to Environment that take some sort of identifier as a parameter, with some sort of getExternalStorageDevices() method to list them However, there are plenty of unknowns: what the identifier is (string or more complex object), what getExternalStorageDevices() returns (ArrayList or some Environment.DeviceRoster object), etc. Those details are impractical to design ahead of the full implementation. So they didn't try. This is not terribly surprising -- in fact, it would have been more surprising had they spent a lot of time on it and skipped other functionality as a result. I am not aware of any compatible Android devices with multiple forms of external storage back in, say, January. There were some (e.g., ARCHOS 5 Android tablet) that had multiple forms of external storage, but they were not in compliance with the compatibility definition in other areas. Hence, when Android 2.2 was being baked, particularly from the standpoint of low-level system stuff like external storage, there may have been no compelling demands from manufacturers at the time, so they focused on other areas. A fine example is Camera.Parameters. While that class existed from the outset, a lot of capabilities were added in 2.0 (focus modes, flash modes, etc.). Those were added to the SDK in response to device manufacturers stepping up to the plate and wanting to support more sophisticated cameras and wanting to put that sophistication in the hands of developers. The core Android team *could* have tried designing all of that back in Android 1.0, but they may well have gotten it wrong, and they would have had to sacrifice some other piece of functionality to pay for the engineering time. Instead, they waited. You have made it quite clear now that you have little interest in that or in adding device enumeration for other device classes. No, she has made it quite clear now that she has little interest in doing any of that until there are concrete implementations ready to be, um, implemented. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Getting platform files from command line
Google on sdk offline install or something like that - someone figured out the url of the xml file it grabs which contains paths of the downloads relative to itself. On Sep 12, 3:44 am, Dan Roberts ademan...@gmail.com wrote: Hi Everyone, I apologize if I'm in the wrong place, and I apologize if you've already seen this message, but to the best of my knowledge this message never made it through (since I was a brand new user at the time) I can't figure out how to get the platform files for development, without running 'android' and starting the GUI. I want to avoid running GUI applications on my dev server, since it's headless and I don't want to forward X particularly. I can't imagine that it does anything more than figure out your platform, pull down a tarball and unpack it, surely this doesn't necessitate a gui, does anyone know how I can get the platform files without it? Cheers, Dan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 reduce padding between cells in TableLayout
I have a 3*3 TableLayout that contains buttons. But I cannot seem to remove the spacing between the buttons in the Table. Setting pading to zero for the buttons has no effect. Setting padding and layout_margin to zero for the TableRow has no effect. Setting layout_margin for the TableLayout has no effect. Any idea on how I can alter/remove/reduce the spacing between the cells? William -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Ho to take a screenshot of the current activity and email it to a specific email id
Go to DDMA perspective, there you will find an icon to print only the screen,... Its near push-pull icon .. On Sun, Sep 12, 2010 at 5:34 AM, Traveler jadkins...@gmail.com wrote: If you are using Windows, this should work: The Print Screen key will copy the screen image to the windows clipboard. Alt Print Screen will copy the active window to the clipboard. You should be able to past into an e-mail, or at least paste into an editor like Paint and save it to a file for insertion into an e-mail. Jerry On Sep 10, 1:41 am, DG gujar.dwark...@gmail.com wrote: Hello, Currently, I am working on an Android application were I have a requirement to get a screenshot of current activity on a button click and send it to a specific email id. I have searched the documentation and did not got any way to get the screen shot and add it as the attachment. Is there any way in Android SDK to get the screen shot. Thanks for Help, Dwakresh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Lokesh Gupta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can android support more than one sdcard?
In the case of features like dual sd cards, dual cameras, dual sims, etc which already exist on shipping smarthpones of other flavors, its a safe bet that they will show up on an android device sooner or later. The android architects can provide leadership on how to handle them - or they can suffer the fragmentation of their platform resulting from different manufacturers handling the same thing in different incompatible ways. The galaxy is a good example of this - arguably its implementation shouldn't have passed compatability, as it requires developers to resort to special casing or discouraged examination of underlying linuxisms (/proc/mounts or using stat() to decide if get external storage has given you a mount point or a container of mount points) I would also point out that developers shouldn't be blindly using fixed paths within external storage for file creation, as there's no arbiter of that namespace to avoid collision with othe apps files. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to launch the app from the Web page?
So, that's the link in the Web page to launch your app? On Sep 12, 6:14 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Sep 11, 2010 at 9:46 PM, ls02 agal...@audible.com wrote: I added to the manifest file for the activity to be launched: intent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category category android:name=android.intent.category.BROWSABLE/category data android:scheme=my_scheme/ /intent-filter I load the link in WebView: mWebView.loadData(a href=\my_scheme://launch_my_app/refresh_all \Launch App/a, text/html, utf-8); When I click on the link I get the error -10 The protocol is not supported in My WebViewClient.OnReceivedError override. See this sample project for some ways to launch an activity from a link in a Web page: http://github.com/commonsguy/cw-advandroid/tree/master/Introspection/... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training- 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] Re: How to launch the app from the Web page?
I am not sure I understand. My app can be launched both by a Web page in embedded WebView and the same Web page in a separate Browser app. If I cannot use custom scheme, I a mfine using standard http or other scheme. Can you tell me please what the link is in the Web page that launches my app? On Sep 12, 2:35 am, Dianne Hackborn hack...@android.com wrote: Please don't use a scheme unless it is one that you have registered. Schemes are global to the universe, and since you will be putting this out in the universe via your web page you want to follow the rules for them. Another approach you can take is to just create an Intent that you want to have launched, and print the result of Intent.toUri() to get the string to use in your link. (This should be an intent: URI.) Then you probably want to just make your own action following the standard naming conventions which that Intent will use. You can even use Intent.setPackage() to make sure that only your app can be launched from the link, if you want. (Do note you can't use Intent.setComponent() for this for security reasons.) On Sat, Sep 11, 2010 at 6:46 PM, ls02 agal...@audible.com wrote: I added to the manifest file for the activity to be launched: intent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category category android:name=android.intent.category.BROWSABLE/category data android:scheme=my_scheme/ /intent-filter I load the link in WebView: mWebView.loadData(a href=\my_scheme://launch_my_app/refresh_all \Launch App/a, text/html, utf-8); When I click on the link I get the error -10 The protocol is not supported in My WebViewClient.OnReceivedError override. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- 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
Re: [android-developers] Re: How to launch the app from the Web page?
On Sun, Sep 12, 2010 at 8:49 AM, ls02 agal...@audible.com wrote: So, that's the link in the Web page to launch your app? No, that's a link to a GitHub project, demonstrating an application that responds to a few different link structures. The corresponding Web page -- referenced in the code -- is: http://commonsware.com/sample -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: limited distribution
On Fri, Sep 3, 2010 at 10:49 AM, Lance Nanek lna...@gmail.com wrote: Maybe he comes from the iPhone world. There are some sort of limits there. 100 specifically provisioned device IDs, 50 promo codes after app acceptance, etc. - stuff like that, I think. I suppose technically we do have a limit in the Android world as well, because ATT forces some phones to not support applications installed from unknown sources. So you have unlimited non-market distribution for most phones, but 0 distribution for those ATT phones, heh. That's not entirely accurate. Anyone with the SDK installed can sideload on ATT phones (without rooting). Also, the nice folks at www.AndroidCentral.com have put together a simple Windows application (they have Mac/Linux too) they call the Android Central Sideload Wonder Machine that allows _anyone_ to sideload even without the SDK. The thread about the Sideload Wonder Machine is at http://forum.androidcentral.com/showthread.php?p=236589#phttp://forum.androidcentral.com/showthread.php?p=236589#post236589 --PhillW. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] VideoView with cookie.
Hi. Can VideoView access to web server with cookie ? Our video server protect video data with cookie authentication. Video player app must authenticate and store session key to cookie strage before access to video server. First, My android video player app access to authentication server using HttpClient class in android library. Next, app access to video server with HttpClient's cookie data . But I think HttpClient can't pass cookie data to VideoView. Do you have any idea? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can android support more than one sdcard?
Additionally, I think the galaxy's hardware design makes more sense if viewed not as having two sd cards, but rather as product designers trying to combine the best of both large fixed storage ala iphone or pre with user price point scalable removable storage ala other android devices, blackberry, and traditional smartphones. I don't know if the fixed volume is a captive sdcard or a chip soldered to the motherboard, but it may not matter to anyone but samsungs engineers and procurement people. What presumably matters to users is that they don't have to buy a card, but they can - especially if storage prices fall during the life of the phone or if they want to swap in huge amounts of content while travelling without a laptop. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can android support more than one sdcard?
Hi Mark, I appreciate your thoughtful comments. Some things are fairly trivial at API level, but hard at implementation level. Sometimes it is also at API level not immediately clear which choices are most elegant and future proof. I also realize that the Android team has been exceedingly busy first realizing the core of what is currently needed on most mobile devices, for the time being skipping certain generalized features that have been available for quite some time on other popular platforms, and that do have merit beyond the time to market consideration. Ms. Hackborn's emotional and rather rude response cut this discussion short, despite concrete examples of existing implementations from Samsung as mentioned by Kostya and Indicator. For cameras there exists the two-camera HTC Evo 4G, and outside Android there exist two-camera phones from Nokia (I even have an old Nokia 6680 with two cameras) and from Apple (iPhone 4G). Therefore I felt that I am not just sketching some hypothetical situation that awaits concrete examples of devices that are being sold by the millions. -- New versions of the same methods are added to Environment that take some sort of identifier as a parameter, with some sort of getExternalStorageDevices() method to list them Yes, I am aware of the organic growth option, but the zero-parameter getExternalStorageDirectory() would have been redundant if support for multiple devices had been foreseen and the parametrized method simply limited in value range by letting a getExternalStorageCount() return 1 (or zero) until manufacturers support higher counts. The third-party developer can then write code today that supports higher counts without having to wait for a future version of Android that specifies how getExternalStorageDirectory() gets an additional companion method or overloads one of the parameters. For zero risk with supporting a second camera one could have looked at how Nokia supports additional cameras in Java ME using the capture:// locator, since the existing market has long given feedback on any issues with that (such that one can at the same time avoid making the same mistakes). It largely boils down to the question what should come first, a general future-proof API or an actual implementation on a popular device that needs an existing API to be generalized for more widespread use. An actual implementation that is not supported by an API is typically a bit ugly, brings legacy code issues later on, and can discourage adoption of new features because third-party developers will be less inclined to write brand-specific code to exploit such features. No, she has made it quite clear now that she has little interest in doing any of that until there are concrete implementations ready to be, um, implemented. OK, good to know. I guess I was hoping for the type of leadership that Chris just mentioned. Regards On Sep 12, 12:43 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 2:59 AM, blindfold seeingwithso...@gmail.com wrote: I hope your colleagues will consider device enumeration as being important for limiting future fragmentation of a supposedly open platform and for encouraging new application areas, going well beyond nice. I imagine that they will add support for multiple forms of external storage as manufacturers request it (or, perhaps, where manufacturers contribute back code). As Ms. Hackborn indicated, an API for things like this is the tip of the iceberg. It's not also terribly relevant until the rest of the iceberg exists, and there's no sense in them spending time trying to design an API until they know what that API is going to need to contain. With respect to future fragmentation, the pattern for handling this is rather obvious. Let's take external storage: -- The zero-parameter getExternalStorageDirectory() and kin do what they do today, reporting on the default external storage -- New versions of the same methods are added to Environment that take some sort of identifier as a parameter, with some sort of getExternalStorageDevices() method to list them However, there are plenty of unknowns: what the identifier is (string or more complex object), what getExternalStorageDevices() returns (ArrayList or some Environment.DeviceRoster object), etc. Those details are impractical to design ahead of the full implementation. So they didn't try. This is not terribly surprising -- in fact, it would have been more surprising had they spent a lot of time on it and skipped other functionality as a result. I am not aware of any compatible Android devices with multiple forms of external storage back in, say, January. There were some (e.g., ARCHOS 5 Android tablet) that had multiple forms of external storage, but they were not in compliance with the compatibility definition in other areas. Hence, when Android 2.2 was being baked, particularly from the standpoint of low-level system stuff like external
[android-developers] Re: VideoView with cookie.
You could look in the docs, or the source code. If the answer is no, how about generating a customized client-specific url upon authentication and sending the video player to that. This would then timeout after a few hours and be replaced with a short video error message. On Sep 12, 9:22 am, kenmaz kentaro.matsu...@gmail.com wrote: Hi. Can VideoView access to web server with cookie ? Our video server protect video data with cookie authentication. Video player app must authenticate and store session key to cookie strage before access to video server. First, My android video player app access to authentication server using HttpClient class in android library. Next, app access to video server with HttpClient's cookie data . But I think HttpClient can't pass cookie data to VideoView. Do you have any idea? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: (EDITED by author) My app gets killed ... but I think I know why now
(Good Morning) Oh but you see, in fact, that's JUST WHAT THEY WANT... and is the whole purpose of the application ;) Its funny because as I've endeavored to bring my app to life; most of what I need to do flies in the face of 'proper' etiquette; as you have surmised. But it is just the ability to do these sorts of things that originally brought me to Android. I looked into iPhone first and there were 2 issues I had with that camp. {a} There was NO WAY to accomplish most of what I needed to do since the SDK developers decided to protect me from myself. and {b} I was amazed at how hostile the developers group members were. soapbox I have been writing code for 30 years and I, too, get frustrated by questions brought by developers that have obviously spent ZERO time experimenting or trying stuff out... they want it all just handed to them. But over in iPhone Developer Land --- they seem to prefer battling why 'MY TECHNIQUE' is better than 'YOUR TECHNIQUE' and get all medieval on the lowly guy just starting out trying to even understand what techniques are available to him... and in my particular case, the notion of my code's etiquette was just S upsetting that they berated me instead of offering *any* advice. anyway ... /soapbox I found a code snip that illustrates how to start a new activity from inside a BR -- and your point regarding specific naming of the 'context object' was used -- so, once again, I commend your expertise. I think this is going to be the solution to all my problems (well, except for that minor traffic altercation in Dubai ;) Thanks a lot (and again) for all of your help... On Sep 11, 5:36 pm, Kostya Vasilyev kmans...@gmail.com wrote: Tony, Your receiver is getting called - that's good. Can't comment on notifications without seeing the code. There should not be any reason why startActivity from within onReceive wouldn't work (use the context object that's passed into onReceive to fix the compile error you mentioned), but I don't think your users are going to appreciate a window popping up like that. -- Kostya Vasilyev --http://kmansoft.wordpress.com 12.09.2010 1:10 пользователь tony obrien tobsourcecode...@gmail.com написал: Actually I have LOGGING all over the place. I was able to determine that the SMS Receiver is actually getting called ... but it has trouble doing the NM.Notify(); (I'm still trying to decode what *that* error is all about...) And I have Thread.sleep(lots-o'seconds) and Thread.yeild() in the runnable so I am being careful regarding your concerns. What I would REALLY like to do is a startActivity() from inside the Receiver... but I don't suppose that's possible? (In my first timid attempts to do that awhile ago I could not get it to compile, I think the extends BroadcastReceiever makes the compiler not understand what startActivity() means.) On Sep 11, 5:02 pm, Kostya Vasilyev kmans...@gmail.com wrote: 12.09.2010 0:37, tony obrien ... -- You received this message because you are subscribed to the Google Groups Android Developers g... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can android support more than one sdcard?
On Sun, Sep 12, 2010 at 9:29 AM, blindfold seeingwithso...@gmail.com wrote: Therefore I felt that I am not just sketching some hypothetical situation that awaits concrete examples of devices that are being sold by the millions. Oh, in many of these cases, the hardware concept is certainly foreseeable. However: -- all the details of the hardware, and the resulting impacts those details may have on an API, are not always foreseeable -- the demand for such hardware is not uniform (e.g., dual cameras would seem more likely than dual screens, which would seem more likely than interfaces to Kenmore dishwashers) -- developing a truly future-proof API takes more engineering time than creating an API that gets the job done, and engineering time is not infinite At some point, they have to draw a line. I think you and I are in agreement that where they drew the line is sometimes less-than-ideal from the perspective of third-party developers. Yes, I am aware of the organic growth option, but the zero-parameter getExternalStorageDirectory() would have been redundant if support for multiple devices had been foreseen and the parametrized method simply limited in value range by letting a getExternalStorageCount() return 1 (or zero) until manufacturers support higher counts. The third-party developer can then write code today that supports higher counts without having to wait for a future version of Android that specifies how getExternalStorageDirectory() gets an additional companion method or overloads one of the parameters. No arguments there. :: pause for laughter at the pun :: :: still waiting :: :: aw, c'mon, guys, it wasn't *that* bad... :: The case of external storage is probably the least defensible, even looking at it at the time of original implementation. For zero risk with supporting a second camera one could have looked at how Nokia supports additional cameras in Java ME using the capture:// locator, since the existing market has long given feedback on any issues with that (such that one can at the same time avoid making the same mistakes). I'd argue that the line they drew on camera support is more defensible, because cameras are significantly more complex and in a greater state of flux than is the concept of external storage. It largely boils down to the question what should come first, a general future-proof API or an actual implementation on a popular device that needs an existing API to be generalized for more widespread use. An actual implementation that is not supported by an API is typically a bit ugly, brings legacy code issues later on, and can discourage adoption of new features because third-party developers will be less inclined to write brand-specific code to exploit such features. And you can see some places where they did try to future-proof things better. Take sensors, for example. They took a stab at implementing a future-proof sensor API, then had to deprecate *twice*. Locations are another place, where they took a shot at future-proof, and sorta hit it so far, if you ignore the whole mock location stuff popping in and out of the SDK. They didn't totally ignore the issue -- they just didn't do it everywhere. And, as the sensors API demonstrates, future-proof, like past performance, is no guarantee of future results. In an ideal world, all APIs would be perfectly future proof. Major engineering projects are rarely ideal. They tend to be more Apollo 13: We gotta find a way to make this...fit into the hole for this...usin' nothin' but that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: VideoView with cookie.
On Sun, Sep 12, 2010 at 9:30 AM, Chris Stratton cs07...@gmail.com wrote: You could look in the docs, or the source code. If you're using built-in streaming, I don't see where there's a spot to inject a cookie. If there were a VideoTrack analogue to AudioTrack, then you could stream it yourself, but there is no such thing (and it might not even be practical from a performance standpoint). If the answer is no, how about generating a customized client-specific url upon authentication and sending the video player to that. This would then timeout after a few hours and be replaced with a short video error message. I successfully use this pattern with Amazon S3 for book distribution -- logged in subscribers get an unique short-lived S3 URL for the book copies. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Unable to update my android app
Are you sure that you are using the same keystore? I guess, thats the only problem and the solution. -Kumar Bibek http://techdroid.kbeanie.com On Sep 10, 6:31 pm, android.memore aumkiiwebsolut...@gmail.com wrote: Hi together, we are facing problems to update our android app. Error message is The apk must be signed with at least one certificate in common with the previous version But we are using the same keystore and same alias. So i don't know what to do? There are a lot of threads online, discussing this topic, but there is no answer anywhere?! What can I do, what is the problem here? Is it a market bug? Please help me here, Thank you best regards Andreas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: canvas woe
thanks for your reply. I changed this part to if (mValues != null) { matrix.reset(); matrix.setRotate(-mValues[0]); mPath.transform(matrix); } However, the transformation still goes infinitely. what should be the correct method ? thanks! On Sep 9, 6:08 am, Kostya Vasilyev kmans...@gmail.com wrote: Matrix transformation methods are cumulative. If you wish to apply absolute transformation values, you need to reset the matrix to identity first. -- Kostya Vasilyev --http://kmansoft.wordpress.com 08.09.2010 15:19 пользователь dadada ytbr...@gmail.com написал: hello all, i used matrix to rotate instead of the canvas. However, the result isn't what i expected. The path just rotate infinitely without stopping. below is my code. it is a modification of the compass.java in apidemo. can someone please give me some advice on this? import android.content.Context; import android.graphics.*; import android.hardware.SensorListener; import android.hardware.SensorManager; import android.os.Bundle; import android.util.Config; import android.util.Log; import android.view.View; import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; public class Compass extends GraphicsActivity { private static final String TAG = Compass; private SensorManager mSensorManager; private SampleView mView; private float[] mValues; private final SensorListener mListener = new SensorListener() { public void onSensorChanged(int sensor, float[] values) { if (Config.LOGD) Log.d(TAG, sensorChanged ( + values[0] + , + values[1] + , + values[2] + )); mValues = values; if (mView != null) { mView.invalidate(); } } public void onAccuracyChanged(int sensor, int accuracy) { // TODO Auto-generated method stub } }; �...@override protected void onCreate(Bundle icicle) { super.onCreate(icicle); mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); mView = new SampleView(this); setContentView(mView); } �...@override protected void onResume() { if (Config.LOGD) Log.d(TAG, onResume); super.onResume(); mSensorManager.registerListener(mListener, SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_GAME); } �...@override protected void onStop() { if (Config.LOGD) Log.d(TAG, onStop); mSensorManager.unregisterListener(mListener); super.onStop(); } private class SampleView extends View { private Paint mPaint = new Paint(); private Path mPath = new Path(); private boolean mAnimate; private long mNextTime; private Matrix matrix = new Matrix(); public SampleView(Context context) { super(context); // Construct a wedge-shaped path mPath.moveTo(0, -50); mPath.lineTo(-20, 60); mPath.lineTo(0, 50); mPath.lineTo(20, 60); mPath.close(); matrix.postScale(10, 10); } �...@override protected void onDraw(Canvas canvas) { Paint paint2 = new Paint(); paint2.setColor(Color.BLUE); paint2.setStyle(Paint.Style.FILL); paint2.setAlpha(120); Paint paint3 = new Paint(); paint3.setColor(Color.GREEN); paint3.setStyle(Paint.Style.FILL); paint3.setAlpha(200); Paint paint4 = new Paint(); paint4.setColor(Color.GRAY); paint4.setStyle(Paint.Style.FILL); paint4.setAlpha(120); Paint paint5 = new Paint(); paint5.setColor(Color.GRAY); paint5.setStyle(Paint.Style.FILL_AND_STROKE); paint5.setAlpha(120); Paint paint = mPaint; canvas.drawColor(Color.WHITE); paint.setAntiAlias(true); paint.setColor(Color.RED); paint.setStyle(Paint.Style.FILL); paint.setAlpha(120); int w = canvas.getWidth(); int h = canvas.getHeight(); int cx = w / 2; int cy = h / 2; canvas.translate(cx, cy); if (mValues != null) { matrix.setRotate(-mValues[0]); mPath.transform(matrix); // canvas.rotate(-mValues[0]); } canvas.drawPath(mPath, mPaint); String str = ; String direction = ; if (mValues != null) { str = Azimuth: + Float.toString(-mValues[0]); if(-mValues[0] 0 -mValues[0] -1){ direction = Direction: North;
[android-developers] flashing element in ArrayAdapter
I have an ArrayAdapter in my activity, and when a certain event occur, I'd like to make a specific element flash, or have it highlighted in some way for a couple of seconds. Is there a way to do that? Thanks, Simone -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: flashing element in ArrayAdapter
Sure, But, you will have to implement your own adapter if you would like to do this. You can change the particular items background for sometime and restore it. Simple I guess. -Kumar Bibek http://techdroid.kbeanie.com On Sep 12, 8:19 pm, Simone simone.russ...@gmail.com wrote: I have an ArrayAdapter in my activity, and when a certain event occur, I'd like to make a specific element flash, or have it highlighted in some way for a couple of seconds. Is there a way to do that? Thanks, Simone -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: is there a way to retrieve the latest image taken using system camera?
In the result, you would be receiving the Uri of the image taken. Now use the MediaStore content provider to retrieve the file path, and create the thumbnail using this file path. -Kumar Bibek http://techdroid.kbeanie.com On Sep 12, 12:52 pm, dadada ytbr...@gmail.com wrote: hi all, so i have an intent that use the system camera. so after i taken the photo, it brings me back my application. I want to display the image (just taken) as a thumbnail. How do i retrieve that latest image from MediaStore.Images.Thumbnails. thanks! bryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: canvas woe
Seems like you apply transformations to mPath over and over again, without resetting. Try moving the code that constructs mPath so it gets created from scratch every time through, as a temporary test. If this works, consider keeping the path constant, applying the transform at canvas level. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 12.09.2010 18:53 пользователь dadada ytbr...@gmail.com написал: thanks for your reply. I changed this part to if (mValues != null) { matrix.reset(); matrix.setRotate(-mValues[0]); mPath.transform(matrix); } However, the transformation still goes infinitely. what should be the correct method ? thanks! On Sep 9, 6:08 am, Kostya Vasilyev kmans...@gmail.com wrote: Matrix transformation methods are... 08.09.2010 15:19 пользователь dadada ytbr...@gmail.com написал: hello all, i used matrix to rotate instead of the canvas. However, the result isn't what... -- You received this message because you are subscribed to the Google Groups Android Developers g... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can android support more than one sdcard?
Eeks, better not the Apollo 13 bit, Mark. I tried the Houston, we have a problem persiflage once before, and it was certainly not appreciated. :-) By and large we agree, I think. I see the trade-offs that you mention. The one main opening that a constructive discussion could have created is that the Android team does not have to throw a final future-proof API over the wall as part of an official Android release. Their time and expertise is finite too, so yes, chances are that what they do would be flawed. The Java ME (dual) camera support with Nokia is actually rather messy too, riddled with ad hoc choices and a consequent legacy of device incompatibilities. And you can see some places where they did try to future-proof things better. Take sensors, for example. They took a stab at implementing a future-proof sensor API, then had to deprecate *twice*. Locations are another place, where they took a shot at future-proof, and sorta hit it so far, if you ignore the whole mock location stuff popping in and out of the SDK. They didn't totally ignore the issue -- they just didn't do it everywhere. And, as the sensors API demonstrates, future-proof, like past performance, is no guarantee of future results. True. What the Android team could have initiated long ago is to publish draft API proposals, such that you and I and anyone else here can take a stab at them (review them and suggest improvements) and thus help improve quality before the result gets incorporated in an official Android release. Of course the future can still prove you wrong, but at least it ups the chances of getting it first time right. Such a way of working could save a lot of frustration on both sides, and help avoid later API deprecations. Regards On Sep 12, 3:58 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 9:29 AM, blindfold seeingwithso...@gmail.com wrote: Therefore I felt that I am not just sketching some hypothetical situation that awaits concrete examples of devices that are being sold by the millions. Oh, in many of these cases, the hardware concept is certainly foreseeable. However: -- all the details of the hardware, and the resulting impacts those details may have on an API, are not always foreseeable -- the demand for such hardware is not uniform (e.g., dual cameras would seem more likely than dual screens, which would seem more likely than interfaces to Kenmore dishwashers) -- developing a truly future-proof API takes more engineering time than creating an API that gets the job done, and engineering time is not infinite At some point, they have to draw a line. I think you and I are in agreement that where they drew the line is sometimes less-than-ideal from the perspective of third-party developers. Yes, I am aware of the organic growth option, but the zero-parameter getExternalStorageDirectory() would have been redundant if support for multiple devices had been foreseen and the parametrized method simply limited in value range by letting a getExternalStorageCount() return 1 (or zero) until manufacturers support higher counts. The third-party developer can then write code today that supports higher counts without having to wait for a future version of Android that specifies how getExternalStorageDirectory() gets an additional companion method or overloads one of the parameters. No arguments there. :: pause for laughter at the pun :: :: still waiting :: :: aw, c'mon, guys, it wasn't *that* bad... :: The case of external storage is probably the least defensible, even looking at it at the time of original implementation. For zero risk with supporting a second camera one could have looked at how Nokia supports additional cameras in Java ME using the capture:// locator, since the existing market has long given feedback on any issues with that (such that one can at the same time avoid making the same mistakes). I'd argue that the line they drew on camera support is more defensible, because cameras are significantly more complex and in a greater state of flux than is the concept of external storage. It largely boils down to the question what should come first, a general future-proof API or an actual implementation on a popular device that needs an existing API to be generalized for more widespread use. An actual implementation that is not supported by an API is typically a bit ugly, brings legacy code issues later on, and can discourage adoption of new features because third-party developers will be less inclined to write brand-specific code to exploit such features. And you can see some places where they did try to future-proof things better. Take sensors, for example. They took a stab at implementing a future-proof sensor API, then had to deprecate *twice*. Locations are another place, where they took a shot at future-proof, and sorta hit it so far, if you ignore the whole mock location stuff popping in
[android-developers] Re: flashing element in ArrayAdapter
My class already extends ArrayAdapter. I was just wondering how can I retrieve a list of all the Views contained in the adapter, or if I had to keep track of them myself. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can android support more than one sdcard?
True. What the Android team could have initiated long ago is to publish draft API proposals, such that you and I and anyone else here can take a stab at them (review them and suggest improvements) and thus help improve quality before the result gets incorporated in an official Android release. I have only just recently started reading through the aosp source from git with hopes of understanding the level of exposure the google team provides towards future updates. is this a hopeless effort? i just really hate the idea of working so hard towards a goal that has its support changed, dropped or is natively integrated into the next release. (e.g. froyo's anti-task manager functions recently sent me for a spin). does anyone know of a google group where this kind of stuff is discussed? its not that I disagree with ANY of google's decisions towards the API, its just it would be nice to know what's going to happen before it becomes written law (and weeks/months of coding become useless). thanks, s. Live as if you were to die tomorrow. Learn as if you were to live forever. -- On Sun, Sep 12, 2010 at 11:42 AM, blindfold seeingwithso...@gmail.comwrote: Eeks, better not the Apollo 13 bit, Mark. I tried the Houston, we have a problem persiflage once before, and it was certainly not appreciated. :-) By and large we agree, I think. I see the trade-offs that you mention. The one main opening that a constructive discussion could have created is that the Android team does not have to throw a final future-proof API over the wall as part of an official Android release. Their time and expertise is finite too, so yes, chances are that what they do would be flawed. The Java ME (dual) camera support with Nokia is actually rather messy too, riddled with ad hoc choices and a consequent legacy of device incompatibilities. And you can see some places where they did try to future-proof things better. Take sensors, for example. They took a stab at implementing a future-proof sensor API, then had to deprecate *twice*. Locations are another place, where they took a shot at future-proof, and sorta hit it so far, if you ignore the whole mock location stuff popping in and out of the SDK. They didn't totally ignore the issue -- they just didn't do it everywhere. And, as the sensors API demonstrates, future-proof, like past performance, is no guarantee of future results. True. What the Android team could have initiated long ago is to publish draft API proposals, such that you and I and anyone else here can take a stab at them (review them and suggest improvements) and thus help improve quality before the result gets incorporated in an official Android release. Of course the future can still prove you wrong, but at least it ups the chances of getting it first time right. Such a way of working could save a lot of frustration on both sides, and help avoid later API deprecations. Regards On Sep 12, 3:58 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 9:29 AM, blindfold seeingwithso...@gmail.com wrote: Therefore I felt that I am not just sketching some hypothetical situation that awaits concrete examples of devices that are being sold by the millions. Oh, in many of these cases, the hardware concept is certainly foreseeable. However: -- all the details of the hardware, and the resulting impacts those details may have on an API, are not always foreseeable -- the demand for such hardware is not uniform (e.g., dual cameras would seem more likely than dual screens, which would seem more likely than interfaces to Kenmore dishwashers) -- developing a truly future-proof API takes more engineering time than creating an API that gets the job done, and engineering time is not infinite At some point, they have to draw a line. I think you and I are in agreement that where they drew the line is sometimes less-than-ideal from the perspective of third-party developers. Yes, I am aware of the organic growth option, but the zero-parameter getExternalStorageDirectory() would have been redundant if support for multiple devices had been foreseen and the parametrized method simply limited in value range by letting a getExternalStorageCount() return 1 (or zero) until manufacturers support higher counts. The third-party developer can then write code today that supports higher counts without having to wait for a future version of Android that specifies how getExternalStorageDirectory() gets an additional companion method or overloads one of the parameters. No arguments there. :: pause for laughter at the pun :: :: still waiting :: :: aw, c'mon, guys, it wasn't *that* bad... :: The case of external storage is probably the least defensible, even looking at it at the time of original implementation. For zero risk with supporting a second camera one could have looked at how Nokia
[android-developers] Re: How to launch the app from the Web page?
Launching via intent by some reason does not work: I see in LogCat 09-12 12:28:00.908: INFO/ActivityManager(1100): Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=intent:#Intent;action=com.my_company.my_application.ACTION_LAUNCH_APP;end (has extras) } I do not see the name of the activity it tries to launch. But Web brwoser shows Web page not available and nothing is launched. Launching via link does not work inside the WebView. I get the error URL not found error. Launching via link in stand alone Web browser works but displays a dialog complete via MyApp or WebBrowser. Is there way to suppress this dialog? On Sep 12, 8:51 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 8:49 AM, ls02 agal...@audible.com wrote: So, that's the link in the Web page to launch your app? No, that's a link to a GitHub project, demonstrating an application that responds to a few different link structures. The corresponding Web page -- referenced in the code -- is: http://commonsware.com/sample -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: flashing element in ArrayAdapter
Allright, I solved it. I made it so that the array adapter contains the list of the Views, and the getView() method simply returns list.get(position). I make the View flash by switching its visibility between VISIBLE and INVISIBLE for a second every 100ms, and it looks pretty decent. Thanks Simone -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Monkey usage with Scripts/Network Control not working
Hi, I am trying to do 2 things with monkey 1. Execute a script with a command like adb shell monkey -p MY_PACKAGE --setup scriptfile -f /sdcard/ mon_script1.txt 1 where mon_script.txt contains a few touch commands. After I execute this, I see nothing happening on the screen. It even does not give me the Number of events injected message. I have verified that my touch co-ordinates fall over actual UI elements. This is the script file I am using tap 79 29 tap 100 100 tap 200 200 tap 300 300 quit 2. Execute Monkey Network control to type commands individually. I start up monkey to listen to a port and use PuTTY to send commands. I get OK return messages, but nothing happens on the screen. Whenever I use monkey in the random mode, I see interaction on the screen. But I need to get one of the above 2 methods to work. I have seen the sources of monkey and nothing seems to be wrong. Has anyone used monkey in the above described way? If so, please tell me what I am doing wrong. Cheers, Earlence -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: flashing element in ArrayAdapter
On Sun, Sep 12, 2010 at 12:34 PM, Simone simone.russ...@gmail.com wrote: Allright, I solved it. I made it so that the array adapter contains the list of the Views, and the getView() method simply returns list.get(position). I make the View flash by switching its visibility between VISIBLE and INVISIBLE for a second every 100ms, and it looks pretty decent. This will be a significant memory hog unless it is a very short list (i.e., all Views are visible in the ListView). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AsyncTask and screen rotation
So we could use something as simple as the following? @Override public Object onRetainNonConfigurationInstance() { return myAsyncTask; } And in onCreate(): if( (myAsyncTask = (MyAsyncTask)getLastNonConfigurationInstance()) != null) myAsyncTask.setContext(this); // Give my AsyncTask the new Activity reference I added a setContext() method to MyAsyncTask which resets a local member to be used in the on* callbacks to do UI work. I made MyAsyncTask a completely separate class from my Activity class, and the constructor requires a Context. This seems to work, and it seems pretty easy to do. I realize that an AsyncTask has no chance of being restarted the way a Service does if it comes to an untimely death. But from the comments in this thread, I'm assuming that my Activity will get a valid reference to the AsyncTask when it is restarted by a Configuration Change. Yes? - dave On Sep 10, 1:05 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 9:53 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: What if that AsyncTask is downloading a file? Interrupting it, regardless of how nicely done, would be a bad thing wouldn't it? You don't need to interrupt it. See Mark's option 2. Just don't have it tied to a specific activity instance. If you want to have it associated logically with the activity, you can use onRetainNonInstanceState() to transfer it between instances. (Though this is intended as an optimization, and if you rely on this then you likely won't get the proper semantics in other cases -- for example if the user leaves your app and returns to it later it could easily get killed while in the background and thus lose the active download. In fact you would also have this same problem if you use android:configChanges for many of the same reasons.) -- 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
Re: [android-developers] Re: Samsung Galaxy S and Bluetooth Issues
let me know the build fingerprint of your device -Dan On Fri, Sep 10, 2010 at 4:21 AM, snedex sne...@gmail.com wrote: Hi Don, Thanks for responding, Sorry about the slow response. OK at least that gives me more information on trying to circumvent this issue, still having no joy with it. Have you had any luck at all? Thanks! On Aug 12, 7:47 pm, DonFrench dcfre...@gmail.com wrote: I also have aBluetoothapp that I developed using a Nexus One and I am finding that some carriers have disabledBluetoothserial in their phones, presumably to prevent tethering. I don't know if this is the case with the phone you tested with or not but this might be the way they are preventing the BT connection. With the Verizon Droid, it makes the connection and then immediately drops it. On Aug 10, 2:48 pm, snedex sne...@gmail.com wrote: -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: flashing element in ArrayAdapter
Well, the view isn't long (average 5 elements, maximum 20). What do you suggest? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: flashing element in ArrayAdapter
I meat the list of course, not view :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: mkdir() fails when min sdk version is 4
There is no uses-permission-group tag. Permissions are just for declaring permissions, for help in displaying them to the user. You are right. That was careless of me. I mistakenly used that tag after looking at http://developer.android.com/reference/android/Manifest.permission_group.html Another related question is that the Vibrant has 16 GB as internal storage. But that's where the /sdcard directory is. There is also another replaceable 2GB MicroSD slot. If I want to write to that drive, how do I access it and does Android consider that as external storage as well? The Android SDK currently only supports one external storage, which for devices with both internal media mountable for USB mass storage and an SD card should be the internal media. I guess this means that I can't programatically access the microSD card. The micro SD card shows up as /sdcard/sd. Which I guess is how Samsung did it and shouldn't be depended upon. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: flashing element in ArrayAdapter
On Sun, Sep 12, 2010 at 12:52 PM, Simone simone.russ...@gmail.com wrote: Well, the view isn't long (average 5 elements, maximum 20). What do you suggest? Other than rethink your approach, I don't have a suggestion off the top of my head. I'm just telling you that if your maximum goes from 20 to 2000, and the user scrolls to the bottom, you're going to have memory problems. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AsyncTask and screen rotation
That should work, so long as MyAsyncTask is a static inner class or a regular standalone public class (not a non-static inner class). See: http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationAsync/ On Sun, Sep 12, 2010 at 12:47 PM, davemac davemac...@gmail.com wrote: So we could use something as simple as the following? �...@override public Object onRetainNonConfigurationInstance() { return myAsyncTask; } And in onCreate(): if( (myAsyncTask = (MyAsyncTask)getLastNonConfigurationInstance()) != null) myAsyncTask.setContext(this); // Give my AsyncTask the new Activity reference I added a setContext() method to MyAsyncTask which resets a local member to be used in the on* callbacks to do UI work. I made MyAsyncTask a completely separate class from my Activity class, and the constructor requires a Context. This seems to work, and it seems pretty easy to do. I realize that an AsyncTask has no chance of being restarted the way a Service does if it comes to an untimely death. But from the comments in this thread, I'm assuming that my Activity will get a valid reference to the AsyncTask when it is restarted by a Configuration Change. Yes? - dave On Sep 10, 1:05 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 9:53 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: What if that AsyncTask is downloading a file? Interrupting it, regardless of how nicely done, would be a bad thing wouldn't it? You don't need to interrupt it. See Mark's option 2. Just don't have it tied to a specific activity instance. If you want to have it associated logically with the activity, you can use onRetainNonInstanceState() to transfer it between instances. (Though this is intended as an optimization, and if you rely on this then you likely won't get the proper semantics in other cases -- for example if the user leaves your app and returns to it later it could easily get killed while in the background and thus lose the active download. In fact you would also have this same problem if you use android:configChanges for many of the same reasons.) -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ADT plugin layout editor - additional device configurations?
You can create your own configurations. Have a look here. http://techdroid.kbeanie.com/2010/09/getting-started-with-tablets-they-are.html -Kumar Bibek http://techdroid.kbeanie.com On Sep 11, 7:07 pm, PulseDev dev4pu...@gmail.com wrote: You know that layout editor in the Android ADT plugin that lets you design the layout for ADP1, ADP2 and Nexus One, has anyone created other device configurations? It requires device information such as the x-dpi and y-dpi, which can be difficult to find out. I'm just wondering if anybody has added more device configurations they're willing to share? Perhaps together we could compile a huge devices.xml containing many of the devices out there. I'm fully aware the layout editor has many faults and cannot be relied upon but it is sometimes useful to rapidly preview how the layout might look on a wide variety of devices without switching between emulators. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Saving drawables to sd card?
My application has alot of pictures in it and I was wondering if its possible if one of my users click a button to send that picture to the sd card? If this is possible please let me know -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Monkey usage with Scripts/Network Control not working
An update: I was using an incorrect script file. The correct version is as described here http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java;h=9b2328d23fdf297a6f9c2201b89876bb42971ad2;hb=HEAD I am trying to figure out what device code I need to use. Events are being sent, but I cannot see output. Will posts here once I get things working. (I think the Network Control/scriptfile docs are confusing) Cheers, Earlence On Sep 12, 9:34 pm, Tez earlencefe...@gmail.com wrote: Hi, I am trying to do 2 things with monkey 1. Execute a script with a command like adb shell monkey -p MY_PACKAGE --setup scriptfile -f /sdcard/ mon_script1.txt 1 where mon_script.txt contains a few touch commands. After I execute this, I see nothing happening on the screen. It even does not give me the Number of events injected message. I have verified that my touch co-ordinates fall over actual UI elements. This is the script file I am using tap 79 29 tap 100 100 tap 200 200 tap 300 300 quit 2. Execute Monkey Network control to type commands individually. I start up monkey to listen to a port and use PuTTY to send commands. I get OK return messages, but nothing happens on the screen. Whenever I use monkey in the random mode, I see interaction on the screen. But I need to get one of the above 2 methods to work. I have seen the sources of monkey and nothing seems to be wrong. Has anyone used monkey in the above described way? If so, please tell me what I am doing wrong. Cheers, Earlence -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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-porting] Re: Network Time is not auto updating with some service provider???
I had tested on : LG Thunder : In which i saw the issue. With Reliance/ BSNL carrier. in india working fine with LG Swift GT540: Rajesh On Fri, Sep 10, 2010 at 10:47 PM, Robert Greenwalt rgreenw...@google.comwrote: When an OEM ports froyo to their device, the may change the code substantially. It could be they've changed something in the android framework that breaks this in some cases. It could also be a baseband issue. You could report the issue to the oem that fails sometimes, but I'm not sure there is much we can do here. Which devices did you use and which device failed to get time on which carriers? R On Fri, Sep 10, 2010 at 7:31 AM, Rajesh Jounwal rjounwal.andr...@gmail.com wrote: Hi Robert, Thanks for reply, Thanks for link, i already gone through it, But i also found that with other froyo device same provider like reliance automatic update time. May be it's issue rise from baseband, we need to update some modem setting information in some where in code. but not getting what and where? Any suggestion then plz let me know. Rajesh On Fri, Sep 10, 2010 at 7:48 PM, Robert Greenwalt rgreenw...@google.comwrote: I believe that some carriers send time data to devices and some carriers do not (more than just time, time + timezone). I think you can probably google nitz for info (http://en.wikipedia.org/wiki/NITZ). On Fri, Sep 10, 2010 at 6:17 AM, Rajesh Jounwal rjounwal.andr...@gmail.com wrote: Any update on this? On Fri, Sep 10, 2010 at 12:25 AM, Rajesh Jounwal rjounwal.andr...@gmail.com wrote: HI All, I am facing problem in Froyo (Android 2.2), Network Time is not auto updating in date and time setting (using NITZ when Automatic option is enable) with some Service provider (Like BSNL and Reliance). but it's working fine with Vodaphone and Airtel. And i observe based on LOG statement that Unsoliciated Command UNSOL_NITZ_TIME_RECEIVED is not getting called at the time of Android system boot-up time with some Service Provider (like BSNL, Reliance) but it's getting called when i insert the Vodaphone and Airtel SIM card. but not able to figure out that How this UNSOL_NITZ_TIME_RECEIVED command has been triggered? If anybody have any idea please help me? Also i willing like to know where i have to made change, is it in Kernel level or Framework level? Thanks in advanced. rajesh. -- unsubscribe: android-porting+unsubscr...@googlegroups.comandroid-porting%2bunsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get value from ListView onListItemClick?
Another question seeking help. When I click the listview item, I pop up a form as dialog format to enable user to edittext. All is fine, I have an option to cancel editing by calling removeDialog(ID1); But if the user click back (android key) instead of the cancel button and pick another item in the listview, the edittext will contain the old data. I think because back did not release the dialog and it recall the same thing again instead of re-inflating one with the newly selected data? How to solve this issue? On Sep 11, 11:19 pm, Pang joyb...@163.com wrote: c.getString(c.getColumnIndexOrThrow(UN)) On 9月11日, 下午8时37分, Mystique joven.ch...@gmail.com wrote: Cancel my last qns, I understood and get it work already :) On Sep 11, 8:32 pm, Mystique joven.ch...@gmail.com wrote: Dear Mr. Murphy, Thanks, I understood this part ok c.moveToPosition(position); // where c is your Cursor String temp=c.getString(...); // where ... is whatever column number My cursor was created in onCreate, how do I initial it in public void onListItemClick? This part I do not understand. On Sep 11, 8:19 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Sep 11, 2010 at 8:04 AM, Mystique joven.ch...@gmail.com wrote: So if I want to get value of UN, I do this - String temp = moveToPosition(UN)? No. c.moveToPosition(position); // where c is your Cursor String temp=c.getString(...); // where ... is whatever column number you are seeking -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get value from ListView onListItemClick?
Also, my listview doesn't seems to update/refresh with new data until I refresh it manually. How do I refresh the new listview after updating? On Sep 13, 1:28 am, Mystique joven.ch...@gmail.com wrote: Another question seeking help. When I click the listview item, I pop up a form as dialog format to enable user to edittext. All is fine, I have an option to cancel editing by calling removeDialog(ID1); But if the user click back (android key) instead of the cancel button and pick another item in the listview, the edittext will contain the old data. I think because back did not release the dialog and it recall the same thing again instead of re-inflating one with the newly selected data? How to solve this issue? On Sep 11, 11:19 pm, Pang joyb...@163.com wrote: c.getString(c.getColumnIndexOrThrow(UN)) On 9月11日, 下午8时37分, Mystique joven.ch...@gmail.com wrote: Cancel my last qns, I understood and get it work already :) On Sep 11, 8:32 pm, Mystique joven.ch...@gmail.com wrote: Dear Mr. Murphy, Thanks, I understood this part ok c.moveToPosition(position); // where c is your Cursor String temp=c.getString(...); // where ... is whatever column number My cursor was created in onCreate, how do I initial it in public void onListItemClick? This part I do not understand. On Sep 11, 8:19 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Sep 11, 2010 at 8:04 AM, Mystique joven.ch...@gmail.com wrote: So if I want to get value of UN, I do this - String temp = moveToPosition(UN)? No. c.moveToPosition(position); // where c is your Cursor String temp=c.getString(...); // where ... is whatever column number you are seeking -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] BackupManager dataChanged() not static, need a reference to BackupManager?
Hi, From: http://developer.android.com/guide/topics/data/backup.html To inform the BackupManager that the data has changed, you are supposed to call dataChanged(). However, that method is not static, so you need a reference to the BackupManager. How do you get a reference to the BackupManager? I can get around this by calling the dataChanged(packageName) method which is static, like this: BackupManager.dataChanged(getBaseContext().getPackageName()); which works great. I'm just wondering if I've missed something? 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: Monkey usage with Scripts/Network Control not working
count= number of events speed= in ms start data DispatchPointer(long downTime, long eventTime, int action, float x, float y, float pressure, float size, int metaState, float xPrecision, float yPrecision, int device, int edgeFlags) DispatchTrackball same as DispatchPointer DispatchKey(long downTime, long eventTime, int action, int code, int repeat, int metaState, int device, int scancode) DispatchFlip(boolean keyboardOpen) DispatchPress(int keyCode) LaunchActivity(String pkg_name, String cl_name) UserWait(long sleeptime) LongPress() This is the format. You should be careful to ensure that the co-ordinates are correct. What you specify here are raw co-ords i.e before any window adjustments etc take place. You must take this into account while calculating co-ords. I am yet to try the network control - Lets see what happens. Cheers, Earlence On Sep 12, 10:20 pm, Tez earlencefe...@gmail.com wrote: An update: I was using an incorrect script file. The correct version is as described here http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cm... I am trying to figure out what device code I need to use. Events are being sent, but I cannot see output. Will posts here once I get things working. (I think the Network Control/scriptfile docs are confusing) Cheers, Earlence On Sep 12, 9:34 pm, Tez earlencefe...@gmail.com wrote: Hi, I am trying to do 2 things with monkey 1. Execute a script with a command like adb shell monkey -p MY_PACKAGE --setup scriptfile -f /sdcard/ mon_script1.txt 1 where mon_script.txt contains a few touch commands. After I execute this, I see nothing happening on the screen. It even does not give me the Number of events injected message. I have verified that my touch co-ordinates fall over actual UI elements. This is the script file I am using tap 79 29 tap 100 100 tap 200 200 tap 300 300 quit 2. Execute Monkey Network control to type commands individually. I start up monkey to listen to a port and use PuTTY to send commands. I get OK return messages, but nothing happens on the screen. Whenever I use monkey in the random mode, I see interaction on the screen. But I need to get one of the above 2 methods to work. I have seen the sources of monkey and nothing seems to be wrong. Has anyone used monkey in the above described way? If so, please tell me what I am doing wrong. Cheers, Earlence -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AsyncTask and screen rotation
Why wouldn't that work if it's a non-static inner class? Dave's solution is basically what I do, with the AsyncTask being a private (non-static) inner class of the Activity that uses it. Store it across screen flips, and then if it's present in onCreate, feed it the new context. -- Eric On Sep 12, 1:02 pm, Mark Murphy mmur...@commonsware.com wrote: That should work, so long as MyAsyncTask is a static inner class or a regular standalone public class (not a non-static inner class). See: http://github.com/commonsguy/cw-android/tree/master/Rotation/Rotation... On Sun, Sep 12, 2010 at 12:47 PM, davemac davemac...@gmail.com wrote: So we could use something as simple as the following? �...@override public Object onRetainNonConfigurationInstance() { return myAsyncTask; } And in onCreate(): if( (myAsyncTask = (MyAsyncTask)getLastNonConfigurationInstance()) != null) myAsyncTask.setContext(this); // Give my AsyncTask the new Activity reference I added a setContext() method to MyAsyncTask which resets a local member to be used in the on* callbacks to do UI work. I made MyAsyncTask a completely separate class from my Activity class, and the constructor requires a Context. This seems to work, and it seems pretty easy to do. I realize that an AsyncTask has no chance of being restarted the way a Service does if it comes to an untimely death. But from the comments in this thread, I'm assuming that my Activity will get a valid reference to the AsyncTask when it is restarted by a Configuration Change. Yes? - dave On Sep 10, 1:05 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 9:53 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: What if that AsyncTask is downloading a file? Interrupting it, regardless of how nicely done, would be a bad thing wouldn't it? You don't need to interrupt it. See Mark's option 2. Just don't have it tied to a specific activity instance. If you want to have it associated logically with the activity, you can use onRetainNonInstanceState() to transfer it between instances. (Though this is intended as an optimization, and if you rely on this then you likely won't get the proper semantics in other cases -- for example if the user leaves your app and returns to it later it could easily get killed while in the background and thus lose the active download. In fact you would also have this same problem if you use android:configChanges for many of the same reasons.) -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AsyncTask and screen rotation
On Sun, Sep 12, 2010 at 2:26 PM, Eric Mill kproject...@gmail.com wrote: Why wouldn't that work if it's a non-static inner class? Dave's solution is basically what I do, with the AsyncTask being a private (non-static) inner class of the Activity that uses it. Store it across screen flips, and then if it's present in onCreate, feed it the new context. Oh, technically, it'll work, but the inner class will then *also* hold an *implicit* reference to the old activity, which you don't want, as you'll leak memory. Since you're not using the implicit reference -- replacing it with the explicit one -- you want to use a static inner class. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Saving drawables to sd card?
On 12 September 2010 19:14, arberb beqi...@gmail.com wrote: My application has alot of pictures in it and I was wondering if its possible if one of my users click a button to send that picture to the sd card? If this is possible please let me know No, there's no magic button, beside moving the whole app to SD card but it's android 2.2+ only. If you want to separate media files, then you will probably have to rework your app to deal with these files yourself (in general framework requires resources to be part of your application and your application apk file cannot be splitted into parts. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Behaviour of launchMode=“ singleTask” not as described?
singleTask is one of four launch modes, but its appealing name and description belies the fact that it is not recommended for general use: http://developer.android.com/guide/topics/manifest/activity-element.html I suspect you can achieve your desired result using a general-purpose launch mode (standard or singleTop), and, instead, clearing ActivityB's taskAffinity and/or adding FLAG_ACTIVITY_NEW_TASK to the intent that launches ActivityB. On Sep 10, 11:56 pm, Olly ollywood...@gmail.com wrote: singleTop behaves as documented for me (i.e. creating a new Activity at the top of the stack, or reusing one if there is already an Activity of that type at the top of the stack). I'm pretty sure singleTask is documented incorrectly though. I'm just wondering whether I've got it wrong, since this is completely fundamental (its in the Android fundamentals document, so how has no-one else picked up on it? On 11 Sep, 04:30, joebowbeer joe.bowb...@gmail.com wrote: I agree that the documentation is confusing and possibly wrong. For the second behavior, that of discarding the intent and bringing the task with the specified activity to the foreground, you should use singleTop instead (despite what the documentation says). On Sep 10, 4:00 pm, Olly ollywood...@gmail.com wrote: I've been learning Android and have come across an issue with launchMode=singleTask. The documentation states that when this attribute is used, the Activity is always launched into a new task as the root Activity. Secondly, the documentation states that if an Intent is targeted at such an Activity when there are Activities sitting above it in its task stack, such Intents are discarded (although the task is still brought to the foreground). I've been playing around with this, and the behaviour I observe is completely different. In particular: - Activities with launchMode=singleTask are not always the root Activity in a task stack. They are just plonked ontop of the existing stack with the same affinity. - When an Intent is targeted at such an Activity and there are other Activities above it in the stack, the Intent is not discarded. Instead the Activities above it in the stack are discarded. The Intent is then delivered via onNewIntent to the Activity as normal. Can someone confirm that this is the actual behaviour? If so, why are the documents incorrect? If not what have I done wrong. . . Here is a simple way to observe the behaviour: 1. Create a simple main.xml containing two buttons b1 and b2. 2. Create the following Activity: public class ActivityA extends Activity { @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button lButton = (Button) findViewById(R.id.b1); lButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent lNextIntent = new Intent(ActivityA.this,ActivityA.class); startActivity(lNextIntent); } }); Button lButton2 = (Button) findViewById(R.id.b2); lButton2.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent lNextIntent = new Intent(ActivityA.this,ActivityB.class); startActivity(lNextIntent); } }); } } 3. Create the second Activity: public class ActivityB extends ActivityA { } 4. The manifest: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=ojw28.activitytest android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=ActivityA 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=.ActivityB android:launchMode=singleTask /activity /application /manifest 5. Launch the application. Press button b1 a couple of times, see what happens to the task stack using adb shell dumpsys activity. Multiple instances of ActivityA are now in the task stack as expected. Now press button b2. According to the documentation this should launch an ActivityB instance is a NEW task, as the root Activity of that task. Use adb to look at the stack. What actually happens is ActivityB
Re: [android-developers] Re: flashing element in ArrayAdapter
On Sun, Sep 12, 2010 at 11:52 AM, Simone simone.russ...@gmail.com wrote: What do you suggest? Try thishttp://developer.android.com/reference/android/widget/AdapterView.html#getFirstVisiblePosition%28%29and thishttp://developer.android.com/reference/android/widget/AdapterView.html#getLastVisiblePosition%28%29to determine what's actually visible on the screen and flash those as necessary. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to get value from ListView onListItemClick?
2010/9/12 Mystique joven.ch...@gmail.com How to solve this issue? 1 - Add an onCancelListener to your dialog that calls removeDialog(ID1) on it so it gets removed regardless of how it's canceled. or 2 - Override onPrepareDialog to set the data in the dialog as necessary based on the item clicked. This is a little more cumbersome. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] any tool in android to find memory leak and code optimization
Hi All, I would like to know is there any tool in android to find memory leak and code optimization. Thanks, Sohan Badaya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Fil-rate workaround with FBOs?
My apologies if this is a stupid question... Might I get a net frame rate improvement if I did something like this: * create an FBO of resolution less than the full phone screen dimensions (user-selected quality vs speed option) * do most of my scene rendering into that FBO * then the 'real' (full screen) render would either use the FBO as the starting background color buffer contents, or render it (probably orthographically) as a single quad. * then probably add UI/Text decoration on top of that, where the resolutions really benefits. And, is there some egl glue (I am a glSurfaceView kinda dood) that would automagically do something like this in the first place? Or am I being naive to think the GPU could do its work faster if it was rendering to a lower resolution target? And would the phone with the worst fill rate also be the phone that doesn't support FBOs in the first place? After reading the OpenVR info (thanks again, Lance) I think I might get some improvement by breaking some huge triangles into smaller ones. I have some (water layer, in particular) that are so large they probably get processed by every tile of the screen. Thanks for any insights, - Dan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: any tool in android to find memory leak and code optimization
I believe DDMS has much of what you need. For code profiling, search for 'TraceView' * you will want to add some UI to your app to let you toggle tracing on and off, so you can capture samples while your code is doing the thing you're interested in improving. For memory leak checking, you need to run the full DDMS (not the DDMS panel in eclipse), and you ideally should use that full DDMS to launch the app (either on a emulator or a real phone). If you let eclipse launch it, it will probably grab the access port and then the full DDMS won't be able to connect and you will scratch your head wondering why. You might start here: http://developer.android.com/guide/developing/tools/traceview.html http://developer.android.com/resources/articles/avoiding-memory-leaks.html http://developer.android.com/resources/articles/track-mem.html Note that TraceView might have a memory limit preventing you from capturing enough data. You can get around that by editing your copy of traceview.bat (in the sdk/tools folder I recall)... there is a line near the end that you change to look something like this: call %java_exe% -Xmx1024m -Djava.ext.dirs=%javaextdirs% - Dcom.android.traceview.toolsdir= -jar %jarpath% %* it's that -Xmx1024m that you change (it defaults to something smaller) And if you trace on a real phone, don't forget to give your app permission to write to the SDCARD. I believe the instructions imply you (in the emulator) can toggle tracing with F9 without needing to formally call: Debug.startMethodTracing(calc);// things get profiled Debug.stopMethodTracing();// But that has not worked for me.So I always call those functions (at run time) to start/stop my sampling. On Sep 12, 1:09 pm, Sohan badaya sohan.bad...@gmail.com wrote: Hi All, I would like to know is there any tool in android to find memory leak and code optimization. Thanks, Sohan Badaya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: flashing element in ArrayAdapter
Ok, thanks. But I can say for sure that the list is not gonna be 2000 items long ;) Simone On 12 Set, 19:00, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 12:52 PM, Simone simone.russ...@gmail.com wrote: Well, the view isn't long (average 5 elements, maximum 20). What do you suggest? Other than rethink your approach, I don't have a suggestion off the top of my head. I'm just telling you that if your maximum goes from 20 to 2000, and the user scrolls to the bottom, you're going to have memory problems. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: flashing element in ArrayAdapter
Simone, ListView has methods for getting indices of first / last visible item. Since only a few can fit on the screen, doing a linear search to find the right list item is still pretty efficient. -- Kostya 13.09.2010 0:23, Simone пишет: Ok, thanks. But I can say for sure that the list is not gonna be 2000 items long ;) Simone On 12 Set, 19:00, Mark Murphymmur...@commonsware.com wrote: On Sun, Sep 12, 2010 at 12:52 PM, Simonesimone.russ...@gmail.com wrote: Well, the view isn't long (average 5 elements, maximum 20). What do you suggest? Other than rethink your approach, I don't have a suggestion off the top of my head. I'm just telling you that if your maximum goes from 20 to 2000, and the user scrolls to the bottom, you're going to have memory problems. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Copying 1 drawable to SD
I wanna copy a drawable to the sd card. Lets say I have picture 1.jpg in my drawable folder and I want the app to copy it to the sd card when a certain button is pressed how can I do this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ADT plugin layout editor - additional device configurations?
You can safely init x/y dpi to 120/160/240. That won't make a big difference. BTW, in r7 there are a few more devices in the built-in list. On Sat, Sep 11, 2010 at 7:07 AM, PulseDev dev4pu...@gmail.com wrote: You know that layout editor in the Android ADT plugin that lets you design the layout for ADP1, ADP2 and Nexus One, has anyone created other device configurations? It requires device information such as the x-dpi and y-dpi, which can be difficult to find out. I'm just wondering if anybody has added more device configurations they're willing to share? Perhaps together we could compile a huge devices.xml containing many of the devices out there. I'm fully aware the layout editor has many faults and cannot be relied upon but it is sometimes useful to rapidly preview how the layout might look on a wide variety of devices without switching between emulators. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ADT plugin layout editor - additional device configurations?
Kumar, good info on there but your screenshot shows 1024 600 for the xdpi and ydpi. This is wrong. This the density of the screen, not the res. For instance for the Nexus one it's ~180 (which makes it a 160-class device). Xav On Sun, Sep 12, 2010 at 10:06 AM, Kumar Bibek coomar@gmail.com wrote: You can create your own configurations. Have a look here. http://techdroid.kbeanie.com/2010/09/getting-started-with-tablets-they-are.html -Kumar Bibek http://techdroid.kbeanie.com On Sep 11, 7:07 pm, PulseDev dev4pu...@gmail.com wrote: You know that layout editor in the Android ADT plugin that lets you design the layout for ADP1, ADP2 and Nexus One, has anyone created other device configurations? It requires device information such as the x-dpi and y-dpi, which can be difficult to find out. I'm just wondering if anybody has added more device configurations they're willing to share? Perhaps together we could compile a huge devices.xml containing many of the devices out there. I'm fully aware the layout editor has many faults and cannot be relied upon but it is sometimes useful to rapidly preview how the layout might look on a wide variety of devices without switching between emulators. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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] changing an image in a layout
i've got this simple layout in a file derived from Activity ?xml version=1.0 encoding=utf-8? ScrollView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dip ImageView android:id=@+id/photo android:layout_width=wrap_content android:layout_height=wrap_content / /ScrollView i'd like to change the imageview contents dynamically. which method do i need to overload - again this class is derived from Activity. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] changing an image in a layout
You don't need to override anything, but rather, whenever you want to change the image, do this: - Get a reference to your ImageView: ImageView photoImageView = (ImageView) findViewById(R.id.photo); - Tell it to use a new image: If it's a resource: photoImageView.setImageResource(R.drawable.new drawable resource id here); If the new image is a Drawable: photoImageView.setImageDrawable(reference to a Drawable); Or a bitmap: photoImageView.setImageBitmap(reference to a Bitmap); -- Kostya 13.09.2010 1:14, dashman пишет: i've got this simple layout in a file derived from Activity ?xml version=1.0 encoding=utf-8? ScrollView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dip ImageView android:id=@+id/photo android:layout_width=wrap_content android:layout_height=wrap_content / /ScrollView i'd like to change the imageview contents dynamically. which method do i need to overload - again this class is derived from Activity. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Every few hours Eclipse + ADT runs out of resources...
When I am developing for Android and repeatedly running and/or debugging an Android app in the emulator then about every two hours or so I get an Out-of-memory exception, occasionally also an out-of - resources- or out-of-GWT-handles exception. At that point one can only stop and restart eclipse. Apparently the ADK must be doing something wrong, because I have been developing with Eclipse now for 5+ years and I normally never see this. ADT is a really the exception here. Is there any setting or patch that helps top avoid this? I have already given it more heap space (750M) to stretch the time between these hickups a bit, but that approach isn't really sustainable. This is using Eclipse 3.5 (Galileo) and the Android SDK r06 running a FroYo AVD. Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can android support more than one sdcard?
I really don't think he is the one missing the point. Your talk about supporting an arbitrary number of everything is a straw-man argument. Other than you, nobody proposed that in this thread. What has been observed with 20-20 hindsight though, is that the desirability of two SD cards should have been easy to foresee, as it is much more useful than an arbitrary number of everything. It is much more useful, and for only a little extra hardware, than two screens, for example. Or two keyboards. Don't feel bad about Google failing to foresee this. Feel bad about Google failing to realize you are big enough to admit this failure. It is not THAT big a failure. On Sep 11, 3:40 pm, Dianne Hackborn hack...@android.com wrote: Well you are totally missing my point. Of course it would be *nice* to support an arbitrary number of everything. To actually ship a product on time, though, you probably aren't going to be able to do so. The SD card is an especially good case of this, because it's not just a matter of adding an API -- you also need to figure out the whole UX around this, which is fairly non-trivial. Anyway, done with this thread. On Sat, Sep 11, 2010 at 1:51 AM, blindfold seeingwithso...@gmail.comwrote: A marketing or engineering department that can't accept limitations is an organization that will never ship a product. When you are a research department you aim to develop new products rather than shorten time to market. When even the basic building blocks are already highly restrictive it becomes much harder to innovate. Although this thread is mostly about having a second SD card, your comments seem to indicate a general attitude towards and lack of interest in generalized API support for enumerating peripherals: I'll only support one camera! Okay. Not OK! If one wants to compete on the market one has to look at competitors that already sport two cameras, such as a front-facing camera. Think many Nokia phones, and Apple's iPhone 4G. (I added second camera support to my own Nokia Java MIDlet app back in 2006.) Do you want every Android phone manufacturer to invent and develop their own proprietary Android API extensions even to just keep up with existing functionality elsewhere? You encourage fragmentation! Also, please look across platform boundaries as well as look at broadening the scope towards gaming devices. What Microsoft is doing with Kinect (formerly Natal) involves either a stereo camera or a time- of-flight camera. Do you want individual Android device manufacturers to create proprietary API extensions here too? Why make it impossible to develop an Android counterpart of the Nintendo 3DS by sticking to a conventional single camera API, forcing proprietary extensions? Thanks! The vOICe for Android http://www.seeingwithsound.com/android.htm On Sep 11, 3:04 am, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 10, 2010 at 2:33 PM, Doug Gordon gordo...@gmail.com wrote: I am really surprised that the Android design would only account for one of anything. In my experience, any time you say we're only going to support one of feature X, the marketing or engineering departments decide to add another X. In any case, having support for more than one is the same as having support for any quantity. U... I'll only support one touch screen! Okay. I'll only support one DPAD! Okay. I'll only support one CPU! Okay. I'll only support one graphics accelerator! Okay. I'll only support one SIM! Okay. I'll only support one headphone output! Okay. I'll only support one camera! Okay. A marketing or engineering department that can't accept limitations is an organization that will never ship a product. (And you don't note all of the complexity that comes from going from 1 to 2 -- how is this reflecting in the UI? How does the user decide where they want their stuff to go? How about telling them how much space is where? And now you've got to let them move stuff around. I can make a good argument that multiple SD cards is just intrinsically a crummy user experience and should be avoided. Heck even one SD card significantly complicates the UX.) -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: AsyncTask and screen rotation
But just as you say, that is by -default- that it is on the same process and thread. Now does anyone actually use it with that same process being an Activity? Often (though not always), it is launched by an Alarm, not by the main process hosting the UI thread in the first place. Then it is the Service that sends messages to the Activity that currently has the UI. Now since the whole purpose of AsyncTask is to provide communication and coordination between a UI thread and a worker thread (more conveniently than with java.lang.thread), it might make sense to use AsyncTask in a Service only if the Service itself has a UI thread. But although the docs you mention admit to this possibility, I am having trouble seeing why that would ever be good design. But knowing this group, if there are any such, someone will pop up out of the woodwork and show us:) On Sep 11, 2:36 am, Lance Nanek lna...@gmail.com wrote: peculiar problems in the way the classes are designed. Service by definition is already in the background, it HAS no UI thread, so why Services, by default, run in the same on process and on the main/UI thread. http://developer.android.com/reference/android/app/Service.html Note that services, like other application objects, run in the main thread of their hosting process. This means that, if your service is going to do any CPU intensive (such as MP3 playback) or blocking (such as networking) operations, it should spawn its own thread in which to do that work. On Sep 11, 4:55 am, Indicator Veritatis mej1...@yahoo.com wrote: Option 4 certainly sounds like it will work, but it suggests some peculiar problems in the way the classes are designed. Service by definition is already in the background, it HAS no UI thread, so why do I need an AsyncTask there at all? The whole point of the latter is to communicate between UI thread and worker thread. As for documenting what works, I hope Google takes your hint and documents what the right way to do this really is. After all, these are the same people who keep warning us that if it's not documented, then it is subject to change w/o notice. On Sep 10, 10:04 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 10, 2010 at 12:46 PM, Romain Guy romain...@android.com wrote: Option #1 is a lot more intrusive. You lose the ability to automatically switch layouts, drawables, etc. Worst-case scenario: Step #1: Take your UI setup that is in onCreate() and move it to a separate method (e.g., setupViews()) Step #2: Call setupViews() from onCreate() Step #3: Call setupViews() from onConfigurationChanged() Done. ~4 lines of code. And it's the exact same code path that a destroy/recreate will go down, so it's not like this adds unusual performance overhead. There are certain circumstances where this may not work (e.g., GLSurfaceView and a game), but you needed to do extra work for those cases, anyway, to handle the destroy/recreate cycle. Saving and restoring an AsyncTask is not difficult. No, it's not. The question is: is it reliable? None of the AsyncTask documentation (class, article, etc.) covers this case. It *appears* that you can write an AsyncTask such that onPostExecute() or onProgressUpdate() will not be called in the middle of the activity transition. However, that's not documented and hence not guaranteed, and so while I'll describe a pattern that seems to work, I personally don't trust it any further than I can throw your large Froyo lawn ornament. If somebody could give us the recipe that is guaranteed to work (i.e., works today, and is going to work in Android 2.3/3.0/Turbo System 5000), that'd be *wonderful*. Actually, I lied earlier. I'd choose Option #4: Option #4: Don't do the AsyncTask in an activity. Use a Service and have it do the AsyncTask, or use an IntentService if the sole purpose of the service is to do stuff in a background thread. In particular, an IntentService would be good for a download that you want to happen regardless of what may go on with an activity (e.g., Android Market downloading an APK), and so you don't need to worry about canceling it. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: need help with softkeyboard development
Thank you for your pointers. I have this layout: ?xml version=1.0 encoding=utf-8? RelativeLayout android:id=@+id/widget79 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; ImageView android:id=@+id/widget93 android:layout_width=wrap_content android:layout_height=200px android:src=@drawable/english_uppercase android:layout_alignParentBottom=true android:layout_alignParentLeft=true /ImageView /RelativeLayout as main.xml Then in onCreateInputView: public class mekb extends InputMethodService implements View.OnTouchListener { @Override public void onCreate() { super.onCreate(); } @Override public View onCreateInputView() { return (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); } } Is this the way to load an image to show up when the keyboard is called? (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); Or should I do the image/view loading some other way? Thanks for your help. On Sep 11, 11:32 pm, Dianne Hackborn hack...@android.com wrote: An IME is essentially just a regular UI that is running as an InputMethodService, which makes calls on InputConnection to do whatever editing operations it wants. If you are stuck on changing the keyboard UI to some other kind of UI, that isn't really anything specific to writing an IME but just standard android UI -- look at the documentation on View etc to see how to write UI. You can simply make a single View that you set as your UI, and do all your drawing in onDraw() and receive touch events in onTouchEvent(). Then based on whatever you do for that do calls on InputConnection as the soft keyboard sample shows. On Sat, Sep 11, 2010 at 11:01 PM, Saied saie...@gmail.com wrote: Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: need help with softkeyboard development
Thank you for your pointers. I have this layout: ?xml version=1.0 encoding=utf-8? RelativeLayout android:id=@+id/widget79 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; ImageView android:id=@+id/widget93 android:layout_width=wrap_content android:layout_height=200px android:src=@drawable/english_uppercase android:layout_alignParentBottom=true android:layout_alignParentLeft=true /ImageView /RelativeLayout as main.xml Then in onCreateInputView: public class mekb extends InputMethodService implements View.OnTouchListener { @Override public void onCreate() { super.onCreate(); } @Override public View onCreateInputView() { return (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); } } Is this the way to load an image to show up when the keyboard is called? (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); Or should I do the image/view loading some other way? Thanks for your help. On Sep 11, 11:32 pm, Dianne Hackborn hack...@android.com wrote: An IME is essentially just a regular UI that is running as an InputMethodService, which makes calls on InputConnection to do whatever editing operations it wants. If you are stuck on changing the keyboard UI to some other kind of UI, that isn't really anything specific to writing an IME but just standard android UI -- look at the documentation on View etc to see how to write UI. You can simply make a single View that you set as your UI, and do all your drawing in onDraw() and receive touch events in onTouchEvent(). Then based on whatever you do for that do calls on InputConnection as the soft keyboard sample shows. On Sat, Sep 11, 2010 at 11:01 PM, Saied saie...@gmail.com wrote: Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: need help with softkeyboard development
Thank you for your pointers. I have this layout: ?xml version=1.0 encoding=utf-8? RelativeLayout android:id=@+id/widget79 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; ImageView android:id=@+id/widget93 android:layout_width=wrap_content android:layout_height=200px android:src=@drawable/english_uppercase android:layout_alignParentBottom=true android:layout_alignParentLeft=true /ImageView /RelativeLayout as main.xml Then in onCreateInputView: public class mekb extends InputMethodService implements View.OnTouchListener { @Override public void onCreate() { super.onCreate(); } @Override public View onCreateInputView() { return (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); } } Is this the way to load an image to show up when the keyboard is called? (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); Or should I do the image/view loading some other way? Thanks for your help. On Sep 11, 11:32 pm, Dianne Hackborn hack...@android.com wrote: An IME is essentially just a regular UI that is running as an InputMethodService, which makes calls on InputConnection to do whatever editing operations it wants. If you are stuck on changing the keyboard UI to some other kind of UI, that isn't really anything specific to writing an IME but just standard android UI -- look at the documentation on View etc to see how to write UI. You can simply make a single View that you set as your UI, and do all your drawing in onDraw() and receive touch events in onTouchEvent(). Then based on whatever you do for that do calls on InputConnection as the soft keyboard sample shows. On Sat, Sep 11, 2010 at 11:01 PM, Saied saie...@gmail.com wrote: Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
Re: [android-developers] Re: Can android support more than one sdcard?
On Sun, Sep 12, 2010 at 9:20 AM, Shomari Prince nyuster...@gmail.comwrote: (e.g. froyo's anti-task manager functions recently sent me for a spin). Actually I mentioned a number of times on this group that this was going to be addressed, and it was largely driven by the increasing complaints from app developers whose users were saying their apps were broken when it was really being broken by task managers. -- 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: need help with softkeyboard development
Thank you for your pointers. I have this layout: ?xml version=1.0 encoding=utf-8? RelativeLayout android:id=@+id/widget79 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; ImageView android:id=@+id/widget93 android:layout_width=wrap_content android:layout_height=200px android:src=@drawable/english_uppercase android:layout_alignParentBottom=true android:layout_alignParentLeft=true /ImageView /RelativeLayout as main.xml Then in onCreateInputView: public class mekb extends InputMethodService implements View.OnTouchListener { @Override public void onCreate() { super.onCreate(); } @Override public View onCreateInputView() { return (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); } } Is this the way to load an image to show up when the keyboard is called? (KeyboardView) getLayoutInflater().inflate(R.layout.main, null); Or should I do the image/view loading some other way? Thanks for your help. On Sep 11, 11:32 pm, Dianne Hackborn hack...@android.com wrote: An IME is essentially just a regular UI that is running as an InputMethodService, which makes calls on InputConnection to do whatever editing operations it wants. If you are stuck on changing the keyboard UI to some other kind of UI, that isn't really anything specific to writing an IME but just standard android UI -- look at the documentation on View etc to see how to write UI. You can simply make a single View that you set as your UI, and do all your drawing in onDraw() and receive touch events in onTouchEvent(). Then based on whatever you do for that do calls on InputConnection as the soft keyboard sample shows. On Sat, Sep 11, 2010 at 11:01 PM, Saied saie...@gmail.com wrote: Thanks Earlence, but... it's self explanatory if you are already clear about what it does! That is, if you actually don't need it For me, it is FAR FROM self explanatory, actually as thick as mud. I am skilled at apple iPhone SDK and find that quite self explanatory, but again, that's because I know it rather well. The point of the example, I think, is to teach it to someone who does not know how to do it. This example is specific to a keyboard with keys (buttons). That's not what I want as my keyboard is key-less and gesture-based. All I need is a way to show a single .png and have a way to grab the touch events. That's much simpler than the example, but alas decoding the example has been a np-complete problem. Again, I thank you for your encouragement, but the more I tried that, the more frustrated I have become. Anyone who understands this softkeyboard business well cares to help me? On Sep 10, 11:29 pm, Tez earlencefe...@gmail.com wrote: Hi, You don't really need to hire someone. The SoftKeyboard example available in the SDK is self explanatory. Lots of comments. Experiment a little, you will automatically understand how things work. Cheers, Earlence On Sep 11, 10:55 am, Saied saie...@gmail.com wrote: Hello, I have two android related needs: 1. I am trying to create a soft keyboard for android. I need someone to help me create the template for it: the service, the touch event capturing and sending of characters and sensing of the text buffer. Based on google's published document this seems to be standard stuff, for someone familiar with the platform. I will fill in the logic for the keyboard myself. So this is not a huge job, but a few hours of consulting dollars. 2. We are two programmers, trying to learn android. We are looking for a tutor of sort, whom we can pay hourly and talk to or skype with 2-3 hours a week. again, not a huge job, but a little money on the side. If you feel up to it, please contact me. sa...@exideas.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at