[android-developers] Webview question: Is it possible to execute Javascript from Java synchronously?

2009-04-06 Thread j
I am writing a hybrid web/native app and ran into issue. My app downloads a music file via Java code, and needs to update a Javascript download progress bar in the WebView in real time. My understanding is the only way to call Javascript from Java is via the WebView's loadUrl method. while

[android-developers] Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Ward Willats
After a long time with one Activity being my app's entry point, I just changed the manifest to point to a different activtiy to be the entry point. But the G1 is doggedly trying to load the old activity -- even after uninstall, install, reboot, etc. and acore throws a security exception.

[android-developers] How to send mail with pre-populated content?

2009-04-06 Thread Mattaku Betsujin
I know I can specify an e-mail address using the Intent to invoke gmail. But how do I give it the initial content (and allow the user to edit the content if desired)? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[android-developers] Re: Books on Android development?

2009-04-06 Thread Frank Ableson
Unlocking Android from Manning will be out in a few days. Disclosure - I am one of the authors. http://manning.com/ableson Frank On Mon, Apr 6, 2009 at 1:40 PM, jkk251 jkk...@gmail.com wrote: The documentation on Google's websites is great, but it would also be great to have a text to

[android-developers] Re: Exception locking surface - lockCanvas() returns a null?

2009-04-06 Thread mcmc
actually, I am drawing onto the surface from a different thread... that's not allowed?? how would I go around doing this? I'm not drawing before the surfaceCreated() callback... On Apr 5, 11:15 am, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: Might also be worth

[android-developers] Re: Webview question: Is it possible to execute Javascript from Java synchronously?

2009-04-06 Thread Mark Murphy
j wrote: I am writing a hybrid web/native app and ran into issue. My app downloads a music file via Java code, and needs to update a Javascript download progress bar in the WebView in real time. My understanding is the only way to call Javascript from Java is via the WebView's loadUrl

[android-developers] Re: How can I import any widgets under com.android.internal.widget into my app?

2009-04-06 Thread nEx.Software
You should have no problem. I've included the latest HTTP from Apache, and redeployed the TabHost in my application. Hasn't caused any problems. On Apr 5, 11:44 pm, shaddu shad...@gmail.com wrote: Hi Dianne, As we are copying the code and resources from platform into our application, those

[android-developers] Re: Books on Android development?

2009-04-06 Thread Al Sutton
Android is locked :O??? I'm just wondering how many queries you're going to get about where the chapter on unlocking it from the carrier network is :). Al. --- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with

[android-developers] Re: How to send mail with pre-populated content?

2009-04-06 Thread Xavier Le Vourch
Mattaku Betsujin wrote: I know I can specify an e-mail address using the Intent to invoke gmail. But how do I give it the initial content (and allow the user to edit the content if desired)? Use the Intent.EXTRA_TEXT and Intent.EXTRA_SUBJECT constants in something similar to: String body =

[android-developers] Re: JUnit on the emulator without instrumentation

2009-04-06 Thread gudujarlson
Thanks for the response. I am aware of the instrumentation mechanism to run tests, however I have been unable to determine how to use it in conjunction with the debugger in eclipse, thus it is essentially useless to me. On Apr 5, 11:10 pm, Andrew Stadler stad...@gmail.com wrote: It's actually

[android-developers] Re: Drop entire database?

2009-04-06 Thread gudujarlson
Thank you, Sirius, but my question was how to drop the entire database, not just one table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Webview question: Is it possible to execute Javascript from Java synchronously?

2009-04-06 Thread j
Mark, your suggestion makes sense. I tried it. I created a separate thread for downloading and uses a Handler to loadUrl instead of calling loadUrl directly. But the result is the same. The loadUrl executions get queued up. It appears the downloading thread seems to have priority over the

[android-developers] Re: Books on Android development?

2009-04-06 Thread Mark Murphy
Todd Sjolander wrote: I'm really not affiliated with him - just a happy customer. Thanks for the feedback! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year

[android-developers] How can I see LOGV content in 'adb logcat'

2009-04-06 Thread Meryl Silverburgh
Hi, I put calls to LOGV() in my cpp file in WebKit code in andorid, but I don't see any log statements when I run 'adb logcat' in another shell. But as soon as I change it to LOGE(), i see them. Can you please tell me how can I see the log content of LOGV? Thank you.

[android-developers] Re: Cupcake SDKs available for download

