[android-developers] Webkit Plugins in 2.0
What is the official story on Plugins in WebView/webkit in the Eclair release? Apparently, not only did some classes get deprecated, but they also return empty data now. There is however plugin support in the Android webkit, and there's is also the PluginStub interface. But how do plugins get installed now? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] startActivity Problem
Hi all, I'm trying to call a service directly, and I'm getting an ActivityNotFoundException thrown. My main class looks like this: --- @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PackageManager pm = getPackageManager(); try { Log.i(TAG,retrieving services:); PackageInfo pinfo = pm.getPackageInfo(test.another, PackageManager.GET_ACTIVITIES | PackageManager.GET_SERVICES); for (ServiceInfo serv : pinfo.services) { Log.i(TAG,declared service: +serv.name); Log.i(TAG, package name: +serv.packageName); Log.i(TAG, enabled: +serv.enabled); Log.i(TAG, exported: +serv.exported); } } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } Intent i = new Intent(); i.setClassName(test.another, test.another.MyService); startActivity(i); setContentView(R.layout.main); } - My service is empty, minus some log messages: public void onCreate() { Log.i(T,created); } public void onStart(Intent i, int code) { Log.i(T,started); } @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub return null; } And the service is declared in the manifest file: --- ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=test.another android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.Main android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity service android:name=MyService/service /application uses-sdk android:minSdkVersion=3 / /manifest When I run it in either the emulator or on my phone, I get this log: 07-30 10:56:52.676: INFO/main(1686): retrieving services: 07-30 10:56:52.686: INFO/main(1686): declared service: test.another.MyService 07-30 10:56:52.686: INFO/main(1686): package name: test.another 07-30 10:56:52.696: INFO/main(1686): enabled: true 07-30 10:56:52.696: INFO/main(1686): exported: false 07-30 10:56:52.696: INFO/ActivityManager(56): Starting activity: Intent { comp={test.another/test.another.MyService} } 07-30 10:56:52.716: DEBUG/AndroidRuntime(1686): Shutting down VM 07-30 10:56:52.716: WARN/dalvikvm(1686): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 07-30 10:56:52.716: ERROR/AndroidRuntime(1686): Uncaught handler: thread main exiting due to uncaught exception 07-30 10:56:52.746: DEBUG/dalvikvm(1622): GC freed 5960 objects / 376680 bytes in 423ms 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): java.lang.RuntimeException: Unable to start activity ComponentInfo {test.another/test.another.Main}: android.content.ActivityNotFoundException: Unable to find explicit activity class {test.another/test.another.MyService}; have you declared this activity in your AndroidManifest.xml? 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2268) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.os.Handler.dispatchMessage(Handler.java:99) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.os.Looper.loop(Looper.java:123) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-30 10:56:52.746: ERROR/AndroidRuntime(1686): at java.lang.reflect.Method.invokeNative(Native Method) 07-30
[android-developers] Re: Android Market broken? Can't see the new release of my app in the Android Market?!
Thanks Jon, Michael On Feb 17, 2:54 pm, Jon Colverson jjc1...@gmail.com wrote: On Feb 17, 6:06 pm, kolby kolbys...@gmail.com wrote: Is there a discussion group for market related problems? http://www.google.com/support/forum/p/Android+Market/thread?tid=38bb8... -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Mark, thanks for the tip on the URI encoding of the data for loadData. It worked like a charm. Apparently, I'm not the only one with this problem though. API documentation would go along way. 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: How to force MediaStore to rescan the SD card
You can make an android.media.MediaScannerConnection, connect to it, and provide a client to scan a directory. Michael On Feb 14, 7:05 am, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: If I progammatically store new media files on the SD card, the MediaStore does not know about them until I remove and reinsert the SD card. Is there a way to tell the MediaStore to rescan the SD card without first unmounting the SD card? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Apparently the problem was not documentation, but my lack of understanding of the data: scheme. My bad, Michael On Feb 14, 10:08 am, Fred Grott(shareme) fred.gr...@gmail.com wrote: Kolby, Someone just updated javadocs for webview and etc in source..its in code review.. I found a lot of more answers ot webview question i had..hold on link is http://review.source.android.com/Gerrit#patch,sidebyside,8267,1,core/... On Feb 14, 7:55 am, kolby kolbys...@gmail.com wrote: Mark, thanks for the tip on the URI encoding of the data for loadData. It worked like a charm. Apparently, I'm not the only one with this problem though. API documentation would go along way. 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: Restricting number of items AutoCompleteTextView displays.
Lewis, the source for the AutoCompleteTextView is available, make your own class with a limit on the popup size. I'm doing that in my app. It's quite a nuisance to not being able to restrict the popup. Michael On Feb 14, 9:04 pm, Lewis lewisandrewba...@googlemail.com wrote: I have an AutoCompleteTextView working correctly. I want to limit the amount of items which show in the drop down menu which appears (in order to stop the menu appearing over other screen items). I cannot find the attribute I have to change for this anywhere. My AutoCompleteTextView is bound to a custom TextView defined as follows: drop.xml ?xml version=1.0 encoding=UTF-8? TextView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/text1 style=android:R.style.Widget_ListView_DropDown android:paddingTop=2dip android:paddingBottom=3dip android:textColor=#000 android:layout_width=fill_parent android:layout_height=wrap_content / ArrayAdapterString adapter = new ArrayAdapterString(this, R.layout.drop, CONTACTS); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Some bugs of WebView
Interestingly enough, whilke it might work when browsing to a web page, it doesn't when you deliver the content by calling loadData on the WebView object. It gives the error: 02-11 14:04:00.802: DEBUG/skia(7323): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x 0x%02x on the LogCat. Michael On Feb 11, 1:45 pm, Mark Murphy mmur...@commonsware.com wrote: yhfudev wrote: I don't know where to put the bug report of APIs. http://b.android.com 1) could not handle the color values When I use the HTML code: font color=#00FF00/font the WebView could not handle this type of tags. But font color=red/font can work well. This bug exist both in SDK1.0 SDK1.1 This works fine on the G1. Visit the following page in the Android Browser application: http://commonsware.com/misc/scrap.html -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Some bugs of WebView
Tried it again, and in loadData it doesn't work with or without the quotes. However, this worked: htmlhead/headbodysome text font color=rgb(0,255,0)some text/ font/body/html Michael On Feb 11, 2:06 pm, kolby kolbys...@gmail.com wrote: Interestingly enough, whilke it might work when browsing to a web page, it doesn't when you deliver the content by calling loadData on the WebView object. It gives the error: 02-11 14:04:00.802: DEBUG/skia(7323): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x 0x%02x on the LogCat. Michael On Feb 11, 1:45 pm, Mark Murphy mmur...@commonsware.com wrote: yhfudev wrote: I don't know where to put the bug report of APIs. http://b.android.com 1) could not handle the color values When I use the HTML code: font color=#00FF00/font the WebView could not handle this type of tags. But font color=red/font can work well. This bug exist both in SDK1.0 SDK1.1 This works fine on the G1. Visit the following page in the Android Browser application: http://commonsware.com/misc/scrap.html -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Some bugs of WebView
Mark, unfortunately, no dice on this either. Still doesn't accept the color setting in hex. Michael On Feb 11, 2:55 pm, Mark Murphy mmur...@commonsware.com wrote: kolby wrote: Interestingly enough, whilke it might work when browsing to a web page, it doesn't when you deliver the content by calling loadData on the WebView object. It gives the error: 02-11 14:04:00.802: DEBUG/skia(7323): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x 0x%02x on the LogCat. AFAIAC, never ever ever ever use loadData(). Always use loadDataWithBaseURL(). If need be, supply a fake base URL (e.g., fake:///will/the/core/Android/team/admit/this/is/stupid). A variety of mysterious behaviors of loadData() all of a sudden start working sensibly when you use loadDataWithBaseURL(), even with the bogus base URL. Whether that will clear up this specific problem, I can't say, but I'd start there. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Some bugs of WebView
Hmmm, String test = htmlhead/headbodysome text font color= \#00ff00\in green/font/body/html; web.loadDataWithBaseURL(data:///some/text/,test, text/html, utf-8, ); only gives me some text and nothing in green. Saving to a file just to make the html parser work seems excessive for a dynamic web app. Michael On Feb 11, 3:14 pm, Mark Murphy mmur...@commonsware.com wrote: kolby wrote: Mark, unfortunately, no dice on this either. Still doesn't accept the color setting in hex. public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); browser=(WebView)findViewById(R.id.webkit); browser.getSettings().setJavaScriptEnabled(true); browser.loadUrl(file:///android_asset/geoweb1.html); } With the file in question containing: font color=#00FF00You are at/font Works absolutely fine for me on 1.0r2 and the G1. The text indicated shows up in green, as expected. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: WebView responding to touch events
Mark, I'm not sure it would work, but have you tried to just setFocusableInTouchMode(true) on the WebView object? Seems a lot easier than messing with the touch handler. Michael On Feb 7, 3:45 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: Sergey, I ended up doing basically what you posted but only for the ACTION_DOWN as that seemed to handle it. Fred, I tried adding an OnClickListener but never got any callbacks. I assume that the WebView is designed to handle this internally and expects you to use the WebViewClient.shouldOverrideUrlLoading() to respond to the clicks. As to whether it happens in the emulator I am not sure. I learned a long time ago with WM not to trust emulators so I only debug on-device... Thanks for the comments guys! Mark On Feb 7, 11:28 am, Sergey Ten sergeyte...@gmail.com wrote: Mark, I think I had this problem myself and could solve it by using the following code: webView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_UP: if (!v.hasFocus()) { v.requestFocus(); } break; } return false; } }); Hope this would help, Sergey On Sat, Feb 7, 2009 at 12:07 AM, Mariano Kamp mariano.k...@gmail.comwrote: Mark, maybe you should post some code? On Thu, Feb 5, 2009 at 4:36 PM, Mark Nuetzmann mark.nuetzm...@gmail.comwrote: I have an Activity that has a WebView that contains some simple html that allows me to display a Terms Conditions link that if touched or clicked calls another activity. My problem is unless the link in the WebView has focus (ie, the text is wrapped with that little orange focus) I cannot touch the link and have it work. If any other view on the activity has focus, touching the WebView with the link does nothing. The other Views that had focus loose focus, but the WebView does not receive focus. I have tried calling setFocusable(true) and setFocusableInTouchMode(true) but that does not do any good... I would really like to know what you have to do to get a WebView to respond to touch events without using the trackball to scroll to the view before touching it. thank you, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: WebView responding to touch events
Sorry, obviously you have. Nevermind. Michael On Feb 7, 8:48 pm, kolby kolbys...@gmail.com wrote: Mark, I'm not sure it would work, but have you tried to just setFocusableInTouchMode(true) on the WebView object? Seems a lot easier than messing with the touch handler. Michael On Feb 7, 3:45 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: Sergey, I ended up doing basically what you posted but only for the ACTION_DOWN as that seemed to handle it. Fred, I tried adding an OnClickListener but never got any callbacks. I assume that the WebView is designed to handle this internally and expects you to use the WebViewClient.shouldOverrideUrlLoading() to respond to the clicks. As to whether it happens in the emulator I am not sure. I learned a long time ago with WM not to trust emulators so I only debug on-device... Thanks for the comments guys! Mark On Feb 7, 11:28 am, Sergey Ten sergeyte...@gmail.com wrote: Mark, I think I had this problem myself and could solve it by using the following code: webView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_UP: if (!v.hasFocus()) { v.requestFocus(); } break; } return false; } }); Hope this would help, Sergey On Sat, Feb 7, 2009 at 12:07 AM, Mariano Kamp mariano.k...@gmail.comwrote: Mark, maybe you should post some code? On Thu, Feb 5, 2009 at 4:36 PM, Mark Nuetzmann mark.nuetzm...@gmail.comwrote: I have an Activity that has a WebView that contains some simple html that allows me to display a Terms Conditions link that if touched or clicked calls another activity. My problem is unless the link in the WebView has focus (ie, the text is wrapped with that little orange focus) I cannot touch the link and have it work. If any other view on the activity has focus, touching the WebView with the link does nothing. The other Views that had focus loose focus, but the WebView does not receive focus. I have tried calling setFocusable(true) and setFocusableInTouchMode(true) but that does not do any good... I would really like to know what you have to do to get a WebView to respond to touch events without using the trackball to scroll to the view before touching it. thank you, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Reg playing youtube video in android
Here is the sample code to launch the view intent: Uri uri = Uri.parse(url); // check if others handle this url Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.addCategory(Intent.CATEGORY_BROWSABLE); try { if (startActivityIfNeeded(intent, -1)) { // success } } catch (ActivityNotFoundException ex) { // fail } The rtsp link doesn't seem to be recognized by anything on the emulator. 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: Reg playing youtube video in android
Dave, you can play youtube video by launching a View intent with the youtube video page url right now on the device (no cupcake or developer key required). It will launch the youtube player. The problem is, it doesn't work in the emulator, since there's no youtube app. Michael On Jan 28, 3:37 pm, Dave Sparks davidspa...@android.com wrote: If you specifically want to play a YouTube video, you need to register as a YouTube developer to get the keys you need to access the Gdata feeds. I think that the Cupcake release will support a new intent for playing YouTube videos with the YouTube app, but it will be some time before that feature makes it into an SDK or actual device. That would remove the need for getting the developer keys. Aside from that, playing a YT video is no different than any other HTTP streamed video. You just pass the URL through setDataSource and the media player does the rest. On Jan 28, 1:42 am, harish harishpres...@gmail.com wrote: Dear All, Using Mediaplayer (Api Demo) example, i was able to play a local video file and also an video mp4 streamed over internet on my android emulator using sdk in my development machine. When i run an youtube video from browser running in an emulator, it asks for to download flash player. Is there any way to play youtube video using mediaplayer or any other alternative methods in android. In emulator session, is it possile to play youtube video. Guys, help me in this. any reference or example of youtube video being played in the emulator using sdk is available. Thanks and Regards, HarishKumar.V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: exit button - or not?
I have a lot of my users complain about my app being unresponsive, which turns out to be a consequence of my app relying on the OS to take care of resource management. As stated above, the android mechanism works fine, if you're willing to accept that clearing out other applications won't affect your own application. Unfortunately though, it does. And my application gets the blame although it had nothing to do with it. So I guess my question would be, is there something my app can do to make room for the resources it needs at startup without slowing it down too much? 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: exit button - or not?
More specific? Ehhhm, well, resources shared with other apps are processor time and memory. My app is Steel, a web browser. If I run my app, without anything else (I can easily check the DDMS log to see what's going on), It loads fast and fine, the on screen keyboard is very repsonsive etc. Resources required are memory for one or more WebView objects and processor time for rendering/event handling (what others are there that I share with the other apps?) If I had used other resource heavy apps before launching Steel (like the other browser or maps), the UI is sluggish, pages take longer to render, and event handling in the virtual keyboard is delayed. Until they finally get cleared out, which can take some time. And the OS developers are telling me that I should let the OS take care of exiting the application/resource management. Which is fine, but then I'd rather not see my application suffer from a bad design choice in the OS (a little harsh, but you get my point). Until that changes, all I can do is tell my users that it's not my fault (although the only thing they see is my app), and that it is supposed to be that way. Michael On Jan 28, 10:29 am, Mark Murphy mmur...@commonsware.com wrote: kolby wrote: I have a lot of my users complain about my app being unresponsive, which turns out to be a consequence of my app relying on the OS to take care of resource management. Could you be more specific? So I guess my question would be, is there something my app can do to make room for the resources it needs at startup without slowing it down too much? That would depend a bit on what the resources it needs at startup are. Can you give us more details? -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 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: exit button - or not?
On Jan 28, 11:08 am, Mark Murphy mmur...@commonsware.com wrote: kolby wrote: My app is Steel, a web browser. Ah, sorry, didn't make the connection. No reason to be sorry, I didn't mention it before ;) If I had used other resource heavy apps before launching Steel (like the other browser or maps), the UI is sluggish, pages take longer to render, and event handling in the virtual keyboard is delayed. Until they finally get cleared out, which can take some time. 1. How long is some time? Anecdotal evidence suggests for the first few ( 5 mins). I have too many other things to debug still, so this hasn't been one of my priorities yet, but it has been to some of my users according to feedback. 2. Are you pre-allocating a lot of stuff as Steel opens, or is the sluggishness mostly triggered by user actions once your activity is up? In other words, are the complaints stemming more from the initial launch, or more from attempts to click/pan/type and otherwise use Steel once opened? The sluggishness is most noticeable in the virtual keyboard, where visual feedback/response time is critical. This is typically used at the beginning to enter a web address. But also, page rendering times are longer. If a page gets loaded at startup depends on the user's preferences. 3. Can you detect that this situation is occurring to your code in real time? In other words, while you as a human can recognize sluggishness just as a matter of course, is there a way you can put enough internal profiling in Steel such that *Steel* realizes hey, things are going slower than normal? As stated above, I have not had the time to analyze it in more detail yet. Based on these answers, I can help you brainstorm ways for Steel to perhaps require resources more gracefully at startup and help manage user expectations for everything else that can't be otherwise dealt with. Between opening at least one WebView and potentially showing a virtual keyboard, there's really very little in terms of managing user expectations. I know that the VKeyboard code could still be optimized, and I wasn't trying to discuss Steel's particular needs here, I was just chiming in on the issue of letting the OS manage resources vs. applications exiting properly. After all, the Android OS model is not significantly different than the pagefile/swapfile approach used by other OSes, at least in terms of the perceived impact upon a newly-opening application. Use the same techniques in Android as you would in, say, Windows for dealing with the case where your application needs to do work on startup and the user might have a bunch of other applications open. The windows analogy is not 100% working for me here, because I believe in Android everything is in memory, we're not trying to access a hard drive, and even then, freeing room in a pagefile is much less resource intensive, than actually closing other applications based on demand, with callbacks to allow those apps to clean up, and having a garbage collector run in a java environment. All this while my poor app is trying to look good ;) Sometimes a user really does know when she wants to close an app and not use it again for a while, but Android is denying them the decision. Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: exit button - or not?
I apologize if I have hit the wrong tone, originally this thread caught my eye, because it is an issue that any app has. I was hoping to find some secret trick to tell the OS via a published, but well hidden API (not saying anything here), that my app needs some resources asap and speed up the process a little. I do agree that making the app feel responsive at start-up is the way to go, but then again, I would like to know, if there's a way to find out via an API, how bad the situation really is, so the app could decide what best to do. Maybe this should all be in a different thread, or in a different group, but I'm not tinkering with the OS. And so far, I have been enjoying the discussion. Again, sorry if it came across differently, it was not my intention. I tend to overuse sarcasm at times. 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: How to play youtube videos in an Android application?
The emulator doesn't provide you with the YouTube application (I don't know about the developer phone), so the above only works on the actual device. Michael On Jan 20, 11:40 pm, RTM r.thirumurth...@gmail.com wrote: Thanks Michael for the reply. Can I also run the YouTube video with the SDK?. Regards On Jan 20, 11:06 pm, kolby kolbys...@gmail.com wrote: You can send a VIEW intent with the video uri. TheYouTubeappon the G1 should pick it up. Michael On Jan 20, 11:31 am, RTM r.thirumurth...@gmail.com wrote: Hi, Are you able to run theYouTubevideo with an Android Application?. I guess due to lack of Flash support in Android browser, we are not able to playYouTubevideos. Is there any way we can overcome this? Regards On Dec 3 2008, 9:37 pm, Dipin dipinpoovat...@gmail.com wrote: Is there any way to play ayoutubevideo in an Android application? Using MediaPlayer or VideoView can we play ayoutubevideo? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 navigate from HOME back to a paued Task?
I'm not sure I completely understand what you're trying to do. If the user pauses an activity by pressing the home button, you shouldn't bring the application to the foreground again. The user can just press the application icon in the launcher and the app will be brought to the foreground again (going through the usual lifecycle callbacks so you get a chance to restore state, depending on how your app is configured). If you have an application that does something in the background, reacts to an event, and then wants to be in the foreground again, you should consider splitting your application into two parts, the background task as a service, and the UI as an application. Based on an event in the service launch the UI app as an intent. Michael On Jan 21, 6:30 am, mongd mongdl...@gmail.com wrote: How can I write a code for that behavior? I want to bring back the activity without clicking HOME button. On 1월21일, 오후7시56분, deepdr...@googlemail.com deepdr...@googlemail.com wrote: a long click on the home button brings a popup that lets you choose to switch to a different one of the running applications. On 21 Jan., 10:20, mongd mongdl...@gmail.com wrote: Hi, I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to play youtube videos in an Android application?
You can send a VIEW intent with the video uri. The YouTube app on the G1 should pick it up. Michael On Jan 20, 11:31 am, RTM r.thirumurth...@gmail.com wrote: Hi, Are you able to run the YouTube video with an Android Application?. I guess due to lack of Flash support in Android browser, we are not able to play YouTube videos. Is there any way we can overcome this? Regards On Dec 3 2008, 9:37 pm, Dipin dipinpoovat...@gmail.com wrote: Is there any way to play ayoutubevideo in an Android application? Using MediaPlayer or VideoView can we play ayoutubevideo? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Clearing the WebView cache
Nick, I don't understand why you would want to clear the cache on a per page basis. Usually I would do it on exiting the application. Also, if you're generally not interested in caching, wouldn't it be better to disable caching in your app, or per page: // turn caching off webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); and use LOAD_CACHE_NORMAL for default behavior. 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: TableLayout - Flip problem =/
Are you handling the change in orientation yourself (via onConfigurationChanged) or via a restart (onCreate) ? Michael On Jan 17, 7:27 am, Chaoz1336 stoffe...@gmail.com wrote: Hey guys here's my graphic... look at those 4 pics... (from left to right, up to down) http://codemax.de/upl/android_prob.jpg 1st - start situation, vertical 2nd - flipped, horizontal 3rd - start situation with text, vertical 4th - flipped 3rd to horicontal and then vertical again -- prob: editText doesnt break content anymore, right side isnt reachable thx in advance! :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: hiding the title bar
Try this, works for me, hiding (called on Activity): getWindow().addFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN); showing (called on Activity): getWindow().clearFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN); Michael On Jan 19, 3:19 pm, Dianne Hackborn hack...@android.com wrote: Unfortunately you can't currently hide and show the status bar dynamically. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: HoriztonalSlider - Indicator type thingy-ma-bob?
Doesn't the SeekBar implement what you want already? Including the thingy-ma-bob, aka the draggable thumb? Michael On Nov 14, 12:46 pm, g1bb [EMAIL PROTECTED] wrote: Could be attribute 'scrollbarAlwaysDrawHorizontalTrack' Will give it a shot tonight. On Nov 14, 9:31 am, g1bb [EMAIL PROTECTED] wrote: Hello, Sorry for my lack of technical terminology when referring to this, but I can't figure out what it's called! I've built a custom view for a horizontal slider as described in the following URL:http://www.helloandroid.com/node/250 This works great, but I'd like to show the user an actual 'indicator' of where they're pressing. For example, when you change the screen's brightness level, you get a nice little handle to grab on to. What is this thing called, and how can I implement it into this view? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---