[android-developers] Writting/Reading Sync settings - Possible?
Hello. I have seen several applications in the market that enable you to toggle your sync settings. (for example ToggleSettings) How is this done? I have found the permissions to read and write the sync settings but I don't really know how to to that. Could someone drop me an example how to change the sync settings? This would be really nice. I'm looking forward reading your responses. Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Eclipse File Explorer doesn't work on G1
in fact is supposed to be like that, this prevents an app to access data from another... even the user is different, if you wanna do such dir navigation and/or install apps you should use adb, something like... 1 - adb shell (connect to your device) 2 - su - (become super user on the shell) 3 - now you can do whatever you want... cheers, rafa On Jan 11, 1:50 am, blake blake.me...@gmail.com wrote: I'm, at long last, working with a real phone, instead of just the emulator. I've noticed that the Eclipse File Explorer doesn't seem to be able to actually explore files on the G1. It shows three top level directories: data (empty), sdcard, and system. If I use adb, I can see that data does, in fact, have stuff in it. I can't install apps with the File Explorer either. I can with adb. They go into the data folder (which the Explorer still thinks is empty) Anybody else see this? Better yet, anybody know how to fix it? Thanks, -blake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Need help with local file Urls in the browser
Hey Fred, I assume you are talking about static content that you deliver with your application? I am looking for a solution to display a html page that I downloaded from the net when the net is available and display when the net is no longer available and this should include all the references assets. Cheers, Mariano On Sun, Jan 11, 2009 at 4:08 AM, Fred Grott(shareme) fred.gr...@gmail.comwrote: no..my html files n my apk are referenced as href=file:///android_asset/filename.html image use the same base url On Jan 10, 2:05 pm, Mariano Kamp mariano.k...@gmail.com wrote: Hi, let's say I write content onto the local filesystem using Context.openFileOutput(). For the sake of this example one file IS index.html and one IS image.png. The former references the latter in the html code. How can I get the browser to display the content? I tried many different ways and failed so far. I can't just use the url: file:///data/data/com.myapp/files/index.html . The browser just says Web page not available. Also when loading the content of the index.html file directly, it does not show the image. Like this: contentWebView.loadDataWithBaseURL(file:///data/data/com.myapp/files/index.html , htmlHello, World!img src=\image.png\//html, text/html, utf-8, null); I wrote the content with Context.MODE_WORLD_READABLE. Any ideas? I read somewhere that I should provide a WebClient and override shouldOverrideUrlLoading for whatever reason. But that doesn't work at all for me. This method is never called (android-sdk- mac_x86-1.0_r2). I guess I can try to ask the user to turn off shared access for the sdcard and use that, but that's really not what I want. In a pinch though ... any ideas? Also when using Context.openFileInput/Output I can't use folders, right? Any ideas if the file system slows down when I have a thousand small files there? Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Change linear layout programmatically - problem
Works now. Thanks public class BBB extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bbb); LinearLayout layout = (LinearLayout)findViewById(R.id.layoutInputs2); *LinearLayout*.LayoutParams params = new *LinearLayout*.LayoutParams(* LinearLayout*.LayoutParams.FILL_PARENT, *LinearLayout* .LayoutParams.FILL_PARENT); layout.setLayoutParams(params); } } LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/layoutInputs1 LinearLayout android:layout_width=fill_parent android:orientation=horizontal android:id=@+id/layoutInputs2 android:layout_height=wrap_content /LinearLayout /LinearLayout On Sun, Jan 11, 2009 at 5:16 AM, Romain Guy romain...@google.com wrote: In this case you to use FrameLayout.LayoutParams. Note that having a FrameLayout as the parent of your content view is not guaranteed and could very well change across implementations and/or versions. On Jan 10, 2009 5:49 PM, hmmm akul...@mail.ru wrote: I've tried but the same result. Now in DDMS log I have: java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams - Original Message - From: Peli peli0...@googlemail.com To: Android Developers an... Sent: Sunday, January 11, 2009 3:39 AM Subject: [android-developers] Re: Change linear layout progra... There's this suspicious line: java.lang.ClassCastException: android.view.ViewGroup$LayoutParams Hav... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 it possible to replace or extend the dialer application ?
Hi, How about an option to assign pressing the PHONE button to launch my app ? (when there are no pending incoming calls) TIA On Jan 10, 2:35 am, Dianne Hackborn hack...@android.com wrote: It would be nice to have a way to replace the incoming call screen or other parts of the incoming call handling, but it is pretty non-trivial to do. I am not aware of any current work going on to do this. You can have a look at the source and see what is involved. On Fri, Jan 9, 2009 at 3:39 PM, Brad Fuller bradallenful...@gmail.comwrote: Thanks Dianne, Then perhaps there are ways to implement partial events for incoming calls. When an incoming call is detected, I imagine that there are several separate events. For example: get the number of the incoming call; see if it's in the contact list; display the onscreen graphic of an incoming with the phone number and the contact name, call the ringtone manager: etc. Then, when the phone is off-hook, display Call in progess text.. etc. I assume that these are separate classes. So, could one display their own incoming call graphic? Or replace the RingTone manager (not the ringtone, like ExtendedRings does), etc? Or are they not separate classes or all private? Does that make sense? On Fri, Jan 9, 2009 at 2:56 PM, Dianne Hackborn hack...@android.com wrote: Currently you can intercept outgoing calls and replace that with your own behavior, but we don't yet have a way to intercept incoming calls. The issue of built-in apps using internal APIs is kind-of a red-herring. Yes, in the case of the phone UI, there are a bunch of APIs that you need to be able to implement something like your own in-call screen... however the fact that they are internal is not really the issue: we could expose them, but it still wouldn't work because the current implementation of them requires that you actually be running in the same process as the telephony subsystem, so they just can't be used by other apps. For the most part, we make APIs private because they are not yet something we can maintain in the future platform are even able to be used successfully by applications. Not out of some malicious goal to make sure nobody else can make their own whatever UI. Outside of the phone system, for the most part the platform applications use private APIs because we didn't have time to clean all of the apps up as we were evolving the official SDK into something that we could support in the long term. We would love to accept patches that fix these APIs to switch to the public APIs. On Fri, Jan 9, 2009 at 1:07 PM, Brad Fuller bradallenful...@gmail.com wrote: On Fri, Jan 9, 2009 at 1:02 PM, moazzamk moazz...@gmail.com wrote: I don't know what you mean by replace with your own code but you can setup a receiver in your app which is called when a call is received. I remember reading about it in the documentation (if I remember correctly). What I mean is that instead of the default process that happens when an incoming call is detected, another process is called. -- Brad Fuller -- 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. 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: the Trackball and MotionEvents
Dianne! Brilliant answer! Thank you very much! Pressing my luck, where does that translation happen? RootView? Activity? Many thanks! -blake On Jan 10, 6:23 pm, Dianne Hackborn hack...@android.com wrote: The framework translates raw trackball events into DPAD events if nobody consumes the trackball event. At this time Android only supports devices that have a touch screen. The trackball is optional, and can be replaced by a DPAD. On Sat, Jan 10, 2009 at 5:21 PM, blake blake.me...@gmail.com wrote: ... it appears that I was mistaken. Both trackball movement and screen taps generate MotionEvents. They are delivered completely differently, though Trackball events through dispatchTrackballEvent, and touch events through dispatchTouchEvent. I remain mystified by how the trackball is handled. It begins to look as if it generates MotionEvents exactly as the touch screen does. Presumably, clicking it generates a KEYCODE_DPAD_CENTER event. How do you generate a KEYCODE_DPAD_UP on, e.g., a G1? -blake On Jan 10, 4:40 pm, blake blake.me...@gmail.com wrote: I notice that TrackballEvents are different that MotionEvents, and it makes me wonder what happens on a device that does not support a touch screen. Suppose I have an Etch-a-Sketch application, that allows me to do crude drawings on my screen. With the G1 phone, I just watch for MotionEvents and draw them. Can anyone confirm (or deny) that, on a device that doesn't have a touch screen, my application will not work? Or, possibly, might trackball events appear as MotionEvents, on such a device. -blake -- 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. 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: Eclipse File Explorer doesn't work on G1
Umm... Eclipse *does* use adb. Perhaps the Eclipse plugin doesn't su? Perhaps that works talking to the emulator, but not when talking to an actual device? I think it is probably a bug. -blake On Jan 11, 12:23 am, Rafael Fernandes luizraf...@gmail.com wrote: in fact is supposed to be like that, this prevents an app to access data from another... even the user is different, if you wanna do such dir navigation and/or install apps you should use adb, something like... 1 - adb shell (connect to your device) 2 - su - (become super user on the shell) 3 - now you can do whatever you want... cheers, rafa On Jan 11, 1:50 am, blake blake.me...@gmail.com wrote: I'm, at long last, working with a real phone, instead of just the emulator. I've noticed that the Eclipse File Explorer doesn't seem to be able to actually explore files on the G1. It shows three top level directories: data (empty), sdcard, and system. If I use adb, I can see that data does, in fact, have stuff in it. I can't install apps with the File Explorer either. I can with adb. They go into the data folder (which the Explorer still thinks is empty) Anybody else see this? Better yet, anybody know how to fix it? Thanks, -blake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Low on space
Thanks for the response, but Package installer's usage is 0b :( The biggest app is Browser. Its Data size is reported to be 3MB but I'd expect that the device memory is at least 128 MB and of it ~70 are usable. Now, on top of the brand new device I've put no more than 5 MBs of apps, and I have 7MB left, what does it mean, that a brand new phone has 12 MB of memory??? Anyone has any ideas what else could I check? Thanks! Stoyan On Sun, Jan 11, 2009 at 3:36 AM, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: Go to Settings - Applications - Manage Applications Use the hardware Menu button and Sort By Size. Near the top you will probably find Package Installer. If it is large, choose it and then Clear Data I had this problem too, until I figured it out. On Jan 10, 3:43 pm, Stoyan Damov stoyan.da...@gmail.com wrote: Hi guys, I own a G1 and am using it for development. I have the phone for about a month now and today I got this notification Low on space with the message Phone storage space is getting low. I only have a few programs installed and these take about 4MB. I've deleted the browser's cache, and can't figure out why the storage has become so low. I only got 7MB free!!! (btw out of how much?!!? I can see how much free space I got but out of how much, how can I find out?) My guess is that it might be something related to the fact that I upload my own app pretty often to the device to debug it and it might have generated some error logs or something. I don't have a clue. Please, help! :) Cheers, Stoyan P.S. For those who read both the beginners and devs lists, sorry for the cross post, I'm getting desperate! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] HELP! (was Re: Low on space)
Guys, Does anyone know what's the *FREE* internal memory initially when you get the phone? I've heard ~70MB, ~96MB, etc. Apparently not for me, it appears that I have 9MB! :O :O :O This is getting ridiculous, I've cleared the browser's cache and got 2MB back, I have only *ONE* application installed which takes 2MB and I have just 7MB of free memory. According to HTC's spec[1], G1 has 256 MB ROM, let's say 1/2 is used by the OS. Where TF is the rest? :( @Google employees: WTF was the developer of the Settings/SD card and phone storage preference screen thinking??? I can see I have X MBs of free memory, but out of HOW MUCH? How much of HOW MUCH has been used by the OS and how much by the apps installed on it? I *am* now desperate, I've read so much insane posts on the net such as unplug and replug your battery, I got 20 MBs back, probably a leak and not ONE solution. This is serious, if I got to this situation there's a possibility that other users will hit that too, and these won't be developers. I *SO* regret installing the over-the-air patch, which removed root access :((( Stoyan [1] http://www.htc.com/www/product/g1/specification.html On Sun, Jan 11, 2009 at 12:44 PM, Stoyan Damov stoyan.da...@gmail.com wrote: Thanks for the response, but Package installer's usage is 0b :( The biggest app is Browser. Its Data size is reported to be 3MB but I'd expect that the device memory is at least 128 MB and of it ~70 are usable. Now, on top of the brand new device I've put no more than 5 MBs of apps, and I have 7MB left, what does it mean, that a brand new phone has 12 MB of memory??? Anyone has any ideas what else could I check? Thanks! Stoyan On Sun, Jan 11, 2009 at 3:36 AM, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: Go to Settings - Applications - Manage Applications Use the hardware Menu button and Sort By Size. Near the top you will probably find Package Installer. If it is large, choose it and then Clear Data I had this problem too, until I figured it out. On Jan 10, 3:43 pm, Stoyan Damov stoyan.da...@gmail.com wrote: Hi guys, I own a G1 and am using it for development. I have the phone for about a month now and today I got this notification Low on space with the message Phone storage space is getting low. I only have a few programs installed and these take about 4MB. I've deleted the browser's cache, and can't figure out why the storage has become so low. I only got 7MB free!!! (btw out of how much?!!? I can see how much free space I got but out of how much, how can I find out?) My guess is that it might be something related to the fact that I upload my own app pretty often to the device to debug it and it might have generated some error logs or something. I don't have a clue. Please, help! :) Cheers, Stoyan P.S. For those who read both the beginners and devs lists, sorry for the cross post, I'm getting desperate! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Emulator crashs when accessing sd card settings
Hi, when I open the settings screen in the emulator it crashs ... This happens no matter if I start the emulator with my own image using -sdcard or without this switch. I wiped the user data. Anything else I can reset? Anybody else experiencing it? Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] WebView/Browser: How to browse files from the sdcard?
Hi, I am trying to browse files from the sd card, but haven't had any success so far. Maybe I am doing something wrong, so I'd like to write down the steps for your feedback. The sample contains of an html file that references a png. (1) localhost:~ mkamp$ cat test.html html pHello World!img src=test.png/p /html (2) I transfer the two files to the sdcard like this: localhost:~ mkamp$ adb push test.html /sdcard/. 10 KB/s (57 bytes in 0.005s) localhost:~ mkamp$ adb push test.png /sdcard/. 709 KB/s (3180 bytes in 0.004s) (3) To check if they are there I get them back and compare the version I pulled back with the version I pushed doing the following: localhost:~ mkamp$ adb pull /sdcard/test.png test2.png 829 KB/s (3180 bytes in 0.003s) localhost:~ mkamp$ adb pull /sdcard/test.html test2.html 0 KB/s (57 bytes in 0.110s) localhost:~ mkamp$ diff test.html test2.html localhost:~ mkamp$ md5 test.png test2.png MD5 (test.png) = 49cde2f11086e4ebcb1aff45deaae750 MD5 (test2.png) = 49cde2f11086e4ebcb1aff45deaae750 So life should be good, right? (4) Well, when trying to browse those files in the Android browser with the url file:///sdcard/test.html I get Web page not available. The Web page at file:///scard/test.html could not be loaded as: The requested file was not found. (5) The system logs shows: E/browser ( 239): onReceivedError code:-13 The requested file was not found. D/browser ( 239): updating cursor I feel really stupid failing at something so simple, but I just don't see what I am missing. Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Full multitouch working on the G1, new approach (video + source)
I have multitouch working on the G1 in a way that is backwards- compatible with single-touch applications. I capture the multitouch events and then hijack an unused field in MotionEvent to pass the multitouch events in a way that only affects programs that have been designed to work in multitouch mode -- i.e. this did not require re- plumbing the event system. The approach also does not require any kernel modifications, it just needs modifications to one Java system class. Video and full source here: http://lukehutch.wordpress.com/android-stuff/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 stop the device from sleeping
Hi, I released a Hypnotic Spiral demo on the market yesterday. One of the most requested features from the comments I've received is to stop the phone from sleeping after a few minutes of no use. Is there a way to deep the phone awake while my activity is running? Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Multiple alarms - Intent aims at the same service but different values - Not possible?
Hello. At the moment I'm trying to register/set two alarms that open up a background service. Both alarms should open up the same service doing something depending on the extras that come with the intent. (the alarms have different startup and interval values) Why can't I do that. I get only one alarm registered. Do I really have to implement two services (which do nearly the same) for that to work? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Port my iPhone game
Ok thanks guys, I've got a few options to consider now: i. do not release Android port ii. manually rewrite in Java iii. use auto conversion software for c++ - Java iv. contract out to get the port written I have also contacted regarding iii and iv so I'll have a think about it and see what happens. The those of you that asked about what the iPhone project is, more details can be found over at: http://www.kamicrazy.com/ I didn't bother mentioning it initially in case it came accross that I was just drying to drum up publicity and so forth, I only really mentioned it to give some sort of indication of the level of project I'm working on (e.g. not just a simple few hundred line application that can be ported trivially). Best regards, Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] SQLite in WebView, is it possible??
As some of you know I am pioneering doing a Loopt clone using web based code including app logic wrapped with the PhoneGap native libs and a webview class so that it can run on both Android and iPhone with the same web based code including the app logic code. IPhone demo videos should be up at here between now and Friday: http://www.youtube.com/user/memine44 My question is is there any way to access SQLite via webview as the bits and straps I was able to get indicate maybe not that I would have to write a native class and than hook PhoneGap js api into that.. If its not is that a security restriction like the other security restrictions and or differences between webkit browser on Android and webkit webview on Android??. If only seed capital searching was as easy as it is to program on Android..:) Thanks ofr any information you can provide. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SQLite in WebView, is it possible??
My question is is there any way to access SQLite via webview as the bits and straps I was able to get indicate maybe not that I would have to write a native class and than hook PhoneGap js api into that.. If by native class you mean Java then, yes, you would need to expose relevant APIs via addJavaScriptInterface() to WebView, probably via an extension to PhoneGap. -- 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: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads
I'm still seeing this problem as well. I can boot my phone, start my app, load a single image (~300k) and have this error. I'm loading images with the BitmapFactory.decodeByteArray() method, which calls BitmapFactory.nativeDecodeByteArray(). What is interesting is that after I added a background thread to my app to load and process images, I had a bug where changing the orientation of the screen caused another thread to be started. As soon as two of my threads were in BitmapFactory.nativeDecodeByteArray() at the same time, this method would attempt to allocate over 6MB of memory, and I would get the error. E/dalvikvm-heap( 1204): 6291456-byte external allocation too large for this process. E/( 1204): VM won't let us allocate 6291456 bytes D/skia( 1204): allocPixelRef failed W/dalvikvm( 1204): threadid=15: thread exiting with uncaught exception (group=0x40013e28) E/AndroidRuntime( 1204): Uncaught handler: thread Thread-12 exiting due to uncaught exception E/AndroidRuntime( 1204): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 1204):at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) E/AndroidRuntime( 1204):at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:234) E/AndroidRuntime( 1204):at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:247) E/AndroidRuntime( 1204):at org.hopto.group18.postbot.Image.loadFileContents(Image.java:85) E/AndroidRuntime( 1204):at org.hopto.group18.postbot.EditPost$20.run (EditPost.java:800) E/AndroidRuntime( 1204):at java.lang.Thread.run(Thread.java:935) I'm using 500k buffers (down from 1MB, down from 1.5MB in an effort to avoid OOMEs) to load images, the images themselves are ~300k (taken with the phone's camera). I can't imagine why it is trying to allocate 6MB. I have fixed my thread issue (even when not changing orientation this issue occurs), and I am using locking to prevent two of my threads from using this method at the same time, but I still see this error, although less frequently. It seems to come and go: sometimes I can't seem to load a single image for a period of a minute or two, and then the problem will go away. Is it possible that these errors can be the result of concurrent access to this native method by my app and other apps? On Jan 8, 7:05 pm, Mark K mark.ka...@gmail.com wrote: I'm still seeing this problem. I've used the bitmap.recycle() which seems to mitigate this problem, but not get rid if it entirely. I'm only processing one bitmap at a time, I recycle the bitmap, null it, and call gc(). Runtime.freeMemory() indicates that I have over 10 MB free memory, none of my bitmaps are over 3.5 MB, I only process one at a time, yet this problem still occurs intermittently. Is this a bug or low level memory leak? I've spent a considerable amount of time on this issue, but cannot seem to resolve it. I'd at least like to know if this is a documented bug, or if there is any hope of a resolution in future Android version. The problem seems to arise from BitmapFactory.decodeFile() . I've communicated with other developers that seem to have almost the exact same problem. I'd like to at least know if this is on the radar as a bug, and if there is any chance it will be dealt with in a future version of Android. Thanks Mark On Jan 8, 3:29 pm, Romain Guy romain...@google.com wrote: Use less memory. One full screen PNG uses roughly 480*320*4 bytes (~= 614k.) Since you enable caching, you are doubling that amount to ~1.2MB per view. With 5 views you are using about 6 MB of memory (out of 16 MB maximum) just for the background images. On Thu, Jan 8, 2009 at 3:27 PM, Rohit mord...@gmail.com wrote: I am setting the Background (using view.setBackgroundResource()) of about 5 views with pngs that fill up the entire screen (as a backdrop). I scroll between these 5 views and thus want to keep them in cache (I use view.setChildrenCacheEnabled()) but I run into the OutOfMemoryError: bitmap exceeds VM budget error. Is there a way to overcome it? Rohit n Dec 17 2008, 11:20 am, Mark K mark.ka...@gmail.com wrote: Thanks for the beta on the bitmap,recycle(), it works! Before processing the next bitmap I use this code to free up memory. I have a class level Bitmap object. Bitmap bm;// class level if (bm!=null) { bm.recycle(); try { Thread.sleep(100); } catch(Exception e){} bm=null; System.gc(); try {
[android-developers] Re: Full multitouch working on the G1, new approach (video + source)
Great! Does anybody know if this is ok IP wise, or is a lawsuit likely? S On 11 Jan 2009, at 13:30, luke wrote: I have multitouch working on the G1 in a way that is backwards- compatible with single-touch applications. I capture the multitouch events and then hijack an unused field in MotionEvent to pass the multitouch events in a way that only affects programs that have been designed to work in multitouch mode -- i.e. this did not require re- plumbing the event system. The approach also does not require any kernel modifications, it just needs modifications to one Java system class. Video and full source here: http://lukehutch.wordpress.com/android-stuff/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 stop the device from sleeping
You can use a wakelock: http://code.google.com/android/reference/android/os/PowerManager.html On Jan 11, 1:14 pm, Mike Perrow mike.per...@gmail.com wrote: Hi, I released a Hypnotic Spiral demo on the market yesterday. One of the most requested features from the comments I've received is to stop the phone from sleeping after a few minutes of no use. Is there a way to deep the phone awake while my activity is running? Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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/Browser: How to browse files from the sdcard?
Mariano Kamp wrote: Hi, I am trying to browse files from the sd card, but haven't had any success so far. Maybe I am doing something wrong, so I'd like to write down the steps for your feedback. The sample contains of an html file that references a png. (1) localhost:~ mkamp$ cat test.html html pHello World!img src=test.png/p /html (2) I transfer the two files to the sdcard like this: localhost:~ mkamp$ adb push test.html /sdcard/. 10 KB/s (57 bytes in 0.005s) localhost:~ mkamp$ adb push test.png /sdcard/. 709 KB/s (3180 bytes in 0.004s) (3) To check if they are there I get them back and compare the version I pulled back with the version I pushed doing the following: localhost:~ mkamp$ adb pull /sdcard/test.png test2.png 829 KB/s (3180 bytes in 0.003s) localhost:~ mkamp$ adb pull /sdcard/test.html test2.html 0 KB/s (57 bytes in 0.110s) localhost:~ mkamp$ diff test.html test2.html localhost:~ mkamp$ md5 test.png test2.png MD5 (test.png) = 49cde2f11086e4ebcb1aff45deaae750 MD5 (test2.png) = 49cde2f11086e4ebcb1aff45deaae750 So life should be good, right? (4) Well, when trying to browse those files in the Android browser with the url file:///sdcard/test.html I get Web page not available. The Web page at file:///scard/test.html could not be loaded as: The requested file was not found. (5) The system logs shows: E/browser ( 239): onReceivedError code:-13 The requested file was not found. D/browser ( 239): updating cursor I feel really stupid failing at something so simple, but I just don't see what I am missing. You cannot use the built-in Browser application to view local content, apparently for security reasons. -- 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: HELP! (was Re: Low on space)
Stoyan Damov wrote: Does anyone know what's the *FREE* internal memory initially when you get the phone? I've heard ~70MB, ~96MB, etc. ~70MB. Apparently not for me, it appears that I have 9MB! Perhaps now. Most likely, you had ~70MB when you got the phone. This is getting ridiculous, I've cleared the browser's cache and got 2MB back, I have only *ONE* application installed which takes 2MB If you go into Manage Applications and you have only one item listed, your phone is probably messed up, and I would recommend a reset. The device comes with dozens of apps installed, some of which (AFAIK) are not removable. and I have just 7MB of free memory. So, free up some memory. For example, on my G1, as I type this, I have 35MB of internal phone storage available. I then go into Settings Applications Manage Applications and sort the results by size descending via the option menu. The top entry is Android Market, at 14MB. There is a known bug in the Android Market where it does not clear its cache proactively. But, it will flush the cache when it is needed, so I effectively have closer to 49MB available. There are enough posts from enough people that I feel reasonably comfortable that most of that space will be reclaimed if/when I need it. #2 entry is the Browser. I go in, click Clear Data, and the app falls somewhere way down the list, and my listed available space is 45MB (plus the 14MB or so that will get freed up by Android Market when needed). Lather, rinse, repeat. If the rough total of space reported by the Manage Applications list, plus the amount of reported free storage space, does not add up to anything near ~70MB, then something on your device is leaking storage, and I would recommend a reset. This is serious, if I got to this situation there's a possibility that other users will hit that too, and these won't be developers. Which is why there have been discussions on various approaches for installing apps on SD cards, to support manufacturers (like, apparently, HTC) who skimp on the on-board flash. The fact that HTC did this is not the fault of the core Android team, as Android is licensed as open source, so HTC can do what it damn well feels like. If you want to grouse about the ~70MB of free on-device storage space, please grouse in HTC's general direction. I *SO* regret installing the over-the-air patch, which removed root access :((( Which would not have helped you one bit. -- 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: HELP! (was Re: Low on space)
On Sun, Jan 11, 2009 at 12:08 PM, Mark Murphy mmur...@commonsware.comwrote: The top entry is Android Market, at 14MB. There is a known bug in the Android Market where it does not clear its cache proactively. But, it will flush the cache when it is needed, so I effectively have closer to 49MB available. There are enough posts from enough people that I feel reasonably comfortable that most of that space will be reclaimed if/when I need it. I have never seen anything remove the lost files from the Android market. The last thing I heard from the devs was basically oh crap, yeah, thats Bad. If you have a link to other info, I'd appreciate it.. #2 entry is the Browser. I go in, click Clear Data, and the app falls somewhere way down the list, and my listed available space is 45MB (plus the 14MB or so that will get freed up by Android Market when needed). That wipes out bookmarks, passwords, cookies, history.. There is another bug there, where it saves screenshots of the windows and then doesn't properly reap them. Again, something that can't be done without wiping all the data from the app ('clear data'). I *SO* regret installing the over-the-air patch, which removed root access :((( Which would not have helped you one bit. Root access would allow him to remove the errant caches. That sounds like -all- the bits of help he needed, actually.. And for the record, he can downgrade to rc29 and apply a root-enabled rc30 version of his choice. http://andblogs.net/2009/01/rc30-downgrade-merry-christmas-everyone/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Performance Problem with ListView / Styled TextView
Hi, I have a performance problem in a ListView. The problem seems to be that it takes too long to setup each individual row. It scrolls very, very painfully slow, because of that. The actual code renders an Entry differently depending on the read state and if it is changed. When not using this code and just plainly called setText() on the TextViews it is reasonable fast. Also the content is HTML. Am I doing something terribly wrong here? ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/feed_title android:layout_width=fill_parent android:layout_height=wrap_content android:textSize=11sp android:paddingTop=3px / TextView android:id=@+id/entry_title android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/ feed_title android:textSize=15sp android:paddingBottom=3px / /RelativeLayout class EntryListAdapter extends BaseAdapter { [..] public View getView(int position, View convertView, ViewGroup parent) { View rowView = convertView != null ? convertView : activity .findViewById(R.layout.entry_row); if (rowView == null) rowView = inflater.inflate(R.layout.entry_row, parent, false); Entry entry = entries.get(position); -- slow version EntryViewHelper.populateEntryView(rowView, entry); -- -- OR -- -- (somewhat) fast version TextView entryTitleView = (TextView) rowView.findViewById(R.id.entry_title); TextView feedTitleView = (TextView) rowView.findViewById(R.id.feed_title); feedTitleView.setText(entry.getFeedTitle()); entryTitleView.setText(entry.getTitle()); -- return rowView; } } class EntryViewHelper { [..] static void populateEntryView(View view, Entry entry) { TextView entryTitleView = (TextView) view .findViewById(R.id.entry_title); TextView feedTitleView = (TextView) view.findViewById(R.id.feed_title); feedTitleView.setText(U.renderTitleToSpannedString( entry.getFeedTitle(), entry.getFeedTitleType())); entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(), entry.getTitleType())); int style = Typeface.NORMAL; if (!entry.isRead()) style |= Typeface.BOLD; if (entry.isReadStatePending()) style |= Typeface.ITALIC; entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(), entry .getTitleType())); feedTitleView.setText(U.renderTitleToSpannedString( entry.getFeedTitle(), entry.getFeedTitleType())); entryTitleView.setTypeface(Typeface.DEFAULT, style); } } .. import android.text.Html; import android.text.Spanned; import android.text.SpannedString; .. class U { static Spanned renderTitleToSpannedString(String titleString, String titleType) { Spanned title = null; if (html.equals(titleType) || xhtml.equals(titleType)) title = Html.fromHtml(titleString); else title = new SpannedString(titleString); return title; } } Btw. I re-use the convert view etc. The performance degradation only happens when I style the output. Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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/Browser: How to browse files from the sdcard?
OMG. That is such a blow. I didn't read anything like that in the WebView documentation. I spent my vacation writing an offline client for Google Reader. Puh. I already paid for a logo etc. Man that sucks ;-( Any idea how to work around that? I actually don't need it to work in the browser just in the WebView. Would this help to work around the security issue? What kind of issue is that anyway? Mariano On Sun, Jan 11, 2009 at 5:46 PM, Mark Murphy mmur...@commonsware.comwrote: Mariano Kamp wrote: Hi, I am trying to browse files from the sd card, but haven't had any success so far. Maybe I am doing something wrong, so I'd like to write down the steps for your feedback. The sample contains of an html file that references a png. (1) localhost:~ mkamp$ cat test.html html pHello World!img src=test.png/p /html (2) I transfer the two files to the sdcard like this: localhost:~ mkamp$ adb push test.html /sdcard/. 10 KB/s (57 bytes in 0.005s) localhost:~ mkamp$ adb push test.png /sdcard/. 709 KB/s (3180 bytes in 0.004s) (3) To check if they are there I get them back and compare the version I pulled back with the version I pushed doing the following: localhost:~ mkamp$ adb pull /sdcard/test.png test2.png 829 KB/s (3180 bytes in 0.003s) localhost:~ mkamp$ adb pull /sdcard/test.html test2.html 0 KB/s (57 bytes in 0.110s) localhost:~ mkamp$ diff test.html test2.html localhost:~ mkamp$ md5 test.png test2.png MD5 (test.png) = 49cde2f11086e4ebcb1aff45deaae750 MD5 (test2.png) = 49cde2f11086e4ebcb1aff45deaae750 So life should be good, right? (4) Well, when trying to browse those files in the Android browser with the url file:///sdcard/test.html I get Web page not available. The Web page at file:///scard/test.html could not be loaded as: The requested file was not found. (5) The system logs shows: E/browser ( 239): onReceivedError code:-13 The requested file was not found. D/browser ( 239): updating cursor I feel really stupid failing at something so simple, but I just don't see what I am missing. You cannot use the built-in Browser application to view local content, apparently for security reasons. -- 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: WebView/Browser: How to browse files from the sdcard?
Hey Mark. Mariano Kamp wrote: OMG. That is such a blow. I didn't read anything like that in the WebView documentation. I didn't say WebView. I said Browser. Browser != WebView. Sorry, I know, I didn't want to imply otherwise. Any idea how to work around that? Writing a ContentProvider to serve your content appears to be the standard answer. I haven't used that technique myself as yet, though. I don't see how that should work? Wouldn't that be the same as the FileContentProvider? How would WebView learn about this provider. Anyway, thanks for taking the time to think answer my question. Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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/Browser: How to browse files from the sdcard?
Mariano Kamp wrote: I don't see how that should work? Wouldn't that be the same as the FileContentProvider? I cannot find a FileContentProvider class in the SDK or SDK samples. I see where there is one in the source code, and, yes, I think that's the basic idea. How would WebView learn about this provider. I believe you feed it a URL, like: content://your.provider.here/path/to/something.html But, again, I have not tried this myself, though I recall seeing some posts in this group, and maybe a blog post, covering this technique to some degree. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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/Browser: How to browse files from the sdcard?
Once again, thanks. I found this tutorial: http://www.anddev.org/tutproviding_data_in_a_contentprovider-t4073.html and will try that. I checked that the ContentProvider is called from the Browser... So the rest should work. On Sun, Jan 11, 2009 at 7:58 PM, Mark Murphy mmur...@commonsware.comwrote: Mariano Kamp wrote: I don't see how that should work? Wouldn't that be the same as the FileContentProvider? I cannot find a FileContentProvider class in the SDK or SDK samples. I see where there is one in the source code, and, yes, I think that's the basic idea. How would WebView learn about this provider. I believe you feed it a URL, like: content://your.provider.here/path/to/something.html But, again, I have not tried this myself, though I recall seeing some posts in this group, and maybe a blog post, covering this technique to some degree. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Recording Audio
To Record audio to a new file on sd card I did as follows and worked for me with emulator and mic. But don't know about buffers or sockets. And not sure if this is a good way but anyway works. To run emulator with sd card you do mksdcard 512M sdimg.iso then start emulator as 'emulator.exe -sdcard sdimg.iso' private void startRecord() { mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); mRecorder.setOutputFile(/sdcard/test.3gpp); mRecorder.prepare(); mRecorder.start(); } then elsewhere mRecorder.stop(); then to play mPlayer = MediaPlayer.create(context, Uri.parse(mFilePath)); mPlayer.start(); Also I have uses-permission android:name=android.permission.RECORD_AUDIO /uses-permission - Original Message - From: Tez earlencefe...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Sunday, January 11, 2009 10:24 AM Subject: [android-developers] Recording Audio Hi, I want to record audio from the emulator using the mic. Can anyone send me some sample code on how to do this. Also, I want to know whether it is possible to redirect this mic o/p to a memory buffer or network socket. 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] DOM problem!!! getNodeValue() doesn't work!!
I have a big problem!! I want to get e value of dom document Node with getNodeValue() but it does't work. Example: Node node = childs.item(i); String value = node.getNodeValue() Please HELP!!! It is urgent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Recording Audio
On Sun, Jan 11, 2009 at 12:24 AM, Tez earlencefe...@gmail.com wrote: Hi, I want to record audio from the emulator using the mic. Can anyone send me some sample code on how to do this. Also, I want to know whether it is possible to redirect this mic o/p to a memory buffer or network socket. I am developing an app for recording audio annotations during an event (the annotations get recorded as audio files on the sdcard): https://sourceforge.net/projects/rehearsalassist/ The source is available in the SVN repository. The following two files (RehearsalRecord.java and RehearsalPlayback.java) deal with recording/playback: http://tinyurl.com/ax8ju5 http://tinyurl.com/7rsfcf I don't know about the redirection part. HTH, Stjepan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Reusing object for message
Hi, I'm trying to avoid recreating an object for each time I want to send a message, but for some reason, only old data gets sent unless I create a new object each time. I've declared an Object array of the size I need inside my class and then set the variables passed to my method to each index and then call Message.obtain(myHandler, 0, myObjectArr).sendToTarget(). When I reuse the object, most messages get dropped and I see the last message send in their place instead. But when I use Message.obtain(myHandler, 0, new Object[] { val1, val2}).sendToTarget(), I always receive the data intact. I think this might be caused by the same issue that caused my Bundles to get lost (posted about it before). Any ideas what would cause this? It's really frustrating that I have to create a new Object each time. Given that loads of message will be sent, it's not that really efficient. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Manipulate Drawable Resource
Thanks for all of the responses guys. I am referring to the actual notification icons that show up in the title bar. I know that a Drawable can be manipulated in many ways and that's what I would like to do in order to update the icon but the main problem here is that the Notification object constructor only takes a resource id of a drawable that was already predefined. Therefore this limits you to icons that were added to the application before compilation. It would be nice if I could change the drawable programmatically in my application and then pass that as the notification icon but it seems that it's not possible. I was hoping there was a way to do this but I haven't had much luck finding a solution since I posted this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: HELP! (was Re: Low on space)
On Sun, Jan 11, 2009 at 7:08 PM, Mark Murphy mmur...@commonsware.com wrote: Stoyan Damov wrote: Does anyone know what's the *FREE* internal memory initially when you get the phone? I've heard ~70MB, ~96MB, etc. ~70MB. Apparently not for me, it appears that I have 9MB! Perhaps now. Most likely, you had ~70MB when you got the phone. This is getting ridiculous, I've cleared the browser's cache and got 2MB back, I have only *ONE* application installed which takes 2MB If you go into Manage Applications and you have only one item listed, your phone is probably messed up, and I would recommend a reset. The device comes with dozens of apps installed, some of which (AFAIK) are not removable. I guess I had not explained myself very clearly. I do have all pre-installed apps on my phone. Besides them I ONLY have 1 app, which takes 2MB. and I have just 7MB of free memory. So, free up some memory. Read below my answers but basically I've done anything possible to free up space and I still have 5 MB. For example, on my G1, as I type this, I have 35MB of internal phone storage available. I then go into Settings Applications Manage Applications and sort the results by size descending via the option menu. Me too, and I see this (after sorting by size in descending order): The other app - 2MB My app - 2MB IM - 848 KB ... all others are pre-installed Android apps taking kilobytes The top entry is Android Market, at 14MB. There is a known bug in the Android Market where it does not clear its cache proactively. But, it will flush the cache when it is needed, so I effectively have closer to 49MB available. There are enough posts from enough people that I feel reasonably comfortable that most of that space will be reclaimed if/when I need it. #2 entry is the Browser. I go in, click Clear Data, and the app falls somewhere way down the list, and my listed available space is 45MB (plus the 14MB or so that will get freed up by Android Market when needed). Lather, rinse, repeat. The browser was taking only 3MB, I said it in my last post. If the rough total of space reported by the Manage Applications list, plus the amount of reported free storage space, does not add up to anything near ~70MB, then something on your device is leaking storage, and I would recommend a reset. Now I have a very important question before I do that - I own an unlocked phone (a friend of mine bought it unlocked) and I'm in Bulgaria. The question is whether I'd have to re-activate the phone after the factory reset, because apparently I can't activate it, and do not know for sure whether those send as $25 and we'll send you an unlock code websites *actually* work if I get screwed and have to re-activate. This is serious, if I got to this situation there's a possibility that other users will hit that too, and these won't be developers. Which is why there have been discussions on various approaches for installing apps on SD cards, to support manufacturers (like, apparently, HTC) who skimp on the on-board flash. The fact that HTC did this is not the fault of the core Android team, as Android is licensed as open source, so HTC can do what it damn well feels like. If you want to grouse about the ~70MB of free on-device storage space, please grouse in HTC's general direction. I understand that the device is manufactured, and I am happy to have 70 MB for apps (at least until a next release enables apps to launch from a modified FAT32 SD card or whatever Google comes up with), but the thing is I *don't* have these 70 MBs, I have 1/10 of them :((( I *SO* regret installing the over-the-air patch, which removed root access :((( Which would not have helped you one bit. Disconnect's post below answers why I'd need root access. I could at least view the file system and decide whether a file should be there or not (acknowledging that I might break the phone by doing that) - but at least I could see that say in /var/tmp there's a huge .log file or whatever and let someone (e.g. Google engineers) about that. Thanks, Stoyan -- 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: HELP! (was Re: Low on space)
On Sun, Jan 11, 2009 at 7:21 PM, Disconnect dc.disconn...@gmail.com wrote: And for the record, he can downgrade to rc29 and apply a root-enabled rc30 version of his choice. http://andblogs.net/2009/01/rc30-downgrade-merry-christmas-everyone/ I'm happy to downgrade to RC30 but have the same question - if I do downgrade, will I have to re-activate the phone. I'm even happy to have to re-activate the phone if anyone on this list says that these websites which offer unlocking for $25 are for real. Thanks, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: HELP! (was Re: Low on space)
btw, *THIS* is ridiculous. Just deleted that app which takes 2MB, and deleted my app as well. When I went to see the free space it HADN'T CHANGED!!! I am pretty sure that's a bug but more importantly that's a HORRIBLE bug because the free space is reported as if I haven't deleted anything even after I turned off and on the device! :O On Mon, Jan 12, 2009 at 12:23 AM, Stoyan Damov stoyan.da...@gmail.com wrote: On Sun, Jan 11, 2009 at 7:21 PM, Disconnect dc.disconn...@gmail.com wrote: And for the record, he can downgrade to rc29 and apply a root-enabled rc30 version of his choice. http://andblogs.net/2009/01/rc30-downgrade-merry-christmas-everyone/ I'm happy to downgrade to RC30 but have the same question - if I do downgrade, will I have to re-activate the phone. I'm even happy to have to re-activate the phone if anyone on this list says that these websites which offer unlocking for $25 are for real. Thanks, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Full multitouch working on the G1, new approach (video + source)
My personal take is that there is a whole lot of prior art (the iPhone was not the first by a long shot), so it's probably not super- defensible in court... but Apple has deep pockets and an elite image to maintain. They apparently have about 200 patents on the iPhone, two of which especially deal with their touchscreen technology -- but I haven't looked into the details. On Jan 11, 11:32 am, Sena Gbeckor-Kove s...@imkon.com wrote: Great! Does anybody know if this is ok IP wise, or is a lawsuit likely? S On 11 Jan 2009, at 13:30, luke wrote: I have multitouch working on the G1 in a way that is backwards- compatible with single-touch applications. I capture the multitouch events and then hijack an unused field in MotionEvent to pass the multitouch events in a way that only affects programs that have been designed to work in multitouch mode -- i.e. this did not require re- plumbing the event system. The approach also does not require any kernel modifications, it just needs modifications to one Java system class. Video and full source here: http://lukehutch.wordpress.com/android-stuff/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: HELP! (was Re: Low on space)
Stoyan Damov wrote: If the rough total of space reported by the Manage Applications list, plus the amount of reported free storage space, does not add up to anything near ~70MB, then something on your device is leaking storage, and I would recommend a reset. Now I have a very important question before I do that - I own an unlocked phone (a friend of mine bought it unlocked) and I'm in Bulgaria. The question is whether I'd have to re-activate the phone after the factory reset, because apparently I can't activate it, and do not know for sure whether those send as $25 and we'll send you an unlock code websites *actually* work if I get screwed and have to re-activate. http://phandroid.com/2008/10/25/how-to-reset-your-g1-and-start-from-scratch/ I did today what you are wanting to do and it went fine. Sym card wasn’t touched and I’m doing the same thing you want to do with my google apps address. http://forums.t-mobile.com/tmbl/board/message?board.id=Android3thread.id=21321 No mention of re-activation, and you would think T-Mobile would bring up that point, considering it would likely involve their tech support folk. http://forums.t-mobile.com/tmbl/board/message?board.id=Android3message.id=25212 Again, no mention of needing re-activation. You may wish to conduct your own searches on factory data reset to see if you find other evidence one way or another. I understand that the device is manufactured, and I am happy to have 70 MB for apps (at least until a next release enables apps to launch from a modified FAT32 SD card or whatever Google comes up with), but the thing is I *don't* have these 70 MBs, I have 1/10 of them :((( Again, your phone probably started with ~70MB. Something with your phone (development? third-party apps? OTA update? G1/Android bugs? fussing around with root?) ate up memory in some hidden fashion. -- 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: the Trackball and MotionEvents
It is more easy than that. If you implement onTrackBallEvent in your activity and you return true; The event is consumed by you, otherwise it also triggers a onKeyUp event with a DPAD keycode. regards, Lucas On Jan 11, 7:39 am, blake blake.me...@gmail.com wrote: Dianne! Brilliant answer! Thank you very much! Pressing my luck, where does that translation happen? RootView? Activity? Many thanks! -blake On Jan 10, 6:23 pm, Dianne Hackborn hack...@android.com wrote: The framework translates raw trackball events into DPAD events if nobody consumes the trackball event. At this time Android only supports devices that have a touch screen. The trackball is optional, and can be replaced by a DPAD. On Sat, Jan 10, 2009 at 5:21 PM, blake blake.me...@gmail.com wrote: ... it appears that I was mistaken. Both trackball movement and screen taps generate MotionEvents. They are delivered completely differently, though Trackball events through dispatchTrackballEvent, and touch events through dispatchTouchEvent. I remain mystified by how the trackball is handled. It begins to look as if it generates MotionEvents exactly as the touch screen does. Presumably, clicking it generates a KEYCODE_DPAD_CENTER event. How do you generate a KEYCODE_DPAD_UP on, e.g., a G1? -blake On Jan 10, 4:40 pm, blake blake.me...@gmail.com wrote: I notice that TrackballEvents are different that MotionEvents, and it makes me wonder what happens on a device that does not support a touch screen. Suppose I have an Etch-a-Sketch application, that allows me to do crude drawings on my screen. With the G1 phone, I just watch for MotionEvents and draw them. Can anyone confirm (or deny) that, on a device that doesn't have a touch screen, my application will not work? Or, possibly, might trackball events appear as MotionEvents, on such a device. -blake -- 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. 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: HELP! (was Re: Low on space)
Stoyan Damov wrote: On Mon, Jan 12, 2009 at 12:34 AM, Mark Murphy mmur...@commonsware.com wrote: No mention of re-activation, and you would think T-Mobile would bring up that point, considering it would likely involve their tech support folk. Actually the post at (http://forums.t-mobile.com/tmbl/board/message?board.id=Android3thread.id=21321) clearly states that: After the reset: Once your phone gets its data connection back you will be prompted to sign back into your Gmail account. and then... NOTE: If you are doing the reset because you have no data connection (can't browse web pages) you may not be able to sign back into Gmail and should contact us instead of doing the reset. Now, if I can sign in Gmail via Wi-Fi it would be OK but I don't know if this will work or the phone would insist to be reactivate on T-Mobile's network :( And the other link (http://phandroid.com/2008/10/25/how-to-reset-your-g1-and-start-from-scratch/): Alt+W - Wipe data/factory reset - (What I chose, had to re-register, out of the box settings) :( None of which are activation, which was the area of concern you spoke of, and to which I was responding. There have been various instructions posted for how to get an ADP1 going without a T-Mobile account, IIRC -- quite possibly, those instructions would work for you in this case. -- 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: HELP! (was Re: Low on space)
Thanks Mark, but hang on... apparently I have misunderstood something. Are you saying that based on what you read I won't have to re-activate the phone (i.e. have to enter the SIM's unlock code, which presumably, based on numerous posts I can buy for ~$25) but merely add my carrier's EDGE's APN so I can sign in to Google? Thanks, Stoyan On Mon, Jan 12, 2009 at 1:16 AM, Mark Murphy mmur...@commonsware.com wrote: Stoyan Damov wrote: On Mon, Jan 12, 2009 at 12:34 AM, Mark Murphy mmur...@commonsware.com wrote: No mention of re-activation, and you would think T-Mobile would bring up that point, considering it would likely involve their tech support folk. Actually the post at (http://forums.t-mobile.com/tmbl/board/message?board.id=Android3thread.id=21321) clearly states that: After the reset: Once your phone gets its data connection back you will be prompted to sign back into your Gmail account. and then... NOTE: If you are doing the reset because you have no data connection (can't browse web pages) you may not be able to sign back into Gmail and should contact us instead of doing the reset. Now, if I can sign in Gmail via Wi-Fi it would be OK but I don't know if this will work or the phone would insist to be reactivate on T-Mobile's network :( And the other link (http://phandroid.com/2008/10/25/how-to-reset-your-g1-and-start-from-scratch/): Alt+W - Wipe data/factory reset - (What I chose, had to re-register, out of the box settings) :( None of which are activation, which was the area of concern you spoke of, and to which I was responding. There have been various instructions posted for how to get an ADP1 going without a T-Mobile account, IIRC -- quite possibly, those instructions would work for you in this case. -- 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: HELP! (was Re: Low on space)
Stoyan Damov wrote: but hang on... apparently I have misunderstood something. Are you saying that based on what you read I won't have to re-activate the phone (i.e. have to enter the SIM's unlock code, which presumably, based on numerous posts I can buy for ~$25) but merely add my carrier's EDGE's APN so I can sign in to Google? It's more that I am saying that a factory data reset does not appear to require activation of the phone (i.e., phone company work). It does require going through the whole GMail thing, which was a problem for ADP1 buyers, which is why people wrote up the ways to deal with that. Since I don't own an ADP1, I have not paid attention to the details of exactly what those instructions were, just that they existed. -- 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: Port my iPhone game
Hi Steve, Thought I would chip in my two cents.. I have worked on a few conversion projects the biggest being a social welfare system that was converted to java. From everything i have experienced in conversion projects i would say you are better to just recreate the code using your old code as a guide, you will end up getting a better and more maintainable product. Thanks, Greg B. On Jan 12, 2:26 am, Steve rockthesm...@gmail.com wrote: Ok thanks guys, I've got a few options to consider now: i. do not release Android port ii. manually rewrite in Java iii. use auto conversion software for c++ - Java iv. contract out to get the port written I have also contacted regarding iii and iv so I'll have a think about it and see what happens. The those of you that asked about what the iPhone project is, more details can be found over at: http://www.kamicrazy.com/ I didn't bother mentioning it initially in case it came accross that I was just drying to drum up publicity and so forth, I only really mentioned it to give some sort of indication of the level of project I'm working on (e.g. not just a simple few hundred line application that can be ported trivially). Best regards, Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 simple way to do Key/Value with Spinners?
I'm familiar with arrays.xml to define static data sets for spinners and this works fine except that so far I am only able to define lists of values for the spinner. What I need now is to have keys associated with those values so that in the future when I add new elements in arbitrary positions, it won't matter and the code won't have to be updated to handle it. I'd like it if it worked like the select/option in html. The idea is to have a data set like this: Key / Value - flwr1 / Rose flwr2 / Daffodil and the spinner would show Rose Daffodil but the code can get to flwr1 flwr2 Sounds easy enough, right? Can anyone give me a quick code snippet to get me there? 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] charging for upgrades to free apps?
i have a free app and i want to put out an updated version that isn't free. when us devs are able to start charging, if i put out this updated version in place of the free app, will the people that already downloaded the app for free have to pay for the upgrade or will they get it for free? i want it the users to have to pay for the upgrade, but i want to know if i have to upload it as a separate app or if i can just publish the updated version in place of the free version so my current users are notified of the update. thanks. chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to map physical address to map?
I've got maps running in my emulator (Yay!). My next step is to take an address entered by the user and map it. How? I thought I could do something like I do on the web and directly ask Google which would then return the latlong for the address, but I don't see anything in the API that would let me do that. -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.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: how to map physical address to map?
Never mind. I found the Geocoder class! Now to figure out how it works... On Sun, Jan 11, 2009 at 7:58 PM, Faber Fedor faberfe...@gmail.com wrote: I've got maps running in my emulator (Yay!). My next step is to take an address entered by the user and map it. How? I thought I could do something like I do on the web and directly ask Google which would then return the latlong for the address, but I don't see anything in the API that would let me do that. -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.com -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.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] Notifications from a service, forced Intent.FLAG_ACTIVITY_NEW_TASK problem
I am trying to create a notification in a service to notify the user that the application's data has updated in the background. I want the application to resume when they click the notification. When I click the notification I get this message in DDMS: 01-11 16:16:10.574: WARN/ActivityManager(56): startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { comp={com.example/com.example.view.ExampleActivity} } This forces the activity to start even if it is already paused or stopped, so it never resumes, it just creates a new instance of it, overlapping everything, including service connections. If the application is already running, another copy of it starts on top of it. How do I make Android just resume the activity? Thankful for any help! Warm Regards, Torgny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Android developers are invited to join the team!
Android is strong, the future integration of computers and mobile phones leader! Now hope that more people support the cause of Android! We invite you to join! We base ourselves on the Android platform, committed to the development of Android platform software, Android platform for the collection of entertainment resources! Android If you are confident of their confidence in you, please join us! Software development team Introduction: 1, CoolReader! Reader software, has released a beta version Address: http://androidos.cc/bbs/forumdisplay.php?fid=30 2, Android UI components (Design by Analysis) Android developer-oriented UI components, it is more suitable from the Swing, J2ME programmers turn 3, Android File Manager (AFM, analysis of the design) Andriod platform for managing documents integrated platform, not just management 4, CoolTing mobile music player (Design by Analysis) Support a variety of formats music player, more humane 5, CoolAd commodity information software (Design by Analysis) A GPS-based real-time commodity information software Our website: http://androidos.cc/ Our communities: http://androidos.cc/bbs Android OS community member group ① 66143996 Android OS development group 78119108 We look forward to adding 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 -~--~~~~--~~--~--~---
Re: BUG, TERRIBLE BUG!!! Re: [android-developers] Re: HELP! (was Re: Low on space)
On Sun, Jan 11, 2009 at 5:04 PM, Stoyan Damov stoyan.da...@gmail.comwrote: Is there *anyone* who'll dare to tell me there's no bug in Android? Why would anyone claim there are no bugs in -any- piece of complicated software? (Except I guess TeX). How the fuck I don't have *anything* installed (besides the pre-installed G1 apps) and my memory is only ONE MB??? Where are the ~70 MBs??? :((( Just to clarify, none of the installed applications are shown to be using a large amount of data? If that is the case, then there are very few places the storage could have gone. First be sure to check in I believe /data/local (may be something else, it's the directory under /data owned by the shell allowing it to place files there). If that is not large, it could be in data/system, but unlikely. -- 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. 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: the Trackball and MotionEvents
The translation is in RootView. On Sun, Jan 11, 2009 at 1:39 AM, blake blake.me...@gmail.com wrote: Dianne! Brilliant answer! Thank you very much! Pressing my luck, where does that translation happen? RootView? Activity? Many thanks! -blake On Jan 10, 6:23 pm, Dianne Hackborn hack...@android.com wrote: The framework translates raw trackball events into DPAD events if nobody consumes the trackball event. At this time Android only supports devices that have a touch screen. The trackball is optional, and can be replaced by a DPAD. On Sat, Jan 10, 2009 at 5:21 PM, blake blake.me...@gmail.com wrote: ... it appears that I was mistaken. Both trackball movement and screen taps generate MotionEvents. They are delivered completely differently, though Trackball events through dispatchTrackballEvent, and touch events through dispatchTouchEvent. I remain mystified by how the trackball is handled. It begins to look as if it generates MotionEvents exactly as the touch screen does. Presumably, clicking it generates a KEYCODE_DPAD_CENTER event. How do you generate a KEYCODE_DPAD_UP on, e.g., a G1? -blake On Jan 10, 4:40 pm, blake blake.me...@gmail.com wrote: I notice that TrackballEvents are different that MotionEvents, and it makes me wonder what happens on a device that does not support a touch screen. Suppose I have an Etch-a-Sketch application, that allows me to do crude drawings on my screen. With the G1 phone, I just watch for MotionEvents and draw them. Can anyone confirm (or deny) that, on a device that doesn't have a touch screen, my application will not work? Or, possibly, might trackball events appear as MotionEvents, on such a device. -blake -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Multiple alarms - Intent aims at the same service but different values - Not possible?
The identity of an Intent is based on the action, data, type, and categories; the extras are not considered. If you want to have two different PendingIntent objects, you'll need to have something different about them in those basic fields. On Sun, Jan 11, 2009 at 5:24 AM, code_android_festival_way festival.s...@googlemail.com wrote: Hello. At the moment I'm trying to register/set two alarms that open up a background service. Both alarms should open up the same service doing something depending on the extras that come with the intent. (the alarms have different startup and interval values) Why can't I do that. I get only one alarm registered. Do I really have to implement two services (which do nearly the same) for that to work? Regards. -- 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. 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 it possible to replace or extend the dialer application ?
I believe you can already do that. On Sun, Jan 11, 2009 at 1:23 AM, shimo...@gmail.com shimo...@gmail.comwrote: Hi, How about an option to assign pressing the PHONE button to launch my app ? (when there are no pending incoming calls) TIA On Jan 10, 2:35 am, Dianne Hackborn hack...@android.com wrote: It would be nice to have a way to replace the incoming call screen or other parts of the incoming call handling, but it is pretty non-trivial to do. I am not aware of any current work going on to do this. You can have a look at the source and see what is involved. On Fri, Jan 9, 2009 at 3:39 PM, Brad Fuller bradallenful...@gmail.com wrote: Thanks Dianne, Then perhaps there are ways to implement partial events for incoming calls. When an incoming call is detected, I imagine that there are several separate events. For example: get the number of the incoming call; see if it's in the contact list; display the onscreen graphic of an incoming with the phone number and the contact name, call the ringtone manager: etc. Then, when the phone is off-hook, display Call in progess text.. etc. I assume that these are separate classes. So, could one display their own incoming call graphic? Or replace the RingTone manager (not the ringtone, like ExtendedRings does), etc? Or are they not separate classes or all private? Does that make sense? On Fri, Jan 9, 2009 at 2:56 PM, Dianne Hackborn hack...@android.com wrote: Currently you can intercept outgoing calls and replace that with your own behavior, but we don't yet have a way to intercept incoming calls. The issue of built-in apps using internal APIs is kind-of a red-herring. Yes, in the case of the phone UI, there are a bunch of APIs that you need to be able to implement something like your own in-call screen... however the fact that they are internal is not really the issue: we could expose them, but it still wouldn't work because the current implementation of them requires that you actually be running in the same process as the telephony subsystem, so they just can't be used by other apps. For the most part, we make APIs private because they are not yet something we can maintain in the future platform are even able to be used successfully by applications. Not out of some malicious goal to make sure nobody else can make their own whatever UI. Outside of the phone system, for the most part the platform applications use private APIs because we didn't have time to clean all of the apps up as we were evolving the official SDK into something that we could support in the long term. We would love to accept patches that fix these APIs to switch to the public APIs. On Fri, Jan 9, 2009 at 1:07 PM, Brad Fuller bradallenful...@gmail.com wrote: On Fri, Jan 9, 2009 at 1:02 PM, moazzamk moazz...@gmail.com wrote: I don't know what you mean by replace with your own code but you can setup a receiver in your app which is called when a call is received. I remember reading about it in the documentation (if I remember correctly). What I mean is that instead of the default process that happens when an incoming call is detected, another process is called. -- Brad Fuller -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: BUG, TERRIBLE BUG!!! Re: [android-developers] Re: HELP! (was Re: Low on space)
Do you have busybox on the device? If so, I can help you find where the space is gone. With only the included android shell binaries, however, I don't know if I can. On Sun, Jan 11, 2009 at 8:33 PM, Dianne Hackborn hack...@android.comwrote: On Sun, Jan 11, 2009 at 5:04 PM, Stoyan Damov stoyan.da...@gmail.comwrote: Is there *anyone* who'll dare to tell me there's no bug in Android? Why would anyone claim there are no bugs in -any- piece of complicated software? (Except I guess TeX). How the fuck I don't have *anything* installed (besides the pre-installed G1 apps) and my memory is only ONE MB??? Where are the ~70 MBs??? :((( Just to clarify, none of the installed applications are shown to be using a large amount of data? If that is the case, then there are very few places the storage could have gone. First be sure to check in I believe /data/local (may be something else, it's the directory under /data owned by the shell allowing it to place files there). If that is not large, it could be in data/system, but unlikely. -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Joel Knighton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Accessing email
On Thu, Dec 11, 2008 at 7:50 AM, Nathan Ekstrom nat...@whiteboxdev.com wrote: I'm writing an application that provides status information. The status updates come through email so I need to get the status emails and parse them to figure out what the current status is. Hello, Did you ever find out if it is possible to access email in the Gmail app? I'd like to write an app that has a similar use case. Casey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: BUG, TERRIBLE BUG!!! Re: [android-developers] Re: HELP! (was Re: Low on space)
Okay, Stoyan, if you want to do a ls -l -R and then email it to me ( joel.knigh...@gmail.com) I'll read through it and see if I notice a problem. (You can email straight from the terminal app) On Sun, Jan 11, 2009 at 8:41 PM, Joel Knighton joel.knigh...@gmail.comwrote: Do you have busybox on the device? If so, I can help you find where the space is gone. With only the included android shell binaries, however, I don't know if I can. On Sun, Jan 11, 2009 at 8:33 PM, Dianne Hackborn hack...@android.comwrote: On Sun, Jan 11, 2009 at 5:04 PM, Stoyan Damov stoyan.da...@gmail.comwrote: Is there *anyone* who'll dare to tell me there's no bug in Android? Why would anyone claim there are no bugs in -any- piece of complicated software? (Except I guess TeX). How the fuck I don't have *anything* installed (besides the pre-installed G1 apps) and my memory is only ONE MB??? Where are the ~70 MBs??? :((( Just to clarify, none of the installed applications are shown to be using a large amount of data? If that is the case, then there are very few places the storage could have gone. First be sure to check in I believe /data/local (may be something else, it's the directory under /data owned by the shell allowing it to place files there). If that is not large, it could be in data/system, but unlikely. -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Joel Knighton -- Joel Knighton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: charging for upgrades to free apps?
chris.cap...@gmail.com wrote: i have a free app and i want to put out an updated version that isn't free. when us devs are able to start charging, if i put out this updated version in place of the free app, will the people that already downloaded the app for free have to pay for the upgrade or will they get it for free? i want it the users to have to pay for the upgrade, but i want to know if i have to upload it as a separate app or if i can just publish the updated version in place of the free version so my current users are notified of the update. thanks. It's my understanding that this would be against the Market's terms of service, however they don't discourage the separate distribution of a free demo from the paid app. Raymond --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Animation image
Hi All, I know android is not have the support of running .gif image. So i have 6 different images. I want to run this images by sequence like gif animation. Can any one help me. Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: auto generation of Android.mk file
Thanks David for your answer! Regards, Kishor On Fri, Jan 9, 2009 at 5:51 PM, David Turner di...@android.com wrote: You don't need one Android.mk per sub-directory. It's perfectly possible to use one top-level Android.mk that references all sources required for your project. just refer to them with their subpath, as in subdir/filename. and no, it's not possible to convert an arbitrary Makefile into an Android.mk (especially the bizarre convolutions used/generated with Automake). The good news is that writing an Android.mk file is not very difficult as long as you know which files you want to build. On Fri, Jan 9, 2009 at 7:29 AM, krish24 krish2...@gmail.com wrote: Hi Everyone, I am trying to port a package (library) in android. There are many subfolder in my library folder and each subfolder contains a makefile. I know that we have to write Android.mk file for building the package. Do we need to write the Andriod.mk file for each subfolder present in my library. Is there any way to generate Android.mk file from standard makefile? Regards, Krish --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Animation image
Try to use a Flipper. Its easy On Mon, Jan 12, 2009 at 9:37 AM, Muthu Kumar K. muthum...@gmail.com wrote: Hi All, I know android is not have the support of running .gif image. So i have 6 different images. I want to run this images by sequence like gif animation. Can any one help me. Thanks in Advance, Muthu Kumar K. Mahesh Vaghela http:www.indianic.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] Display problem.
Thanks for the greate help. But now i want to display list of strings. This code is helpful for converting the sms to string insteade of adapter. import android.app.Activity; import android.app.ListActivity; import android.content.ContentUris; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.provider.Telephony.Carriers; import android.telephony.gsm.SmsMessage; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public class tele extends ListActivity { // Button ms1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); //ms1=(Button)findViewById(R.id.ms1); Uri uri = Uri.parse(content://sms/inbox); Cursor c= getContentResolver().query(uri, null, body like '%s %',null,null); // Cursor c = getContentResolver().query(Carriers.CONTENT_URI, null, null, null, null); startManagingCursor(c); if(c.getCount() !=0) { String[] str = new String[c.getCount()]; int i = 0; if(c.moveToFirst()) { do { str[i] = (c.getString (c.getColumnIndexOrThrow(body))).toString(); i++; }while(c.moveToNext()); } / new ArrayAdapterString(this, R.id.row_entry, str); /// } } } / Please help me how can i display the list of strings. I want to display String[] str. Kindly remember i have to search the strings . So want the list of strings not the listadapter. Thanks a lot in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: the Trackball and MotionEvents
Found it. Thanks very much. -blake On Jan 11, 6:38 pm, Dianne Hackborn hack...@android.com wrote: The translation is in RootView. On Sun, Jan 11, 2009 at 1:39 AM, blake blake.me...@gmail.com wrote: Dianne! Brilliant answer! Thank you very much! Pressing my luck, where does that translation happen? RootView? Activity? Many thanks! -blake On Jan 10, 6:23 pm, Dianne Hackborn hack...@android.com wrote: The framework translates raw trackball events into DPAD events if nobody consumes the trackball event. At this time Android only supports devices that have a touch screen. The trackball is optional, and can be replaced by a DPAD. On Sat, Jan 10, 2009 at 5:21 PM, blake blake.me...@gmail.com wrote: ... it appears that I was mistaken. Both trackball movement and screen taps generate MotionEvents. They are delivered completely differently, though Trackball events through dispatchTrackballEvent, and touch events through dispatchTouchEvent. I remain mystified by how the trackball is handled. It begins to look as if it generates MotionEvents exactly as the touch screen does. Presumably, clicking it generates a KEYCODE_DPAD_CENTER event. How do you generate a KEYCODE_DPAD_UP on, e.g., a G1? -blake On Jan 10, 4:40 pm, blake blake.me...@gmail.com wrote: I notice that TrackballEvents are different that MotionEvents, and it makes me wonder what happens on a device that does not support a touch screen. Suppose I have an Etch-a-Sketch application, that allows me to do crude drawings on my screen. With the G1 phone, I just watch for MotionEvents and draw them. Can anyone confirm (or deny) that, on a device that doesn't have a touch screen, my application will not work? Or, possibly, might trackball events appear as MotionEvents, on such a device. -blake -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Multiple alarms - Intent aims at the same service but different values - Not possible?
hello would you please tell the steps about the function call? I once posted about the alarm register issue: http://groups.google.com/group/android-developers/browse_thread/thread/304895040fa9f11/da4355589afa46a4?hl=enlnk=gstq=alarm#da4355589afa46a4 If you add alarm device in the routine,there maybe a problem. Waiting for you feedback. thanks --wxc200 自由之精神,独立之人格 Zsa Zsa Gabor - I'm a great housekeeper. I get divorced. I keep the house. On Sun, Jan 11, 2009 at 9:24 PM, code_android_festival_way festival.s...@googlemail.com wrote: Hello. At the moment I'm trying to register/set two alarms that open up a background service. Both alarms should open up the same service doing something depending on the extras that come with the intent. (the alarms have different startup and interval values) Why can't I do that. I get only one alarm registered. Do I really have to implement two services (which do nearly the same) for that to work? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Android Market place stats
Hi Everyone, For anyone interested in how apps in the Android market are ranking over time, I've put together a website at http://androidstats.com. Check it out and let me know what you think. Regards, Daniel -- iPhone, Android and Geolocation ramblings - http://jtribe.blogspot.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: Animation image
Try to use the android.os.Handler.Handler() ,you could switch different image in imageview with delay time. On Jan 12, 12:29 pm, Mahesh Vaghela mah...@indianic.com wrote: Try to use a Flipper. Its easy On Mon, Jan 12, 2009 at 9:37 AM, Muthu Kumar K. muthum...@gmail.com wrote: Hi All, I know android is not have the support of running .gif image. So i have 6 different images. I want to run this images by sequence like gif animation. Can any one help me. Thanks in Advance, Muthu Kumar K. Mahesh Vaghela http:www.indianic.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: Recording Audio
Thanks. how can I seutp the emulator to record audio? I am using Ubuntu as my development environment. How can I setup the emulator for that? Thank you. On Sun, Jan 11, 2009 at 2:23 PM, hmmm akul...@mail.ru wrote: To Record audio to a new file on sd card I did as follows and worked for me with emulator and mic. But don't know about buffers or sockets. And not sure if this is a good way but anyway works. To run emulator with sd card you do mksdcard 512M sdimg.iso then start emulator as 'emulator.exe -sdcard sdimg.iso' private void startRecord() { mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); mRecorder.setOutputFile(/sdcard/test.3gpp); mRecorder.prepare(); mRecorder.start(); } then elsewhere mRecorder.stop(); then to play mPlayer = MediaPlayer.create(context, Uri.parse(mFilePath)); mPlayer.start(); Also I have uses-permission android:name=android.permission.RECORD_AUDIO /uses-permission - Original Message - From: Tez earlencefe...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Sunday, January 11, 2009 10:24 AM Subject: [android-developers] Recording Audio Hi, I want to record audio from the emulator using the mic. Can anyone send me some sample code on how to do this. Also, I want to know whether it is possible to redirect this mic o/p to a memory buffer or network socket. 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: Recording Audio
I'm using Windows and the only thing I did to the emulator was to emulate sd card as below. For some reason sd card seems to be necessary for sound recording. Apart from that, provided that your mic works with Windows, there's no need to setup anything. I don't know about Ubuntu but it should be the same. - Original Message - From: Lucius Fox To: android-developers@googlegroups.com Sent: Monday, January 12, 2009 9:11 AM Subject: [android-developers] Re: Recording Audio Thanks. how can I seutp the emulator to record audio? I am using Ubuntu as my development environment. How can I setup the emulator for that? Thank you. On Sun, Jan 11, 2009 at 2:23 PM, hmmm akul...@mail.ru wrote: To Record audio to a new file on sd card I did as follows and worked for me with emulator and mic. But don't know about buffers or sockets. And not sure if this is a good way but anyway works. To run emulator with sd card you do mksdcard 512M sdimg.iso then start emulator as 'emulator.exe -sdcard sdimg.iso' private void startRecord() { mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); mRecorder.setOutputFile(/sdcard/test.3gpp); mRecorder.prepare(); mRecorder.start(); } then elsewhere mRecorder.stop(); then to play mPlayer = MediaPlayer.create(context, Uri.parse(mFilePath)); mPlayer.start(); Also I have uses-permission android:name=android.permission.RECORD_AUDIO /uses-permission - Original Message - From: Tez earlencefe...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Sunday, January 11, 2009 10:24 AM Subject: [android-developers] Recording Audio Hi, I want to record audio from the emulator using the mic. Can anyone send me some sample code on how to do this. Also, I want to know whether it is possible to redirect this mic o/p to a memory buffer or network socket. 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: Animation image
I thought Android does support animated gifs. I think I've seen the example in ApiDemos somewhere in their example they show animated_gif.gif from ApiDemos\res\drawable you could make a search in ApiDemos project to find out. - Original Message - From: Muthu Kumar K. muthum...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Monday, January 12, 2009 7:07 AM Subject: [android-developers] Animation image Hi All, I know android is not have the support of running .gif image. So i have 6 different images. I want to run this images by sequence like gif animation. Can any one help me. Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: DRAG AND DROP
yes dianne and peli , both of u r right. and so i am digging into the launcher code and getting good result out of that. regards kaushik On Sun, Jan 11, 2009 at 8:04 AM, Dianne Hackborn hack...@android.comwrote: Fwiw, changing layout parameters is a really inefficient way to do animations on the screen. I would strongly suggest looking at the launcher code and doing something inspired by that. -- 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. 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] Moving screen
Hi developers ... I want to create a moving background in my application. Can anyone help me. Thanks in advance. 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 -~--~~~~--~~--~--~---
[android-developers] Re: Power management in Android
How about reading on the capacity of battery via 'dumpsys battery'? I think the battery lifetime can be monitored by logging periodic readings on the current battery level. Is there any Android application showing the battery lifetime (or power consumption on system level or application level)? Jongkeun On Jan 8, 4:13 pm, Mark K mark.ka...@gmail.com wrote: There's no way to query thepowerstate directly that I know of, but you can have a receiver receive the intent 'ACTION_BATTERY_CHANGED' which should be thrown when the battery state changes. Mark On Jan 6, 11:29 pm, xroge...@gmail.com xroge...@gmail.com wrote: I couldn't find some stuff aboutpowermeasurement/managementin Android/G1. I wonder ifAndroidapplication can accesspowerrelated values like current battery drain rate, orAndroidkernel supports ACPI. Is there any reference or document for those things? 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: Full multitouch working on the G1, new approach (video + source)
Unless an SDK is released with multi-touch support, this discussion is probably better off in android-discuss or android-platform. (Just trying to cut down on cross-posting) On Sun, Jan 11, 2009 at 2:34 PM, luke luke.hu...@gmail.com wrote: My personal take is that there is a whole lot of prior art (the iPhone was not the first by a long shot), so it's probably not super- defensible in court... but Apple has deep pockets and an elite image to maintain. They apparently have about 200 patents on the iPhone, two of which especially deal with their touchscreen technology -- but I haven't looked into the details. On Jan 11, 11:32 am, Sena Gbeckor-Kove s...@imkon.com wrote: Great! Does anybody know if this is ok IP wise, or is a lawsuit likely? S On 11 Jan 2009, at 13:30, luke wrote: I have multitouch working on the G1 in a way that is backwards- compatible with single-touch applications. I capture the multitouch events and then hijack an unused field in MotionEvent to pass the multitouch events in a way that only affects programs that have been designed to work in multitouch mode -- i.e. this did not require re- plumbing the event system. The approach also does not require any kernel modifications, it just needs modifications to one Java system class. Video and full source here: http://lukehutch.wordpress.com/android-stuff/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Multiple alarms - Intent aims at the same service but different values - Not possible?
On 12 Jan., 06:27, 伊泽 wxc...@gmail.com wrote: hello would you please tell the steps about the function call? I once posted about the alarm register issue:http://groups.google.com/group/android-developers/browse_thread/threa... If you add alarm device in the routine,there maybe a problem. Waiting for you feedback. thanks --wxc200 自由之精神,独立之人格 Zsa Zsa Gabor - I'm a great housekeeper. I get divorced. I keep the house. On Sun, Jan 11, 2009 at 9:24 PM, code_android_festival_way festival.s...@googlemail.com wrote: Hello. At the moment I'm trying to register/set two alarms that open up a background service. Both alarms should open up the same service doing something depending on the extras that come with the intent. (the alarms have different startup and interval values) Why can't I do that. I get only one alarm registered. Do I really have to implement two services (which do nearly the same) for that to work? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 -~--~~~~--~~--~--~---