2009-04-06 Thread Cyril Jaquier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 But what again is the state of networking? I read somewhere that there is a problem, but I can't seem to google it. Maybe I just dreamed that I read it? I also downloaded the archive and I also have no network :( I tried to define an APN

[android-developers] Animation Issue

2009-04-06 Thread Alowishus
Hey Gang, Is there a way to pre-load frame by frame animations? It seems to me that when using frame by frame animations the first run through of the app cause some stuttering for the end users as the frame by frame images are fetched from the application instead of running through normally.

[android-developers] Re: Android Telephony

2009-04-06 Thread Matthew
Hello, I am new to this Group. Thank you for your recommendation to avoid using unsupported techniques. I am trying to obtain the signal strength seen by the G1 phone. As you had referred to, I have implemented a PhoneStateListener and onSignalStrengthChanged (int asu). It looks like I am

[android-developers] Re: Webview question: Is it possible to execute Javascript from Java synchronously?

2009-04-06 Thread j
Mark, I have a nastier solution: Put inside the while loop: try { Thread.sleep(100); } catch (Exception e) {} It works. On Apr 6, 12:41 pm, Mark Murphy mmur...@commonsware.com wrote: j wrote: Mark, your suggestion makes sense.  I tried

[android-developers] Re: Webview question: Is it possible to execute Javascript from Java synchronously?

2009-04-06 Thread Mattaku Betsujin
This doesn't make any sense, though. If you're inside in.read(), you should be sleeping, waiting for the network transfer to complete. So the WebKit thread *should* have some time to process your loadUrl() requests . On Mon, Apr 6, 2009 at 1:21 PM, j jac...@gmail.com wrote: Mark, I have

[android-developers] Re: How can I see LOGV content in 'adb logcat'

2009-04-06 Thread fadden
On Apr 6, 12:57 pm, Meryl Silverburgh silverburgh.me...@gmail.com wrote: I put calls to LOGV() in my cpp file in WebKit code in andorid, but I don't see any log statements when I run 'adb logcat' in another shell. But as soon as I change it to LOGE(), i see them. Can you please tell me how

[android-developers] Is there a way for an application to know whether it has been downloaded from Market?

2009-04-06 Thread Peli
Is there a way for an application to know whether it has been downloaded from Market? I'm thinking of distributing an application through Android Market as well as through a private web site, that contains both a free basic version and a paid Pro version. For simplicity of maintenance, I would

[android-developers] Re: Why adb push to sdcard report Read-only file system for the emulator of the latest android source code

2009-04-06 Thread David Turner
the change has been submitted to the depot, so you can do the following to get a working system: repo sync touch system/core/init/init.c make the second line is needed because the build system is not smart enough to rebuild the system image if the Makefile was changed in certain ways. It is

[android-developers] Re: Sleep mode in emulator

2009-04-06 Thread David Turner
no, it can't really do that right now. On Mon, Apr 6, 2009 at 6:15 PM, samurai00...@gmail.com samurai00...@gmail.com wrote: Is the actual version of the emulator able to reproduce the sleep mode? (Android 1.1 SDK r_1) --~--~-~--~~~---~--~~ You received

[android-developers] Re: Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Ward Willats
Well crap. I changed the entry activity (MAIN, LAUNCHER) to my app in the manifest (swapped it with another activity, actually). Install. Android tries to launch the old entry activity. Uninstall, reinstall -- no change. Factory reset the phone -- install -- NEW ENTRY ACTIVITY RECOGNIZED!

[android-developers] Re: How to troubleshoot a Stackoverflow error in android ViewRoot?

2009-04-06 Thread fadden
On Apr 4, 7:58 pm, Dianne Hackborn hack...@android.com wrote: Whatever source code you are looking at does not match the build you are running on.  deliverKeyEventToViewHierarchy() is a recursive traversal down the view hierarchy to deliver a key event.  Most likely you view hierarchy is too

[android-developers] Re: Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Mark Murphy
Ward Willats wrote: SoI HOPE NO ONE EVER CHANGES THE ENTRY ACTIVITY OF THEIR PROGRAM WHEN THEY ISSUE AN UPDATE OR THEIR USERS ARE GOING TO HAVE TO ERASE THEIR PHONES. I don't think it's quite that simple. I am able to somewhat reproduce this problem. I say somewhat because: 1. It only

[android-developers] Re: Analyzed and fixed ...acore has stopped unexpectedly issue

2009-04-06 Thread fadden
On Apr 4, 2:19 am, Jonas Petersson jonas.peters...@xms.se wrote: In my opinion it would make sense for the acore sync process to handle incorrect values by replacing them with HOME/OTHER instead of crashing. I have not dug into the source, but I would think it would be a trivial fix. I

