[android-developers] Re: MediaPlayer in 0.9?
With SDK 0.9 beta, MediaPlayer plays from the application's data area, provided that proper paths are used (the Android conventions appear here a bit inconsistent concerning when to include the full path, and when one must use only the filename). I use this all the time and it works just fine, although for efficiency reasons I'd much prefer keeping all information in memory like one can with J2ME (Java ME), because I fear that read/write to flash on actual phones will be so slow as to give noticeable audio hiccups that one does not get with the emulator on a fast PC. E.g., write using openFileOutput(myfile.wav, Context.MODE_WORLD_READABLE | Context.MODE_WORLD_WRITEABLE); Play using MediaPlayer with setDataSource(/data/data/mypackage/files/myfile.wav); Regards On Sep 1, 3:17 am, Steve Oldmeadow [EMAIL PROTECTED] wrote: Where are you storing the file? There is a change with the MediaPlayer where it can't open files in the application's data area for security reasons. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get the location provider's status?
A registered LocationListener object is triggered (onStatusChanged function) when location provider status changes. I don't know if this is the only way to manage that but you can give it a try. On 1 sep, 11:55, Ernest [EMAIL PROTECTED] wrote: In the new SDK,the api 'LocationManager.getProviderStatus(String provider)' is removed.So how to get the location provider's status? I found that the constants 'AVAILABLE,OUT_OF_SERVICE , TEMPORARILY_UNAVAILABLE ' are still in LocationProvider of new SDK ,but how to use them?Thank you very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problems working with Mocked Location providers
There already several topics dealing about that problem, I found no solution but some claim to have made it work... Here some threads to check out: http://groups.google.com/group/android-developers/browse_thread/thread/32c0e799290b4854/a380d181eb3e3165 http://groups.google.com/group/android-developers/browse_thread/thread/7e56400d349817b/aa7b76717adbf570 http://groups.google.com/group/android-developers/browse_thread/thread/2b71c14f34dd8788/8dfbec0772d60ba2 http://groups.google.com/group/android-beginners/browse_thread/thread/6b4ce993023d4574/f0b124bb001bcc28 On 1 sep, 15:29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I am having problems with mocked location providers with Android 0.9. If I understand correctly the only way an application is able to receive location updates is from telnet, using geo commands, right? Is there a way to reading programmatically track data from a kml file as before? I tried with ddms tool but I got only the (0,0,0) location. If so, can you confirm that is currently no more possible to move along a path automatically as before? Thanks for you support. Best regards Stefano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to display a local image in the browser android
I want to display a image in with WebView ,in m5 it can display a image WebView wv; wv = (WebView) findViewById(R.id.wv1); wv.loadData(img src=\file:///android_asset/p1.jpg\, mimeType, encoding); but in sdk 0.9 it can't display the image! -- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer in 0.9?
blindfold wrote: [...] openFileOutput(myfile.wav, Context.MODE_WORLD_READABLE | Context.MODE_WORLD_WRITEABLE); Play using MediaPlayer with setDataSource(/data/data/mypackage/files/myfile.wav); I bet the problem (or possibly feature) is that MediaPlayer doesn't run with app privileges, and so can't read application-owned files unless they're o+r (which is what WORLD_READABLE maps to). My files were being created with the default umask. -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
Well, it isn't an easter egg, but most of the wallpapers and sample pictures included in the emulator are from Romain Guy, one of the engineers of the Android team (http://www.flickr.com/photos/ romainguy/) I think he could make a living as a photographer if he leaves Google ;) On Sep 1, 5:10 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: When taking a picture with the camera, the resulting image is a guy at the coffee machine (surely a google employee). Have you seen other easter eggs in v0.9 ? There is a Malmo in the clock, this is a town which has a clock tower... In the APIDemos, many images show the same dog, will it soon become some kind of mascot such as the google dog ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Comming back to your application from a phone call
Hello, I have a problem with the new android 0.9 version. In the previous version when I lauch from my application the execution comes back to my application after I finish the call. But with the new version a Call log application appears, I need to press the back button to return to my application. How can I come back to my application automatically once the call has ended? I'm launching the call in this way: runOnUiThread(new Runnable() { public void run() { Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(telUri)); startActivity(intent); } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RelativeLayout in ListView item
Spencer Riddering wrote: On Sep 2, 1:53 am, Mark Murphy [EMAIL PROTECTED] wrote: Spencer Riddering wrote: Notice how only the lower half of Left Center is displayed. Also, notice that Upper is not displayed. Can someone confirm that this is a bug or point out my mistake? I think the point behind RelativeLayout is for you to be placing widgets relative to other widgets. You're not doing that here, other than your two centering statements. Except that I am: layout_alignParentLeft=true and android:layout_centerInParent=true Ah, sorry, missed the alignParentLeft in the first one. Damn allergies are making my brain foggy... I'm not sure why this is relevant. Considering you're asking why part of a potentially-overlapping pair of widgets is not displayed, I would think the fact they potentially overlap might be relevant. You seem to have missed the problem entirely. That's likely. My apologies for wasting your time. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to display a local image in the browser android
yu.hj wrote: I want to display a image in with WebView ,in m5 it can display a image WebView wv; wv = (WebView) findViewById(R.id.wv1); wv.loadData(img src=\file:///android_asset/p1.jpg\, mimeType, encoding); but in sdk 0.9 it can't display the image! You cannot load files into the WebView from the local filesystem, for security reasons, starting in the 0.9 SDK. If all you want to do is display an image, I recommend just using the ImageView widget. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] 2 tier view of tab list
ciao, do you know it's possible to set multi-tier view of tab host? Because sideway width of tab host is fixed (meaning there is no sideways scroll), I want to add multi-tab host view.. Thank yuo so much --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Start an activity without declaring it in manifest file
Hi guys, I have a project in which I have to start an activity which is not declared in AndroidManifest.xml. Is that possible to register an activity dynamically by code? Or is it possible to overwrite the AndroidManifest.xml from an installed .apk or to replace it without reinstalling the .apk on the emulator? Any help will be highly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: unable to open AndroidManifest.xml
i have the same problem with u, at the beginning it works well, but later comes to the same result can anybody give a help? On Aug 21, 12:24 am, walterc [EMAIL PROTECTED] wrote: am i the only one having this problem? i've reinstalled eclipse 3.4 twice and during both times, the editor worked in the beginning but cease to function after restart. please help! On Aug 20, 11:56 am, walterc [EMAIL PROTECTED] wrote: i am using the new sdk (0.9 beta) and was unable to open AndroidManifest.xml. i am developing on a mbp with eclipse 3.4 and the jvm is 1.5. the following is the exception: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.android.ide.eclipse.editors (208). at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java: 125) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java: 427) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java: 193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java: 368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java: 444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java: 397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java: 385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java: 87) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java: 313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java: 227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java: 1274) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java: 160) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java: 867) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java: 243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java: 51) at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java: 267) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java: 70) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java: 263) at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java: 233) at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java: 846) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java: 606) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java: 428) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java: 594) at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java: 263) at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java: 1410) at org.eclipse.ui.internal.EditorManager $5.runWithException(EditorManager.java:944) at org.eclipse.ui.internal.StartupThreading $StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java: 133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java: 3338) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3067) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java: 803) at org.eclipse.ui.internal.Workbench $27.runWithException(Workbench.java:1361) at org.eclipse.ui.internal.StartupThreading $StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java: 133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java: 3338) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3067) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at
[android-developers] Irda support
Hello, I was wondering whether Android will support any infrared connectivity - since the bluetooth API will be fairly limited. I couln't find any information on that. 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RelativeLayout in ListView item
Spencer Riddering wrote: You seem to have missed the problem entirely. Please compile next time. I did you one better. I wrote up a whole blog post on my diagnostic steps: http://androidguys.com/2008/09/02/diagnosing-layout-problems/ The upshot is that I fixed the problem with the stacked Upper/Lower TextViews, but I can't figure out what's up with the Left Center one. As I wrote in the post, it could be a bug, or it could be that RelativeLayout is just plain unintuitive to me. I transcoded the layout into one using pure LinearLayouts at the end, which gets you something that is *almost* what you need. Sorry that I was unable to completely resolve your issue. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Start an activity without declaring it in manifest file
semaka wrote: I have a project in which I have to start an activity which is not declared in AndroidManifest.xml. Is that possible to register an activity dynamically by code? Not that I'm aware of. Or is it possible to overwrite the AndroidManifest.xml from an installed .apk or to replace it without reinstalling the .apk on the emulator? Not that I'm aware of. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-use the photo picker activity in my application
Thanks Megha - it started working when I relaunched Android - I have no idea why it wasn't working before - I definitely had the SD card installed because I was selecting from images on the SD card in the photo picker. On Aug 29, 5:28 pm, Megha Joshi [EMAIL PROTECTED] wrote: Did you launch this with sdcard installed? Are there any Pictures in your Pictures app? If not, you should install sdcard, take pictures from the Camera app and then try app. I tried executing your code and onActivityResult() is being called. I tested it on Linux, but the OS shouldn't matter in this case. When your app launches the Pictures application, pick a picture and you should see the logcat output of Got the result... 2008/8/29 Cheryl Sedota [EMAIL PROTECTED] Hi, I have some code that attempts to invoke the photo picker activity for result. I can successfully launch the photo picker activity, but my activity does not receive a result at all (onActivityResult() is never called). Can anyone help? Thanks!!! - Cheryl [EMAIL PROTECTED] public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.pick_button); button.setOnClickListener(new View.OnClickListener() { [EMAIL PROTECTED] public void onClick(View view) { Log.i(TAG, Trying to start the photo picker activity); Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); // Intent photoPickerIntent = new // Intent(Intent.ACTION_GET_CONTENT); photoPickerIntent.setType(image/*); startActivityForResult(photoPickerIntent, 1); } }); } [EMAIL PROTECTED] protected void onActivityResult(int i, int j, Intent intent) { super.onActivityResult(i, j, intent); // TODO: figure out why this method never gets invoked Log.i(TAG, Got the result: + intent.getDataString()); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
Other easter eggs: * Sensor manager includes constants for GRAVITY_DEATH_STAR_I , GRAVITY_THE_ISLAND , and a SENSOR_TRICORDER : http://code.google.com/android/reference/android/hardware/SensorManager.html * In the release notes for the 0.9 SDK: We regret to inform developers that Android 1.0 will not support 3.5 floppy disks. http://code.google.com/android/RELEASENOTES.html Peli On Sep 2, 12:47 pm, qvark [EMAIL PROTECTED] wrote: Well, it isn't an easter egg, but most of the wallpapers and sample pictures included in the emulator are from Romain Guy, one of the engineers of the Android team (http://www.flickr.com/photos/ romainguy/) I think he could make a living as a photographer if he leaves Google ;) On Sep 1, 5:10 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: When taking a picture with the camera, the resulting image is a guy at the coffee machine (surely a google employee). Have you seen other easter eggs in v0.9 ? There is a Malmo in the clock, this is a town which has a clock tower... In the APIDemos, many images show the same dog, will it soon become some kind of mascot such as the google dog ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
The guy with the coffee cup is from the movie Office Space. On Tue, Sep 2, 2008 at 10:28 AM, Peli [EMAIL PROTECTED] wrote: Other easter eggs: * Sensor manager includes constants for GRAVITY_DEATH_STAR_I , GRAVITY_THE_ISLAND , and a SENSOR_TRICORDER : http://code.google.com/android/reference/android/hardware/SensorManager.html * In the release notes for the 0.9 SDK: We regret to inform developers that Android 1.0 will not support 3.5 floppy disks. http://code.google.com/android/RELEASENOTES.html Peli On Sep 2, 12:47 pm, qvark [EMAIL PROTECTED] wrote: Well, it isn't an easter egg, but most of the wallpapers and sample pictures included in the emulator are from Romain Guy, one of the engineers of the Android team (http://www.flickr.com/photos/ romainguy/) I think he could make a living as a photographer if he leaves Google ;) On Sep 1, 5:10 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: When taking a picture with the camera, the resulting image is a guy at the coffee machine (surely a google employee). Have you seen other easter eggs in v0.9 ? There is a Malmo in the clock, this is a town which has a clock tower... In the APIDemos, many images show the same dog, will it soon become some kind of mascot such as the google dog ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to Send SMS?
You can use the SmsManager class to send SMS messages. The docs are located here: http://code.google.com/android/reference/android/telephony/gsm/SmsManager.html. -Jeff On Mon, Sep 1, 2008 at 4:15 AM, Dj [EMAIL PROTECTED] wrote: Hi all Any budy know how to send SMS. Plz give any example or link 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Audio cache strategies
This is exactly the sort of problems my application (http:// five.googlecode.com) must contend with, and unfortunately I have came to the conclusion that for 1.0, Android will simply not be able to support our type of application. Their current official recommendation is to work around this by constructing your own local HTTP server to both stream and cache (tee) the proxied content. Even ignoring the enormous overhead this introduces it still won't work. There are yet more problems lurking in the MediaPlayer which prevent applications which need information about the buffering heuristics built into the system. For instance, the MediaPlayer.OnBufferingUpdateListener class can supposedly be used to detect when the buffer is full (playback has begun), when it becomes empty again (playback chokes), and everywhere in between so the application using it can provide essential feedback to the user. I constructed simple tests which clearly demonstrate that onBufferUpdate is fired with entirely different metrics that I cannot understand, but clearly do not represent buffer fill percentage. In my tests, playback started anywhere from 5% to 25% buffer fill percentage, though it seemed more like the buffer fill percentage was total file progress (but not quite). Likewise, the buffer fill percentage never declines, so it isn't possible to detect when a song chokes. Once open sourced, I will be working to fix the broken MediaPlayer so hopefully I can target a 1.1 release without waiting on Google to fix this set of classes. Would've been really nice to have a heads up that maybe the MediaPlayer brokenness from back in M5 was not a top priority and was unlikely to make it into 1.0. On Sep 1, 3:05 pm, David Given [EMAIL PROTECTED] wrote: I'm currently working on a custom audio player app for an online music site. It has the following main requirements: a) I need to be able to play music without waiting for it to download. b) I wish to cache the music locally so that the user's favourite tracks don't need to be downloaded again. Currently my strategy is to download the files locally and discard the oldest ones when I need more space, keeping all the metadata in an associated SQLite database; but this approach is rather problematic and very brittle due to having to keep the database and the files in sync, issues with ensuring that a file isn't removed when something else is wanting to use it, etc. Not the least of which is that caching entire files means using up rather a lot of disk space --- some of my music files can be 15MB+. Also, MediaPlayer appears to be very picky as to what it plays from: it insists on playing from a file, or at least a file descriptor, and when you start playing it measures the length of the file and won't play past the end point, which is a bit of a problem if you haven't finished writing it yet. At least 0.9 has fixed the issue where getDuration() used to calculate the duration of the media based on the physical file length. Can anyone suggest any alternative approaches to doing this? What I'd *really* like to do is to be able to store my entire cache in a single huge fixed-size file, optionally on the SD card, and stream fragments directly to MediaPlayer; but I don't think that's possible and Java would probably be too slow anyway. Alternatively, a block-level cacheing HTTP proxy would do almost as well. Does Android have one? -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ All power corrupts, but we need electricity. --- Diana Wynne Jones, │ _Archer's Goon_ signature.asc 1KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Audio cache strategies
Josh Guilfoyle wrote: This is exactly the sort of problems my application (http:// five.googlecode.com) must contend with, and unfortunately I have came to the conclusion that for 1.0, Android will simply not be able to support our type of application. Oh, dear. [...] I constructed simple tests which clearly demonstrate that onBufferUpdate is fired with entirely different metrics that I cannot understand, but clearly do not represent buffer fill percentage. In my tests, playback started anywhere from 5% to 25% buffer fill percentage, though it seemed more like the buffer fill percentage was total file progress (but not quite). Likewise, the buffer fill percentage never declines, so it isn't possible to detect when a song chokes. Is that on m5 or 0.9? I know there are a lot of bugs that have been fixed in 0.9 (and still some to go...). Also, how well does MediaPlayer work streaming off the real internet? Is the buffering effective? -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can get the source code of the embedded app Pictures?
Hi All, I like this app very much, and want to add some SNS features to it. How/Where can I get the source code of the embedded app Pictures? Or maybe I should wait for google open source all of android. Thanks. Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
It is funny that only Death Star and Island gravity are known to 6 digits while the planets of our solar system only have 2 digit accuracy. GRAVITY_DEATH_STAR_I =3.5303614E-7 GRAVITY_THE_ISLAND =4.815162 There must be some hidden code in there. I guess the first person to crack that gets a job offered at Google :-) Peli On Sep 2, 5:12 pm, jtaylor [EMAIL PROTECTED] wrote: This Death Star and Island Sensor stuff is for games right? To create artificial sensors for Games? - Juan T. On Sep 2, 10:28 am, Peli [EMAIL PROTECTED] wrote: Other easter eggs: * Sensor manager includes constants for GRAVITY_DEATH_STAR_I , GRAVITY_THE_ISLAND , and a SENSOR_TRICORDER :http://code.google.com/android/reference/android/hardware/SensorManag... * In the release notes for the 0.9 SDK: We regret to inform developers that Android 1.0 will not support 3.5 floppy disks. http://code.google.com/android/RELEASENOTES.html Peli On Sep 2, 12:47 pm, qvark [EMAIL PROTECTED] wrote: Well, it isn't an easter egg, but most of the wallpapers and sample pictures included in the emulator are from Romain Guy, one of the engineers of the Android team (http://www.flickr.com/photos/ romainguy/) I think he could make a living as a photographer if he leaves Google ;) On Sep 1, 5:10 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: When taking a picture with the camera, the resulting image is a guy at the coffee machine (surely a google employee). Have you seen other easter eggs in v0.9 ? There is a Malmo in the clock, this is a town which has a clock tower... In the APIDemos, many images show the same dog, will it soon become some kind of mascot such as the google dog ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using the ItemizedOverlay and OverlayItem
Marcel, Thanks for that seems to work as you described. The only thing that doesn't seem right is the way the map draws the markers shadow. Any idea on how to correct that. Thanks. On Mon, Sep 1, 2008 at 2:03 PM, marcel-182 [EMAIL PROTECTED] wrote: Hi everyone, I finally got this thing working. Just set the bounds of the marker to be drawn and that's it! Sample: Drawable defaultMarker = getResources().getDrawable(R.drawable.map_marker_red); defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(), defaultMarker.getIntrinsicHeight()); mMapView.getOverlays().add(new DemoOverlay(defaultMarker)); // DemoOverlay is of course an ItemizedOverlay I made a small demo showing one OverlayItem and how to handle tap- events. If someone is interested: http://www.marcelp.info/2008/09/01/android-itemizedoverlay-demo/ Regards, Marcel -- ~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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
GRAVITY_THE_ISLAND = 4.815162 4 8 15 16 23 42 First riddle solved: These are the cursed numbers from the TV series Lost. http://forum.worldwindcentral.com/showthread.php?t=2462 http://www.4815162342.com/ Now we know which island was really meant :-) (see discussion here: http://groups.google.com/group/android-developers/browse_frm/thread/99269e5a52aafa8d ) Peli :-) There must be some hidden code in there. I guess the first person to crack that gets a job offered at Google :-) Peli On Sep 2, 5:12 pm, jtaylor [EMAIL PROTECTED] wrote: This Death Star and Island Sensor stuff is for games right? To create artificial sensors for Games? - Juan T. On Sep 2, 10:28 am, Peli [EMAIL PROTECTED] wrote: Other easter eggs: * Sensor manager includes constants for GRAVITY_DEATH_STAR_I , GRAVITY_THE_ISLAND , and a SENSOR_TRICORDER :http://code.google.com/android/reference/android/hardware/SensorManag... * In the release notes for the 0.9 SDK: We regret to inform developers that Android 1.0 will not support 3.5 floppy disks. http://code.google.com/android/RELEASENOTES.html Peli On Sep 2, 12:47 pm, qvark [EMAIL PROTECTED] wrote: Well, it isn't an easter egg, but most of the wallpapers and sample pictures included in the emulator are from Romain Guy, one of the engineers of the Android team (http://www.flickr.com/photos/ romainguy/) I think he could make a living as a photographer if he leaves Google ;) On Sep 1, 5:10 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: When taking a picture with the camera, the resulting image is a guy at the coffee machine (surely a google employee). Have you seen other easter eggs in v0.9 ? There is a Malmo in the clock, this is a town which has a clock tower... In the APIDemos, many images show the same dog, will it soon become some kind of mascot such as the google dog ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using the ItemizedOverlay and OverlayItem
No, I don't know how to change that behavior. But if you don't like the shadow just disable it :-): @Override public void draw(Canvas pCanvas, MapView pMapView, boolean pShadow) { super.draw(pCanvas, pMapView, false); } On 2 Sep., 18:03, Chris Chiappone [EMAIL PROTECTED] wrote: Marcel, Thanks for that seems to work as you described. The only thing that doesn't seem right is the way the map draws the markers shadow. Any idea on how to correct that. Thanks. On Mon, Sep 1, 2008 at 2:03 PM, marcel-182 [EMAIL PROTECTED] wrote: Hi everyone, I finally got this thing working. Just set the bounds of the marker to be drawn and that's it! Sample: Drawable defaultMarker = getResources().getDrawable(R.drawable.map_marker_red); defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(), defaultMarker.getIntrinsicHeight()); mMapView.getOverlays().add(new DemoOverlay(defaultMarker)); // DemoOverlay is of course an ItemizedOverlay I made a small demo showing one OverlayItem and how to handle tap- events. If someone is interested: http://www.marcelp.info/2008/09/01/android-itemizedoverlay-demo/ Regards, Marcel -- ~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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Irda support
No support for irda in 1.0. On Sep 1, 11:46 pm, defrit [EMAIL PROTECTED] wrote: Hello, I was wondering whether Android will support any infrared connectivity - since the bluetooth API will be fairly limited. I couln't find any information on that. 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Comming back to your application from a phone call
This has nothing to do with your application, it is how the UI is designed to work. I don't believe there is any way to modify it. On Sep 2, 4:16 am, Jose María González [EMAIL PROTECTED] wrote: Hello, I have a problem with the new android 0.9 version. In the previous version when I lauch from my application the execution comes back to my application after I finish the call. But with the new version a Call log application appears, I need to press the back button to return to my application. How can I come back to my application automatically once the call has ended? I'm launching the call in this way: runOnUiThread(new Runnable() { public void run() { Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(telUri)); startActivity(intent); } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Sensor values returned by tricorder
Of course, that depends on where The Island is. Given the value, I suspect you have the wrong island. At the moment, the island matching the listed value is, um, lost. Now I got it :-) The value is the secret number from lost. http://www.4815162342.com/ GRAVITY_THE_ISLAND = 4.815162 I have to admit I have not seen the series, so that made recognizing this number more difficult :-) Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Audio cache strategies
These tests were against 0.9, and I have complained loudly about it with any Google engineer that would listen. The outlook looks bleak to get these fixes in for 1.0. Also, in my tests, the MediaPlayer buffers poorly. It seems to take 2 - 5 seconds to even gear up and make a connection for some reason, and then it seems to buffer more than is necessary in certain circumstances. I'd like to load a simple test up on the HTC Vogue and see what more I can learn about how 0.9 behaves on real hardware. On Sep 2, 8:44 am, David Given [EMAIL PROTECTED] wrote: Josh Guilfoyle wrote: This is exactly the sort of problems my application (http:// five.googlecode.com) must contend with, and unfortunately I have came to the conclusion that for 1.0, Android will simply not be able to support our type of application. Oh, dear. [...] I constructed simple tests which clearly demonstrate that onBufferUpdate is fired with entirely different metrics that I cannot understand, but clearly do not represent buffer fill percentage. In my tests, playback started anywhere from 5% to 25% buffer fill percentage, though it seemed more like the buffer fill percentage was total file progress (but not quite). Likewise, the buffer fill percentage never declines, so it isn't possible to detect when a song chokes. Is that on m5 or 0.9? I know there are a lot of bugs that have been fixed in 0.9 (and still some to go...). Also, how well does MediaPlayer work streaming off the real internet? Is the buffering effective? -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] now that nothing interesting can be done with audio in 1.0...
That is, no reading from any kind of byte stream, ie. AudioInputStream, when can we expect this promised functionality. It's the one thing that really interested me in Android and I'm really sorry to see it go. Any ETA or news about when this will become available? I haven't seen anything in the road map beyond the 1.0 release. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
Mark, Shouldn't you be updating your book :) On Sep 2, 12:48 pm, Mark Murphy [EMAIL PROTECTED] wrote: Peli wrote: Now we know which island was really meant :-) (see discussion here:http://groups.google.com/group/android-developers/browse_frm/thread/9... ) Aw, c'mon! At the moment, the island matching the listed value is, um, lost wasn't a big enough clue? ;-) -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: All titles, revisions, ebook formats, just $35/year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
[EMAIL PROTECTED] wrote: Shouldn't you be updating your book :) Sheesh! Tough crowd! -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: All titles, revisions, ebook formats, just $35/year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 0.9 and simple database management issue ? [SOLVED]
Hi, I am having the same problem here. It is the getWritableDatabase() that fails showing the following error: sqlite3_open_v2(/data/data/com.powwau.gtd.android/databases/gtd, handle, 6, NULL) failed I have been porting my app from m5 to 0.9 and followed the Notepad tutorial. Any ideas? Thanks. Jorge On Aug 21, 8:07 pm, Megha Joshi [EMAIL PROTECTED] wrote: You shouldn't have to change the database directory permissions manually...getWritableDatabase() should do that for you. Infact that is what it does in the Notepad tutorial. I don't see the create database script being executed from your DBHelper.onCreate() method. Is this database being created in the same app that you are using it from? On Thu, Aug 21, 2008 at 2:31 AM, 6real [EMAIL PROTECTED] wrote: Actually the issu was ...; in the rights attributed to the databases directory !!! I have changed the right thanks to a chmod 777 and now it works fine ! I don't understand which user is used when laucnhing the app but my issu is solved. I hope I wont have the same issu on final telephone ! 6real wrote: Still not work :-( I have changes the method to copy the tutorial. Actually it seems the onCreate method is never called, even when I call getWritable or getReadable ! I saw this behaviour thanks to breakpoints in debug mode. Nobody as such issues ? On Aug 21, 9:17 am, 6real [EMAIL PROTECTED] wrote: Thanks! I am gonna watch. I didn't know that. Rgds C. On Aug 20, 11:43 pm, Megha Joshi [EMAIL PROTECTED] wrote: Can you compare your code against the NotePad tutorial and see , NotePad tutorial uses SQliteOpenHelper... On Wed, Aug 20, 2008 at 11:10 AM, 6real [EMAIL PROTECTED] wrote: Dear all, I am facing an issue (probably simple to solve!) while migrating my app under the last 0.9. Before I was creating and then opening a database. In teh doc I read I saw that now I need to create a class that inheriths from SQLiteOpenHelper. This is what I have done (anonymous class inside a new one) : -- class MyDBHelper extends SQLiteOpenHelper { public MyDBHelper(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); } public void onCreate(SQLiteDatabase db) { return; } public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { return; } } Then I instanciate this class dbHelper = new MyDBHelper(launched, Constant.DB_DATABASE_NAME, null, Constant.DB_VERSION); - Now comes the issue, I'd like to execute a SQL request to my DB : myDB = dbHelper.getWritableDatabase(); myDB.execSQL(DELETE FROM + Constant.DB_TABLE_STATIONS + WHERE + Constant.DB_FIELD_S_NETWORK + =' + network + ';); And I have this error ? 08-20 18:07:41.119: ERROR/Database(172): sqlite3_open_v2(/data/data/ com.xirgonium.android/databases/myDB, handle, 6, NULL) failed -- Do you have an idea of the origin ?? Thanks a lot for your help ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: inserting email address into ContactMethods table in 0.9 beta
It's not a failure, it's just that 0 addresses are added. On Aug 29, 6:53 pm, Jeff Hamilton [EMAIL PROTECTED] wrote: Does anything show up in the log when you see the failure? -Jeff On Fri, Aug 29, 2008 at 6:50 PM, kingkung [EMAIL PROTECTED] wrote: Slightly confusing code... the ContentValues properties (below) are set in the method generateAddressCVarray(), which generates an array of CVs for each email address... cv = new ContentValues(); cv.put(ContactMethods.KIND,KIND_EMAIL); //KIND_EMAIL is an integer (1) cv.put(ContactMethods.PERSON_ID, ac.mobileID); //long cv.put(ContactMethods.DATA, email.value); //string cv.put(ContactMethods.TYPE, email.type); //integer btwn 0-3 ... The following line is then called for a bulkInsert... and the rows always come out as 0. Even if I insert them one at a time, I get the same result. int rows = context.getContentResolver().bulkInsert(getMethodUri(personUri),generateAddressCVarray(ac)); Logger.log(rows); private static Uri getMethodUri(Uri contactUri) { return contactUri.buildUpon().appendPath(ContactMethods.CONTENT_URI.getLastPathSegment()).build(); } Can anyone help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] opening H264 file in binary format
anybody can help me how to open h264 video file in binary format? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Port JSON client to SDK 0.9
If I can acess my web service trough this link what should the String in the httpget constructior be? i have the following but i always get an axception and its alwas an Unknown error. This is calling a .NET web service in my local machine. HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet(http://172.17.1.132/WSAndroidTest3/ Service.asmx/HelloWorld); try { HttpResponse httpResponse = client.execute(get); The error comes up in the cliente.execute(get); Thanks in advance for the help. On Aug 22, 2:05 pm, Megha Joshi [EMAIL PROTECTED] wrote: You were on the right track in porting your code...I updated the rest of your code to work with the new Http library...hope this helps! HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet(http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org: col:15670); try { HttpResponse httpResponse = client.execute(get); String res=; if(httpResponse.getStatusLine().getStatusCode()!=404){ res= EntityUtils.toString(httpResponse.getEntity()); // String temp = res.substring(9); temp = temp.replace(), ); JSONArray jarray = new JSONArray(temp); int i=0; String key=; JSONObject objs = new JSONObject(); objs = jarray.getJSONObject(i); key=objs.getString(size); uname.setText(temp); }else uname.setText(nothing found); } catch (Exception e) { //Log.e(Error:,e.getMessage()); uname.setText(fault: +e.getLocalizedMessage()); } finally { get.abort(); get=null; } On Fri, Aug 22, 2008 at 12:47 AM, Baran [EMAIL PROTECTED] wrote: Hi, I have this code that was running successfully on m5 SDK. Now I need to port the same to SDK 0.9. Till now I have successfully called the web service, but now sure how to proceed further...the codes are as below: On SDK m5 HttpClient client = new HttpClient(); GetMethod get = new GetMethod(http://www.biocol.org/json/ fetch/lsid/urn:lsid:biocol.org:col:15670http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org:col:15670 ); try { int status = client.executeMethod(get); String res=; if(status!=404){ res=get.getResponseBodyAsString(); // uname.setText(m here+status+res); String temp = res.substring(9); temp = temp.replace(), ); JSONArray jarray = new JSONArray(temp); int i=0; String key=; JSONObject objs = new JSONObject(); objs = jarray.getJSONObject(i); key=objs.getString(size); uname.setText(temp); }else uname.setText(nothing found); } catch (Exception e) { //Log.e(Error:,e.getMessage()); uname.setText(fault: +e.getLocalizedMessage()); } finally { get.releaseConnection(); get=null; } And on SDK 0.9 DefaultHttpClient client= new DefaultHttpClient(); HttpGet get = new HttpGet(http://www.biocol.org/json/ fetch/lsid/urn:lsid:biocol.org:col:15670http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org:col:15670 ); HttpResponse resp; resp = client.execute(get); I am not sure about where they have moved the API methods and how to retrieve the output as string so that I can parse it using JSON... Any help would be great- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Port JSON client to SDK 0.9
I have just double checked and i always get a SocketException with an Unknown error Detailed messase. Do you have any idea what could it be? Thanks Francisco Ortega On Sep 2, 10:52 am, Francisco [EMAIL PROTECTED] wrote: If I can acess my web service trough this link what should the String in the httpget constructior be? i have the following but i always get an axception and its alwas an Unknown error. This is calling a .NET web service in my local machine. HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet(http://172.17.1.132/WSAndroidTest3/ Service.asmx/HelloWorld); try { HttpResponse httpResponse = client.execute(get); The error comes up in the cliente.execute(get); Thanks in advance for the help. On Aug 22, 2:05 pm, Megha Joshi [EMAIL PROTECTED] wrote: You were on the right track in porting your code...I updated the rest of your code to work with the new Http library...hope this helps! HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet(http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org: col:15670); try { HttpResponse httpResponse = client.execute(get); String res=; if(httpResponse.getStatusLine().getStatusCode()!=404){ res= EntityUtils.toString(httpResponse.getEntity()); // String temp = res.substring(9); temp = temp.replace(), ); JSONArray jarray = new JSONArray(temp); int i=0; String key=; JSONObject objs = new JSONObject(); objs = jarray.getJSONObject(i); key=objs.getString(size); uname.setText(temp); }else uname.setText(nothing found); } catch (Exception e) { //Log.e(Error:,e.getMessage()); uname.setText(fault: +e.getLocalizedMessage()); } finally { get.abort(); get=null; } On Fri, Aug 22, 2008 at 12:47 AM, Baran [EMAIL PROTECTED] wrote: Hi, I have this code that was running successfully on m5 SDK. Now I need to port the same to SDK 0.9. Till now I have successfully called the web service, but now sure how to proceed further...the codes are as below: On SDK m5 HttpClient client = new HttpClient(); GetMethod get = new GetMethod(http://www.biocol.org/json/ fetch/lsid/urn:lsid:biocol.org:col:15670http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org:col:15670 ); try { int status = client.executeMethod(get); String res=; if(status!=404){ res=get.getResponseBodyAsString(); // uname.setText(m here+status+res); String temp = res.substring(9); temp = temp.replace(), ); JSONArray jarray = new JSONArray(temp); int i=0; String key=; JSONObject objs = new JSONObject(); objs = jarray.getJSONObject(i); key=objs.getString(size); uname.setText(temp); }else uname.setText(nothing found); } catch (Exception e) { //Log.e(Error:,e.getMessage()); uname.setText(fault: +e.getLocalizedMessage()); } finally { get.releaseConnection(); get=null; } And on SDK 0.9 DefaultHttpClient client= new DefaultHttpClient(); HttpGet get = new HttpGet(http://www.biocol.org/json/ fetch/lsid/urn:lsid:biocol.org:col:15670http://www.biocol.org/json/fetch/lsid/urn:lsid:biocol.org:col:15670 ); HttpResponse resp; resp = client.execute(get); I am not sure about where they have moved the API methods and how to retrieve the output as string so that I can parse it using JSON... Any help would be great- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: RelativeLayout in ListView item
Hi Mark, Thanks, I really like your post. I actually started out using LinearLayout but I ran into the same centering problem that you ended your post on. It was my obsession with centering Upper and Lower horizontally across the entire list item that drove me to RelativeLayout. I've finally achieved the layout I was looking for, but I had to use FrameLayout to do it. See below. I'm thinking that TableLayout may also be suitable but I haven't had time to try it out. Spencer Riddering ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content TextView android:text=Left Center android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=center_vertical / LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical android:layout_gravity=center TextView android:text=Upper android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=center_horizontal android:layout_weight=1 / TextView android:text=Lower android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=center_horizontal android:layout_weight=1 / /LinearLayout /FrameLayout On Sep 2, 10:20 pm, Mark Murphy [EMAIL PROTECTED] wrote: Spencer Riddering wrote: You seem to have missed the problem entirely. Please compile next time. I did you one better. I wrote up a whole blog post on my diagnostic steps: http://androidguys.com/2008/09/02/diagnosing-layout-problems/ The upshot is that I fixed the problem with the stacked Upper/Lower TextViews, but I can't figure out what's up with the Left Center one. As I wrote in the post, it could be a bug, or it could be that RelativeLayout is just plain unintuitive to me. I transcoded the layout into one using pure LinearLayouts at the end, which gets you something that is *almost* what you need. Sorry that I was unable to completely resolve your issue. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! http://spencer.riddering.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Easter eggs
Aw, c'mon! At the moment, the island matching the listed value is, um, lost wasn't a big enough clue? Yes, but I didn't get it in the first place :-) I've never seen the show. Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 0.9 and simple database management issue ? [SOLVED]
emulator -wipe-data solved it. Thanks. Jorge On Sep 2, 7:18 pm, Jorge D Ortiz [EMAIL PROTECTED] wrote: Hi, I am having the same problem here. It is the getWritableDatabase() that fails showing the following error: sqlite3_open_v2(/data/data/com.powwau.gtd.android/databases/gtd, handle, 6, NULL) failed I have been porting my app from m5 to 0.9 and followed the Notepad tutorial. Any ideas? Thanks. Jorge On Aug 21, 8:07 pm, Megha Joshi [EMAIL PROTECTED] wrote: You shouldn't have to change the database directory permissions manually...getWritableDatabase() should do that for you. Infact that is what it does in the Notepad tutorial. I don't see the create database script being executed from your DBHelper.onCreate() method. Is this database being created in the same app that you are using it from? On Thu, Aug 21, 2008 at 2:31 AM, 6real [EMAIL PROTECTED] wrote: Actually the issu was ...; in the rights attributed to the databases directory !!! I have changed the right thanks to a chmod 777 and now it works fine ! I don't understand which user is used when laucnhing the app but my issu is solved. I hope I wont have the same issu on final telephone ! 6real wrote: Still not work :-( I have changes the method to copy the tutorial. Actually it seems the onCreate method is never called, even when I call getWritable or getReadable ! I saw this behaviour thanks to breakpoints in debug mode. Nobody as such issues ? On Aug 21, 9:17 am, 6real [EMAIL PROTECTED] wrote: Thanks! I am gonna watch. I didn't know that. Rgds C. On Aug 20, 11:43 pm, Megha Joshi [EMAIL PROTECTED] wrote: Can you compare your code against the NotePad tutorial and see , NotePad tutorial uses SQliteOpenHelper... On Wed, Aug 20, 2008 at 11:10 AM, 6real [EMAIL PROTECTED] wrote: Dear all, I am facing an issue (probably simple to solve!) while migrating my app under the last 0.9. Before I was creating and then opening a database. In teh doc I read I saw that now I need to create a class that inheriths from SQLiteOpenHelper. This is what I have done (anonymous class inside a new one) : -- class MyDBHelper extends SQLiteOpenHelper { public MyDBHelper(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); } public void onCreate(SQLiteDatabase db) { return; } public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { return; } } Then I instanciate this class dbHelper = new MyDBHelper(launched, Constant.DB_DATABASE_NAME, null, Constant.DB_VERSION); - Now comes the issue, I'd like to execute a SQL request to my DB : myDB = dbHelper.getWritableDatabase(); myDB.execSQL(DELETE FROM + Constant.DB_TABLE_STATIONS + WHERE + Constant.DB_FIELD_S_NETWORK + =' + network + ';); And I have this error ? 08-20 18:07:41.119: ERROR/Database(172): sqlite3_open_v2(/data/data/ com.xirgonium.android/databases/myDB, handle, 6, NULL) failed -- Do you have an idea of the origin ?? Thanks a lot for your help ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to Send SMS?
+ sample code: http://groups.google.com/group/android-developers/files 2008/9/2 Jeff Hamilton [EMAIL PROTECTED] You can use the SmsManager class to send SMS messages. The docs are located here: http://code.google.com/android/reference/android/telephony/gsm/SmsManager.html . -Jeff On Mon, Sep 1, 2008 at 4:15 AM, Dj [EMAIL PROTECTED] wrote: Hi all Any budy know how to send SMS. Plz give any example or link 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Start an activity without declaring it in manifest file
As mark has said, nope, its not possible. The manifest registers your application with the system. This is the only way the system becomes aware of executable targets. Cheers, Justin Android Team @ Google On Sep 2, 7:21 am, Mark Murphy [EMAIL PROTECTED] wrote: semaka wrote: I have a project in which I have to start an activity which is not declared in AndroidManifest.xml. Is that possible to register an activity dynamically by code? Not that I'm aware of. Or is it possible to overwrite the AndroidManifest.xml from an installed .apk or to replace it without reinstalling the .apk on the emulator? Not that I'm aware of. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Port JSON client to SDK 0.9
Thanks a Lot Mark! I Finally was able to make it work! i had a while without working with the new SDKs so i didnt know that permission was added. Thank you!. By the way. I am getting a new error now. ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope; xmlns:xsi=http:// www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/ XMLSchemasoap:Bodysoap:Faultsoap:Codesoap:Valuesoap:Receiver/ soap:Value/soap:Codesoap:Reasonsoap:Text xml:lang=enSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---gt; System.Xml.XmlException: Root element is missing. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement() at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Booleanamp; abortProcessing) --- End of inner exception stack trace ---/soap:Text/ soap:Reasonsoap:Detail //soap:Fault/soap:Body/soap:Envelope Do you have any idea why this could be happening? My web service returns the following: ?xml version=1.0 encoding=utf-8 ? string xmlns=http:// tempuri.org/ STKDVTABLEDEF NAME=authorsCOLUMNSCOL NAME=au_id DBTYPE =varchar/COL NAME=au_lname DBTYPE =varchar/COL NAME=au_fname DBTYPE =varchar/COL NAME=phone DBTYPE =varchar/ COL NAME=address DBTYPE =varchar/COL NAME=city DBTYPE =varchar/COL NAME=state DBTYPE =varchar/COL NAME=zip DBTYPE =varchar/COL NAME=contract DBTYPE =integer//COLUMNS ROWSROW C172-32-1176/CCWhite/CCJohnson/CC408 496-7223/ CC10932 Bigge Rd./CCMenlo Park/CCCA/CC94025/CCTrue/ C/ROWROWC213-46-8915/CCGreen/CCMarjorie/CC415 986-7020/CC309 63rd St. #411/CCOakland/CCCA/CC94618/ CCTrue/C /ROW/ROWS/TABLEDEF/STKDV/string On Sep 2, 10:59 am, Mark Murphy [EMAIL PROTECTED] wrote: Francisco wrote: I have just double checked and i always get a SocketException with an Unknown error Detailed messase. Do you have any idea what could it be? Do you have the INTERNET permission in your AndroidManifest.xml? I think that, er, manifests as this error. uses-permission android:name=android.permission.INTERNET / -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: All titles, revisions, ebook formats, just $35/year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bug in Bitmap.compress when used on JPEGs?
Out of all images downloaded, ~10% fail to be written with a NullpointerException Is it always the same images that fail or does the same image work on one run and not another? Cheers, Justin Android Team @ Google On Sep 1, 4:36 am, snowcrash [EMAIL PROTECTED] wrote: Hi there, I experience strange things when using the compress method from Bitmap. I'm useing the code at the bottom to download JPEGs from a server. Out of all images downloaded, ~10% fail to be written with a NullpointerException and a preceding message from something called 'skia'. Each image is different and it doesn't always happen for the same ones: 09-01 13:19:04.126: DEBUG/skia(1124): xx failure to skip request 9936 actual 6906 09-01 13:19:04.132: DEBUG/skia(1124): x jpeg setjump exit 09-01 13:19:04.132: ERROR/ImageUtil(1124): java.lang.NullPointerException If I use the same code on PNGs, all works like a charm. The code used is: public static String saveImageFromURI(URI uri, String name, final Activity ctx, Handler handler) { boolean success = false; String qualifiedName = name + .jpg; FileOutputStream fos = null; try { URL url = uri.toURL(); Bitmap bmp = BitmapFactory.decodeStream(url.openStream()); fos = ctx.openFileOutput(qualifiedName, Context.MODE_PRIVATE); success = bmp.compress(Bitmap.CompressFormat.JPEG, 75, fos); } catch (MalformedURLException e) { Log.e(TAG, e.toString(), e); } catch (IOException e) { Log.e(TAG, e.toString(), e); } catch (IllegalArgumentException e) { Log.e(TAG, e.toString()); } catch (NullPointerException e) { Log.e(TAG, e.toString(), e); } finally { try { if (fos != null) fos.close(); } catch (IOException e) { Log.e(TAG, e.toString(), e); } } if (success) { return qualifiedName; } else { return null; } } Any ideas what could cause this behaviour? snowcrash --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Setting highlight text color (textColorHighlight doesn't do it)
Despite its name, the global textColorHighlight attribute controls the color of the highlight itself, rather than the highlighted text. So if I've got gray text and a dark blue highlight color, it appears as gray on blue, and I can't make the selected text white on blue no matter what I try. None of the inverse text color styles work for this. Any ideas? Cheers, Andrew Dupont --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: inserting email address into ContactMethods table in 0.9 beta
Never mind, my types are set to 0, and there is no 0 type anymore. On Sep 2, 10:21 am, kingkung [EMAIL PROTECTED] wrote: It's not a failure, it's just that 0 addresses are added. On Aug 29, 6:53 pm, Jeff Hamilton [EMAIL PROTECTED] wrote: Does anything show up in the log when you see the failure? -Jeff On Fri, Aug 29, 2008 at 6:50 PM, kingkung [EMAIL PROTECTED] wrote: Slightly confusing code... the ContentValues properties (below) are set in the method generateAddressCVarray(), which generates an array of CVs for eachemailaddress... cv = new ContentValues(); cv.put(ContactMethods.KIND,KIND_EMAIL); //KIND_EMAIL is an integer (1) cv.put(ContactMethods.PERSON_ID, ac.mobileID); //long cv.put(ContactMethods.DATA,email.value); //string cv.put(ContactMethods.TYPE,email.type); //integer btwn 0-3 ... The following line is then called for a bulkInsert... and the rows always come out as 0. Even if I insert them one at a time, I get the same result. int rows = context.getContentResolver().bulkInsert(getMethodUri(personUri),generateAddressCVarray(ac)); Logger.log(rows); private static Uri getMethodUri(Uri contactUri) { return contactUri.buildUpon().appendPath(ContactMethods.CONTENT_URI.getLastPathSegment()).build(); } Can anyone help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaRecord Audio - working example? / raw data stream onPictureTaken()? / Bug in Pictures application?
Please refer to the audio Recording sample code at the link below: http://groups.google.com/group/android-developers/files 2008/8/31 code_android_festival_way [EMAIL PROTECTED] Did you get the Audio recording managed right now? I'm getting the same error again after adding all the fields. It would be pretty nice to have a working example. Because from the docs I can't decide which fields are required and which are just optional. Regards! On 28 Aug., 07:16, Reto Meier [EMAIL PROTECTED] wrote: Hi Justin, I've tried explicitly including the display name (and artist and album) into the new ContentValue but still end up with exactly the same error on the ContentResolver.insert call. On Aug 27, 10:56 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Error: 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content Creation No.5 date_added=1219598838 _display_name= album_id=2 title_key= - E C O 1 C O - K 1 ) O 9 E C C E „ artist_id=3 using INSERT INTO audio_meta(title, date_added, _display_name, album_id, title_key, artist_id) VALUES(?, ?, ?, ?, ?, ?); From the error it jumps out at me that you're not setting MediaStore.Audio.Media.DISPLAY_NAME, which seems like its required. Also, are you setting the ALBUM_ID and ARTIST_ID somehow or are they encoded in the URI you're using? Cheers, Justin Android Team @ Google On Aug 24, 3:20 pm, code_android_festival_way [EMAIL PROTECTED] wrote: I've got two questions. 1) Is there a working example for recording audio with the MediaRecorder? At the moment I'm using the following setup but it doesnt work: http://paste.pocoo.org/show/83242/ Error: 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content Creation No.5 date_added=1219598838 _display_name= album_id=2 title_key= - E C O 1 C O - K 1 ) O 9 E C C E „ artist_id=3 using INSERT INTO audio_meta(title, date_added, _display_name, album_id, title_key, artist_id) VALUES(?, ?, ?, ?, ?, ?); I've tried the example provided in the docs (Media API) but that doesn't work at all. It would be nice if someone could provide a working example. 2) Is it normal that the raw data stream returned by onPictureTaken(...) is null? 3) I'm taking pictures as above mentioned. After that I'm saving the available jpeg stream into the image ContentProvider which works fine. Now I'm leaving my app and try to start the Pictures application from the home screen. And now I get the following error message: http://img.skitch.com/20080824-mrbc7yuhfh7an5ynndj9hm6twp.jpg Here is the error from the logs: 08-25 00:15:34.007: ERROR/AndroidRuntime(220): java.lang.RuntimeException: Unable to resume activity {com.android.camera/com.android.camera.GalleryPicker}: java.lang.NullPointerException I can savely say that I'm calling camera.stopPreview() and camera.release() so there shouldn't be a problem with the camera. What else could be wrong? Here is the part where I'm saving my jpeg byte[] into the ContentProvider: http://paste.pocoo.org/show/83246/ 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getScale replacement for BaseAdapter in 0.9 beta?
Hi Romain Guy, How would I go about doing this? I'd really like to enable two pieces of functionality that were removed in the 0.9 Beta, a smaller scale for the not-in-focus images, and the ability to automatically loop (and rotate through) the gallery. Alpha on the edges would be nice, but I can live without that... Any chance we could get a code sample on what you suggest? Thanks, Chris On Aug 29, 7:42 pm, Romain Guy [EMAIL PROTECTED] wrote: Note that you can build your own replacement by creating a subclass of a ViewGroup and enabling support for children static transformations. On Fri, Aug 29, 2008 at 3:50 PM, Megha Joshi [EMAIL PROTECTED] wrote: The getScale() API was removed from BaseAdapter, because now theGallery widget does not support scaling the focussed item in relation to the other items. No replacement was added. It is recommended that you don't alter the standard behavior of theGallerywidget. Is there any particular reason you want to do this? 2008/8/29 blim [EMAIL PROTECTED] What should we use to replace getScale from BaseAdapter, which has been deprecated in 0.9? I'm trying to use this to scale images in a Galleryview in relation to which item is currently in focus. -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using the ItemizedOverlay and OverlayItem
I got the shadow to draw properly by calling boundCenterBottom(Drawable); @Override public void draw(Canvas arg0, MapView arg1, boolean arg2) { super.draw(arg0, arg1, arg2); MyItemizedOverlay.boundCenterBottom(defaultMarker); } Not sure if this is the right way. But, it is working. On Sep 2, 9:21 am, marcel-182 [EMAIL PROTECTED] wrote: No, I don't know how to change that behavior. But if you don't like the shadow just disable it :-): @Override public void draw(Canvas pCanvas, MapView pMapView, boolean pShadow) { super.draw(pCanvas, pMapView, false); } On 2 Sep., 18:03, Chris Chiappone [EMAIL PROTECTED] wrote: Marcel, Thanks for that seems to work as you described. The only thing that doesn't seem right is the way the map draws the markers shadow. Any idea on how to correct that. Thanks. On Mon, Sep 1, 2008 at 2:03 PM, marcel-182 [EMAIL PROTECTED] wrote: Hi everyone, I finally got this thing working. Just set the bounds of the marker to be drawn and that's it! Sample: Drawable defaultMarker = getResources().getDrawable(R.drawable.map_marker_red); defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(), defaultMarker.getIntrinsicHeight()); mMapView.getOverlays().add(new DemoOverlay(defaultMarker)); // DemoOverlay is of course an ItemizedOverlay I made a small demo showing one OverlayItem and how to handle tap- events. If someone is interested: http://www.marcelp.info/2008/09/01/android-itemizedoverlay-demo/ Regards, Marcel -- ~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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: changing owner of a file in Windows environment
(1) you can change the owner of your file in the shell, lookup how to use the 'chown' command (2) This is probably *not* what you want to do? Where is your database file located? It should be in your application's data directory. If it is, you should have access to it. If its not, it seems like you're probably not doing something the recommended way. Cheers, Justin Android Team @ Google On Aug 31, 12:35 pm, Yalcin [EMAIL PROTECTED] wrote: In (windows environment / in adb shell) I want to change the owner of my database file from 'root' to 'app_21'. is there a busybox tool for my environment? thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: changing owner of a file in Windows environment
Oops, 'chown' is not available on the emulator. So, let's look at my second point. Cheers, Justin Android Team @ Google On Sep 2, 1:31 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: (1) you can change the owner of your file in the shell, lookup how to use the 'chown' command (2) This is probably *not* what you want to do? Where is your database file located? It should be in your application's data directory. If it is, you should have access to it. If its not, it seems like you're probably not doing something the recommended way. Cheers, Justin Android Team @ Google On Aug 31, 12:35 pm, Yalcin [EMAIL PROTECTED] wrote: In (windows environment / in adb shell) I want to change the owner of my database file from 'root' to 'app_21'. is there a busybox tool for my environment? thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaRecord Audio - working example? / raw data stream onPictureTaken()? / Bug in Pictures application?
Thank you very much for offering the sample code. On 2 Sep., 22:16, Megha Joshi [EMAIL PROTECTED] wrote: Please refer to the audio Recording sample code at the link below: http://groups.google.com/group/android-developers/files 2008/8/31 code_android_festival_way [EMAIL PROTECTED] Did you get the Audio recording managed right now? I'm getting the same error again after adding all the fields. It would be pretty nice to have a working example. Because from the docs I can't decide which fields are required and which are just optional. Regards! On 28 Aug., 07:16, Reto Meier [EMAIL PROTECTED] wrote: Hi Justin, I've tried explicitly including the display name (and artist and album) into the new ContentValue but still end up with exactly the same error on the ContentResolver.insert call. On Aug 27, 10:56 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Error: 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content Creation No.5 date_added=1219598838 _display_name= album_id=2 title_key= - E C O 1 C O - K 1 ) O 9 E C C E „ artist_id=3 using INSERT INTO audio_meta(title, date_added, _display_name, album_id, title_key, artist_id) VALUES(?, ?, ?, ?, ?, ?); From the error it jumps out at me that you're not setting MediaStore.Audio.Media.DISPLAY_NAME, which seems like its required. Also, are you setting the ALBUM_ID and ARTIST_ID somehow or are they encoded in the URI you're using? Cheers, Justin Android Team @ Google On Aug 24, 3:20 pm, code_android_festival_way [EMAIL PROTECTED] wrote: I've got two questions. 1) Is there a working example for recording audio with the MediaRecorder? At the moment I'm using the following setup but it doesnt work: http://paste.pocoo.org/show/83242/ Error: 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content Creation No.5 date_added=1219598838 _display_name= album_id=2 title_key= - E C O 1 C O - K 1 ) O 9 E C C E „ artist_id=3 using INSERT INTO audio_meta(title, date_added, _display_name, album_id, title_key, artist_id) VALUES(?, ?, ?, ?, ?, ?); I've tried the example provided in the docs (Media API) but that doesn't work at all. It would be nice if someone could provide a working example. 2) Is it normal that the raw data stream returned by onPictureTaken(...) is null? 3) I'm taking pictures as above mentioned. After that I'm saving the available jpeg stream into the image ContentProvider which works fine. Now I'm leaving my app and try to start the Pictures application from the home screen. And now I get the following error message: http://img.skitch.com/20080824-mrbc7yuhfh7an5ynndj9hm6twp.jpg Here is the error from the logs: 08-25 00:15:34.007: ERROR/AndroidRuntime(220): java.lang.RuntimeException: Unable to resume activity {com.android.camera/com.android.camera.GalleryPicker}: java.lang.NullPointerException I can savely say that I'm calling camera.stopPreview() and camera.release() so there shouldn't be a problem with the camera. What else could be wrong? Here is the part where I'm saving my jpeg byte[] into the ContentProvider: http://paste.pocoo.org/show/83246/ 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: changing owner of a file in Windows environment
Hi Justin, my database is in: /data/data/com.zmc.android.provider/databases i populate my database outside of the emulator, this is my problem. if i push it to emulator, then owner is root. Yalcin - Original Message - From: Justin (Google Employee) To: Android Developers Sent: Tuesday, September 02, 2008 10:31 PM Subject: [android-developers] Re: changing owner of a file in Windows environment (1) you can change the owner of your file in the shell, lookup how to use the 'chown' command (2) This is probably *not* what you want to do? Where is your database file located? It should be in your application's data directory. If it is, you should have access to it. If its not, it seems like you're probably not doing something the recommended way. Cheers, Justin Android Team @ Google On Aug 31, 12:35 pm, Yalcin [EMAIL PROTECTED] wrote: In (windows environment / in adb shell) I want to change the owner of my database file from 'root' to 'app_21'. is there a busybox tool for my environment? thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getScale replacement for BaseAdapter in 0.9 beta?
Hi, Just override the method getChildStaticTransformation() in ViewGroup and for the given child, set the transformation to a smaller scale. Then in your constructors, make sure you set the flag FLAG_SUPPORT_STATIC_TRANSFORMATIONS in mGroupFlags: mGroupFlags |= FLAG_SUPPORT_STATIC_TRANSFORMATIONS; On Tue, Sep 2, 2008 at 12:47 PM, Chris Cicc [EMAIL PROTECTED] wrote: Hi Romain Guy, How would I go about doing this? I'd really like to enable two pieces of functionality that were removed in the 0.9 Beta, a smaller scale for the not-in-focus images, and the ability to automatically loop (and rotate through) the gallery. Alpha on the edges would be nice, but I can live without that... Any chance we could get a code sample on what you suggest? Thanks, Chris On Aug 29, 7:42 pm, Romain Guy [EMAIL PROTECTED] wrote: Note that you can build your own replacement by creating a subclass of a ViewGroup and enabling support for children static transformations. On Fri, Aug 29, 2008 at 3:50 PM, Megha Joshi [EMAIL PROTECTED] wrote: The getScale() API was removed from BaseAdapter, because now theGallery widget does not support scaling the focussed item in relation to the other items. No replacement was added. It is recommended that you don't alter the standard behavior of theGallerywidget. Is there any particular reason you want to do this? 2008/8/29 blim [EMAIL PROTECTED] What should we use to replace getScale from BaseAdapter, which has been deprecated in 0.9? I'm trying to use this to scale images in a Galleryview in relation to which item is currently in focus. -- Romain Guywww.curious-creature.org -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaMetadataRetriever works?
On further investigation ...I found that MediaMetadataRetriever.captureFrame() does not work and will be removed from the future SDK. It requires special permissions which are not available to user apps. Sorry for the confusion! The other MediaMetaDataRetriever apis will still work...only captureFrame() won't. 2008/8/31 Peli [EMAIL PROTECTED] I obtain the same error, although the code works sometimes. I have to correct myself - so far I could not get captureFrame() to work properly - I always receive the crash mentioned above. (It only does not crash when it is used on an audio file, in which case no bitmap is returned.) Is anybody using it successfully? Does your code look different from the one above? Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Drap and drop an OverlayItem in aMapView
Hi, I'm searching for a sample code that allow to drag and drop an OverlayItem on a map (via an ItemizedOverlay). I sea onTap methods but they can only be used for aon click item, not for on hold item event. Somebody tried ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaMetadataRetriever works?
Is there another way to extract a thumbnail from a video file? Peli On 2 Sep., 23:42, Megha Joshi [EMAIL PROTECTED] wrote: On further investigation ...I found that MediaMetadataRetriever.captureFrame() does not work and will be removed from the future SDK. It requires special permissions which are not available to user apps. Sorry for the confusion! The other MediaMetaDataRetriever apis will still work...only captureFrame() won't. 2008/8/31 Peli [EMAIL PROTECTED] I obtain the same error, although the code works sometimes. I have to correct myself - so far I could not get captureFrame() to work properly - I always receive the crash mentioned above. (It only does not crash when it is used on an audio file, in which case no bitmap is returned.) Is anybody using it successfully? Does your code look different from the one above? Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaMetadataRetriever works?
Not in the current sdk... 2008/9/2 Peli [EMAIL PROTECTED] Is there another way to extract a thumbnail from a video file? Peli On 2 Sep., 23:42, Megha Joshi [EMAIL PROTECTED] wrote: On further investigation ...I found that MediaMetadataRetriever.captureFrame() does not work and will be removed from the future SDK. It requires special permissions which are not available to user apps. Sorry for the confusion! The other MediaMetaDataRetriever apis will still work...only captureFrame() won't. 2008/8/31 Peli [EMAIL PROTECTED] I obtain the same error, although the code works sometimes. I have to correct myself - so far I could not get captureFrame() to work properly - I always receive the crash mentioned above. (It only does not crash when it is used on an audio file, in which case no bitmap is returned.) Is anybody using it successfully? Does your code look different from the one above? Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Audio cache strategies
Josh Guilfoyle wrote: [...] Also, in my tests, the MediaPlayer buffers poorly. It seems to take 2 - 5 seconds to even gear up and make a connection for some reason, and then it seems to buffer more than is necessary in certain circumstances. I'd like to load a simple test up on the HTC Vogue and see what more I can learn about how 0.9 behaves on real hardware. Well, with much trepidation I've ripped out all my cacheing code and am now using pure streaming --- and it all works far better! I'm not seeing any of the buffering problems, and it all seems to be quite snappy, even when seeking beyond the buffer limits. However, I completely agree about the onBufferUpdate() parameter --- it's completely useless. I think it's showing me the high-water-mark of the buffer. Without the matching low-water-mark, I can't doing anything useful with it. onSeekComplete() seems to be a bit questionable, too, as when I get events seems completely unrelated to whether it's actually finished buffering or not. I also notice that streaming Ogg Vorbis files fails with, yes, another undocumented error code --- is this known to not work? -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ All power corrupts, but we need electricity. --- Diana Wynne Jones, │ _Archer's Goon_ signature.asc Description: OpenPGP digital signature
[android-developers] Re: Port JSON client to SDK 0.9
Hi everybody! I finally was able to call the web service i wanted from my application, i have a problem now. The String i get from the response method is removing my xml tags. I get Strings like the following: ?xml version=1.0 encoding=utf-8? string xmlns=http://tempuri.org/;lt;STKDVgt;lt;TABLEDEF NAME=authorsgt; Instead of: ?xml version=1.0 encoding=utf-8 ? string xmlns=http://tempuri.org/;STKDVTABLEDEF NAME=authors Does anyboydy knows hows to aviod this or why is this happening? if i call the web service from ksoap this doesnt happens but my ksoap project doest work since the new SDK. Any help that you could give me will be appreciated. Thanks Francisco Ortega On Sep 2, 12:20 pm, Francisco [EMAIL PROTECTED] wrote: Thanks a Lot Mark! I Finally was able to make it work! i had a while without working with the new SDKs so i didnt know that permission was added. Thank you!. By the way. I am getting a new error now. ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/ XMLSchemasoap:Bodysoap:Faultsoap:Codesoap:Valuesoap:Receiver/ soap:Value/soap:Codesoap:Reasonsoap:Text xml:lang=enSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---gt; System.Xml.XmlException: Root element is missing. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement() at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Booleanamp; abortProcessing) --- End of inner exception stack trace ---/soap:Text/ soap:Reasonsoap:Detail //soap:Fault/soap:Body/soap:Envelope Do you have any idea why this could be happening? My web service returns the following: ?xml version=1.0 encoding=utf-8 ? string xmlns=http:// tempuri.org/ STKDVTABLEDEF NAME=authorsCOLUMNSCOL NAME=au_id DBTYPE =varchar/COL NAME=au_lname DBTYPE =varchar/COL NAME=au_fname DBTYPE =varchar/COL NAME=phone DBTYPE =varchar/COL NAME=address DBTYPE =varchar/COL NAME=city DBTYPE =varchar/COL NAME=state DBTYPE =varchar/COL NAME=zip DBTYPE =varchar/COL NAME=contract DBTYPE =integer//COLUMNS ROWSROW C172-32-1176/CCWhite/CCJohnson/CC408 496-7223/ CC10932 Bigge Rd./CCMenlo Park/CCCA/CC94025/CCTrue/ C/ROWROWC213-46-8915/CCGreen/CCMarjorie/CC415 986-7020/CC309 63rd St. #411/CCOakland/CCCA/CC94618/ CCTrue/C /ROW/ROWS/TABLEDEF/STKDV/string On Sep 2, 10:59 am, Mark Murphy [EMAIL PROTECTED] wrote: Francisco wrote: I have just double checked and i always get a SocketException with an Unknown error Detailed messase. Do you have any idea what could it be? Do you have the INTERNET permission in your AndroidManifest.xml? I think that, er, manifests as this error. uses-permission android:name=android.permission.INTERNET / -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: All titles, revisions, ebook formats, just $35/year- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Mock Location Provider [SOLVED]
I just posted some code at http://groups.google.com/group/android-developers/web/mock_provider.zip that implements a mock location provider. This runs entirely in the emulator, so it should work across all platforms. It allows you to specify a set of coordinates and will the just loop through them forever. This could easily be adapted to read data from a file, URL, etc. As Stefan points out on http://groups.google.com/group/android-developers/browse_frm/thread/2b71c14f34dd8788 , its important to set the time value on the Location you pass to the location service. If a new Location has the same time value as the previous one the LocationManager received, the location won't be updated. You should be able to compile this, install it on the emulator, run it, and then see the location change in Maps application. Hopefully this puts it all together and resolves issues that many have been encountering. Cheers, Justin Android Team @ Google --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: REST + JSON Web Service Client
Hi everybody! I finally was able to call the .NET web service i wanted from my application, i have a problem now. The String i get from the response method is removing my xml tags. I get Strings like the following: ?xml version=1.0 encoding=utf-8? string xmlns=http://tempuri.org/;lt;STKDVgt;lt;TABLEDEF NAME=authorsgt; Instead of: ?xml version=1.0 encoding=utf-8 ? string xmlns=http://tempuri.org/;STKDVTABLEDEF NAME=authors Does anyboydy knows hows to aviod this or why is this happening? if i call the web service from ksoap this doesnt happens but my ksoap project doest work since the new SDK. Any help that you could give me will be really appreciated. Thanks Francisco Ortega On Aug 25, 11:12 am, Megha Joshi [EMAIL PROTECTED] wrote: This might help... JSONObject mLocationJSON = createLocationJSON(mLatitude, mLongitude, mDateTime); postLocationJSON(SERVER_URL, mLocationJSON); /** * @param mUrl The URL of location tracking server. * @param mLocationJSON The location data with time in JSON format. */ public void postLocationJSON(String mUrl, JSONObject mLocationJSON) { HttpClient httpClient = new DefaultHttpClient(); HttpPost postMethod = new HttpPost(mUrl); try { // prepare parameters HttpParams params = new BasicHttpParams(); params.setParameter(locationJSON, mLocationJSON.toString()); postMethod.setParams(params); httpClient.execute(postMethod); Log.i(TAG, Post request, data: + mLocationJSON.toString()); } catch (Exception e) { Log.e(Exception, e.getMessage()); } finally { postMethod.abort(); } } /** * @param mLatitude The latitude data received from location update sent by * LocationManager Service. * @param mLongitude The longitude received from location update sent by * LocationManager Service. * @param mDateTime The DateTime at which location update was sent. * @return JSONObject The JSONObject holding latitude,longitude reported by * the LocationManager Service and DateTime in RFC3339 format. */ public JSONObject createLocationJSON(double mLatitude, double mLongitude, String mDateTime) { JSONObject mLocationJSON = new JSONObject(); try { mLocationJSON.put(latitude, mLatitude); mLocationJSON.put(longitude, mLongitude); mLocationJSON.put(date, mDateTime); } catch (JSONException ex) { Log.e(TAG, Error in creating Location JSON object.); } return mLocationJSON; } 2008/8/25 Baran [EMAIL PROTECTED] Hello Jeffrey, I was wondering if you could provide me something about how you appended your JSON string to the web service request. I am trying to communicate with this rest web service via POST method. But I am unable to identify how to append the JSON string as the parameters. Object.setParameter is not working in this scenario... Hope to hear from you soon!! On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED] wrote: Just a heads up that I've been using simpleJSON with Android, and it's working pretty well. It's somewhat nicer than the defaultJSON included in the SDK because it's iterator-able, making for slick code: for(JSONValue value : (JSONArray)JSONValue.parse(string)) { JSONObject obj = (JSONObject)value; ... } http://www.json.org/java/simple.txt j On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote: Hi, Thanks for the reply, actually I was confused with how we can use JSON. I suppose this is for manipulating the response we get after a successfulwebservicerequest. Please correct me if I am wrong. Still new to this thing. On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote: Baran wrote: Hi, I need to access a .NetwebserviceinRestformat usingJSON. I m pretty new to this concept and very much confused about how this works Any one who can give an overview of the two. I need the steps that I need to follow to useJSON. Right now my doubt is how to useJSONto grab to output. Lets say we create a httpclientand it get the respone now what? How can we use theJSONobject to manipulate the response... There is aJSONparser built into Android: http://code.google.com/android/reference/org/json/package-summary.html And there is an HTTPclientbuilt into Android: http://code.google.com/android/reference/org/apache/http/package-summ... though you may wish to view the HttpClient documentation here: http://hc.apache.org/ Both of these are open source projects with their own documentation, on top of what is in Android. Both are usable in other Java projects outside of Android. If you have
[android-developers] Re: ServiceTestCase instrumentation and remote callbacks
I have discovered more information about this issue which seems far more troubling. I created a simple test which I thought would demonstrate this bug but instead the test worked. So I returned to my functional code and analyzed the logcat differences only to find the following after I launch the instrumented tests: D/AndroidRuntime( 764): D/AndroidRuntime( 764): AndroidRuntime START D/AndroidRuntime( 764): CheckJNI is ON D/AndroidRuntime( 764): --- registering native functions --- I/jdwp( 764): received file descriptor 20 from ADB D/ActivityManager( 49): Uninstalling process org.devtcg.five D/ActivityManager( 49): Force removing process ProcessRecord{434f8728 org.devtcg.five/10015} (org.devtcg.five/10015) W/ActivityManager( 49): Crash of app org.devtcg.five running instrumentation ComponentInfo{org.devtcg.five.tests/ android.test.InstrumentationTestRunner} D/ActivityManager( 49): Uninstalling process org.devtcg.five I/Process ( 49): Sending signal. PID: 739 SIG: 9 I/ActivityManager( 49): Start proc org.devtcg.five for added application org.devtcg.five: pid=770 uid=10015 gids={3003} D/ActivityManager( 49): Received spurious death notification for thread [EMAIL PROTECTED] This is then followed by the tests seemingly running as expected but without recursive binder transactions (callbacks don't fire). The lines about the forced removal and crashed app are not present when running my simple demonstration code which works otherwise as expected. On Aug 26, 11:54 am, Josh Guilfoyle [EMAIL PROTECTED] wrote: *bump* I'm sure I'm just doing something stupid wrong but I really would love to get this working right so I can write good automated tests for my project! Please help if you can... On Aug 25, 4:01 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote: I am trying to add unit tests to a service of mine that utilizes remote callbacks (managed by the service with RemoteCallbackList). I know that this service functions properly already, I am just trying to formalize with a unit test as I have recently discovered how to make instrumentation work. The service otherwise works fine except that it seems that the service callbacks never fire on the observing side. My simple test case looks similar to the following sample: -- begin paste -- public void testMyService() throws RemoteException { IMyService svc = IMyService.Stub.asInterface(bindService(new Intent(this, MyService.class))); svc.registerObserver(new IMyServiceObserver.Stub() { public void onFoo() { Log.d(TAG, Here I am !); synchronized(MyServiceTest.this) { mDone = true; MyServiceTest.this.notify(); } } }); svc.doStuffThatWillEventuallyCallBack(); synchronized(this) { while (mDone == false) { try { wait(); } catch (InterruptException e) {} } } } -- end paste -- Here I am is never logged, in this case and the call to adb shell am never returns. I have verified that doStuffThatWillEventuallyCallback() does actually return, and the test thread enters the synchronized wait loop correctly. My suspicion is that the binder's normal transaction thread loop is somehow not the same in the context of an instrumented test, however I have no way to validate 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 [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Adding standard Moreicon to More submenu
Polishing my app, I am trying to add the standard http://code.google.com/android/reference/android/R.styleable.html#IconMenuView_moreIcon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Database - Content Provider - Syncable
On Aug 29, 4:43 pm, Megha Joshi [EMAIL PROTECTED] wrote: Android framework does not provide any inbuilt service to sync your app's database with with a network database. You could use the the HttpClient library to communicate with the Server...apart from the the sync logic is something you will have to design ...sorry I can't help much there... What do the android.content.Sync* classes do? Examples: SyncProvider, SyncableContentProvider, SyncAdapter, SyncStorageEngine ... Here's an earlier investigation: http://mylifewithandroid.blogspot.com/2008/02/synchronization-in-android.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---