[android-developers] Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Ward Willats
Well, that's a relief -- at least it is not a global phenomenon. Can't post the manifest, boss would get mad (not like it is any kind of secret, what with package interrogation being so easy...but...) I'll have to build up a test and keep adding things until I hit it. Thanks very much, Mark.

[android-developers] Re: Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Mark Murphy
Ward Willats wrote: Well, that's a relief -- at least it is not a global phenomenon. Can't post the manifest, boss would get mad (not like it is any kind of secret, what with package interrogation being so easy...but...) I'll have to build up a test and keep adding things until I hit it.

[android-developers] Re: Analyzed and fixed ...acore has stopped unexpectedly issue

2009-04-06 Thread Jonas Petersson
Hi fadden, fadden wrote: On Apr 4, 2:19 am, Jonas Petersson jonas.peters...@xms.se wrote: In my opinion it would make sense for the acore sync process to handle incorrect values by replacing them with HOME/OTHER instead of crashing. I have not dug into the source, but I would think it would

[android-developers] Re: Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Dianne Hackborn
The system doesn't cache anything about the contents of manifests across boots, so there is no way this can just not work. One thing that can happen is that when you make a shortcut on the home screen, this does of course reference the explicit component the shortcut is for. So if the

[android-developers] Re: Is there a way for an application to know whether it has been downloaded from Market?

2009-04-06 Thread Dianne Hackborn
Currently the platform knows absolutely nothing about where an installed app came from. There may be an API you can use with the market to find out if it had installed your app at some point, but I doubt such a thing exists right now. On Mon, Apr 6, 2009 at 1:51 PM, Peli peli0...@googlemail.com

[android-developers] Re: Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Mark Murphy
Dianne Hackborn wrote: The system doesn't cache anything about the contents of manifests across boots, so there is no way this can just not work. My scenario does not involve boots, FWIW. http://code.google.com/p/android/issues/detail?id=2376 One thing that can happen is that when you make

[android-developers] Change MAIN LAUNCHER activity doesn't take

2009-04-06 Thread Ward Willats
Dianne Hackborn wrote: One thing that can happen is that when you make a shortcut on the home screen, this does of course reference the explicit component the shortcut is for. So if the application is changed such that the component no longer exists, you will need to delete the current

[android-developers] Re: Android Telephony

2009-04-06 Thread Dianne Hackborn
This is the way you get the signal strength. The status bar uses the exact same information to show its bars. On Mon, Apr 6, 2009 at 1:18 PM, Matthew matt...@troppertech.com wrote: Hello, I am new to this Group. Thank you for your recommendation to avoid using unsupported techniques. I

[android-developers] How to become root in emulator?

2009-04-06 Thread Meryl Silverburgh
Hi, Can you please tell me how can I become root in android emulator? I have googled and find this link: http://www.androidhere.com/ANDROID-NEWS/Technology/200811/19-Hack--Howto-get-root-on-your-G1_41.html so i tried # adb shell and the follow the steps #mount -o remount,rw -t yaffs2

[android-developers] Send Email Automatically

2009-04-06 Thread Noam
Hello everyone, I am looking for a way to send an email from a DEFINED email to the user's email. I will also have a defined subject and a defined email - body. My situation is that when the user forgets his password, he needs to enter in his email into the text box and then the application will

[android-developers] How the daemon can be started?

2009-04-06 Thread davidc...@gmail.com
Hi , I need to create a daemon to monitor traffic, and I am using similar method as uuidd.rc to create a daemon. However, I can't the way(code) that the Uuidd.rc can be started? neithor from init.rc or system (Uuidd.rc). can someone let me know how the daemon or (.rc) can be executed? Thanks,

[android-developers] Re: How the daemon can be started?

2009-04-06 Thread Mark Murphy
davidc...@gmail.com wrote: I need to create a daemon to monitor traffic, and I am using similar method as uuidd.rc to create a daemon. However, I can't the way(code) that the Uuidd.rc can be started? neithor from init.rc or system (Uuidd.rc). can someone let me know how the daemon or (.rc)

[android-developers] How to find the Browser Home Page (URL)....

2009-04-06 Thread John B. Hansen
I need to get the browsers default Home Page URL in a string so I can direct Browser activities that I'm launching. Couldn't find that in the documentation (or perhaps I missed it). Is there a getter for this? Is it under System Settings somewhere? Any help appreciated. Thx. jh

[android-developers] How to print errno in native code in android

2009-04-06 Thread Meryl Silverburgh
Hi, I am trying to use LOGE function to display the value of errno. LOGE(errno: %d\n, errno); But what I get errno: 1 But '1' is not a valid errno (I look at errno.h). Can you please tell me what am I doing wrong? Thank you. --~--~-~--~~~---~--~~ You received

[android-developers] Re: Exception locking surface - lockCanvas() returns a null?

2009-04-06 Thread mcmc
i, now, combined the two threads into one, and I still get the same error at lockCanvas(). any ideas would be much appreciated. thank you. On Apr 6, 11:47 am, mcmc manni...@gmail.com wrote: actually, I am drawing onto the surface from a different thread... that's not allowed?? how would I go

[android-developers] Re: Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES

2009-04-06 Thread geoff.stromberg
Unfortunately, it's code I'm writing for a client and can't be posted as is. I will do some work to see if I can whittle it down to a much simpler example that still repros the problem. On Apr 5, 4:23 pm, Mark Murphy mmur...@commonsware.com wrote: geoff.stromberg wrote: Well, this APK

[android-developers] How onCreate/OnDestory method

2009-04-06 Thread Lucius Fox
Hi, Each activity has a onCreate/OnDestory method. And I think they are being invoked by frameworks/base/core/java/Instrumentation.java. My question is what it is process calling Instrumentation.callActivityOnDestory() and Instrumentation.callActivityOnStart()? Does that process has root

[android-developers] Re: Question about zoom a picture

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Apr 2, 1:07 pm, guishenl...@gmail.com guishenl...@gmail.com wrote: Hi all,    I'm learning how to show pictures now, and following the example ApiDemos given by sdk.I want to add the zoom function to the ImageSwitcher, but I didn't find useful code in sdk. Can anyone give me

[android-developers] Re: Send Email Automatically

2009-04-06 Thread Mark Murphy
Noam wrote: I am looking for a way to send an email from a DEFINED email to the user's email. I will also have a defined subject and a defined email - body. My situation is that when the user forgets his password, he needs to enter in his email into the text box What text box? and then

[android-developers] Re: Problem on ImageSwitcher.setImageURI

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Apr 1, 12:51 pm, guishenl...@gmail.com guishenl...@gmail.com wrote: Hi all,     I tried to show a picture in local file system in a imageswitcher. But I could see nothing but a black screen in fact. Here is my code:     public void onItemSelected(AdapterView parent, View

[android-developers] Re: How to Zoom out a picture

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Mar 31, 12:44 pm, guishenl...@gmail.com guishenl...@gmail.com wrote: Hi all,     If I have a picture file stored in the phone memery (.jpg .bmp etc.),can I use Android API to zoom it out.For example, convert a picture of size 800*800 to 80*80. If anyone knows, please give me

[android-developers] Re: Problem on ImageSwitcher.setImageURI

2009-04-06 Thread Mark Murphy
guishenl...@gmail.com wrote: Nobody knows? I suspect your photo is not located at /data/data/com.Android.Hust.PoliceMap/app_c/2.jpg. App-local files should be in /data/data/your.package.here/files or subdirectories under there. BTW, your application should not be using the com.android

[android-developers] Re: How to Zoom out a picture

2009-04-06 Thread Ivan Soto
You can start from here: Bitmap bm = BitmapFactory.decodeFile(pathtofile.jpg); Ivan Soto Fernandez Web Developer http://ivansotof.com On Mon, Apr 6, 2009 at 7:05 PM, guishenl...@gmail.com guishenl...@gmail.com wrote: Nobody knows? On Mar 31, 12:44 pm, guishenl...@gmail.com

[android-developers] Re: How to Zoom out a picture

2009-04-06 Thread Mark Murphy
guishenl...@gmail.com wrote: Nobody knows? On Mar 31, 12:44 pm, guishenl...@gmail.com guishenl...@gmail.com wrote: Hi all, If I have a picture file stored in the phone memery (.jpg .bmp etc.),can I use Android API to zoom it out.For example, convert a picture of size 800*800 to

[android-developers] Re: How to print errno in native code in android

2009-04-06 Thread Romain Guy
Don't use native code because it's not supported :) On Mon, Apr 6, 2009 at 5:15 PM, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Hi, I am trying to use LOGE function to display the value of errno. LOGE(errno: %d\n, errno); But what I get errno: 1 But '1' is not a valid errno (I

[android-developers] Re: How onCreate/OnDestory method

2009-04-06 Thread Dianne Hackborn
It's all in the app's process. On Mon, Apr 6, 2009 at 5:53 PM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, Each activity has a onCreate/OnDestory method. And I think they are being invoked by frameworks/base/core/java/Instrumentation.java. My question is what it is process calling

[android-developers] Re: How to compile android app with static library?could somebody give me a example?thanks

2009-04-06 Thread 打工者
Thanks you! On 4月3日, 下午4时44分, davidandroid2...@yahoo.com davidandroid2...@yahoo.com wrote: You can include the the library jar file in your Android Eclipe project's library. On 4月1日, 下午11时52分,打工者huang.qing...@zte.com.cn wrote: How to compile android app with static library?could

[android-developers] Re: Send Email Automatically

2009-04-06 Thread Noam
What text box? Scratch that out. Let's just say that I have the user's email address in a String named userEmail. What application? Running where? It is actually a dialog box that when he presses send, it will send an email to his mailbox. What mailbox? The user's personal email address.

[android-developers] Re: WebView with theme doesn't show focused text field values

2009-04-06 Thread Ron
Did you try this with the sample I code I supplied? It had no effect whatsoever (and not sure why it would address the focus problem anyway). In fact, I couldn't get the page to load at all. Anyone else have a suggestion? On Apr 6, 12:14 am, for android forandr...@gmail.com wrote: Use this

[android-developers] Re: How onCreate/OnDestory method

2009-04-06 Thread Lucius Fox
Thank you. When I open a 'adb shell' to talk to emulator and then execute a native application, is that application process also? Or that is system process which automatically has root permission? On Mon, Apr 6, 2009 at 7:01 PM, Dianne Hackborn hack...@android.com wrote: It's all in the app's

[android-developers] Can I add a custom qualifier to resource directory?

2009-04-06 Thread mongd
Hi, just like the title says, I have a question about resource directory. To use different resources based on current configuration, Android supports a list of qualifier that can be added to directory name, so the system automatically finds the right one for the current configuration. However,

[android-developers] MediaPlayer API

2009-04-06 Thread vinny.s...@gmail.com
can any body tell that how to play the file which is present in MY computer For Eg : Path=D:/Vinod/Songs can any body give the way to play the audiao file from files in system . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Problem In Game Demo

2009-04-06 Thread vinny.s...@gmail.com
Can Any Body Say What This Problem Is: java.lang.NullPointerException at com.android.ide.eclipse.editors.layout.descriptors.CustomViewDescriptorService.getDescriptor (Unknown Source) at com.android.ide.eclipse.editors.layout.descriptors.CustomViewDescriptorService.getDescriptor

[android-developers] aapt ERROR

2009-04-06 Thread mongd
Hello, I made a new android project with Eclipse and while I was trying to use AAPT on that project, I got the following errors. res/layout/main.xml:2: ERROR No resource identifier found for attribute 'orientation' in package 'android' res/layout/main.xml:2: ERROR No resource identifier found

[android-developers] Re: MediaPlayer API

2009-04-06 Thread Marco Nelissen
If you want to play a file in the emulator, you will have to create an sd card image, copy the file to it, and then run the emulator with that sd card image. You cannot play a file directly off your D: drive On Mon, Apr 6, 2009 at 9:36 PM, vinny.s...@gmail.com vinny.s...@gmail.com wrote: can

[android-developers] Passing ArrayList across actvities

2009-04-06 Thread a...@lg
Hi all, I have an ArrayListMyList aList in an activity. I would like to send this data to another activty. Such that, ArrayListMyList aList; Intent intent = new Intent(); intent.setClass(mainactivity.this, newActivity.class); intent.putExtra(MyList, aList ); startActivity(intent); Will this

[android-developers] Changing System date - Android Emulator

2009-04-06 Thread Markiv
Hi Team, For testing my android application, I need to change the date on the Android Emulator to a future date. But every time I change the date ... the emulator resets it back to the current date. I go to menu - settings - day and time to make the Date change. I know there is a adb shell

[android-developers] Re: Why adb push to sdcard report Read-only file system for the emulator of the latest android source code

2009-04-06 Thread Mariano Kamp
Thanks David, but I was more expecting something without compiling a new version of the SDK. Anyway, I tested my SD card stuff on the actual device for months now, so I should be able to wait a little bit longer. On Mon, Apr 6, 2009 at 10:57 PM, David Turner di...@android.com wrote: the change

<    1   2