[android-developers] Re: two threads, the main closes the DB but the second is still running and need to use the DB!

2009-01-22 Thread polo777
that any secondary threads is living within the process and it is not a process by itself? Thx, polo On Jan 21, 5:16 pm, Dianne Hackborn hack...@android.com wrote: On Wed, Jan 21, 2009 at 5:01 PM, polo777 polodr...@yahoo.com wrote: 1 - What would be the life cycle of this class singleton

[android-developers] How to know which element of my list is selected when long click

2009-01-22 Thread polo777
Hi everyone, I have a list using a customized BaseAdapter. When one element of the list is hit during a long time, a contextual menu appears. I want to use this one to delete or edit the selected item but I don't know how to get id or anything else that could help me. I tried

[android-developers] Re: two threads, the main closes the DB but the second is still running and need to use the DB!

2009-01-21 Thread polo777
21, 2:45 pm, polo777 polodr...@yahoo.com wrote: Hi everyone, I have two threads: - the main one in charge of the UI - a second one that takes care of network calls, parsing responses and database updates. The main threads open the database, retrieves information into a Cursor that is used

[android-developers] Re: two threads, the main closes the DB but the second is still running and need to use the DB!

2009-01-21 Thread polo777
On Jan 21, 4:16 pm, Dianne Hackborn hack...@android.com wrote: I would recommend having a singleton that all of the clients go through, which takes care of keeping the database open as long as there are clients of it. On Wed, Jan 21, 2009 at 2:45 PM, polo777 polodr...@yahoo.com wrote: Hi

[android-developers] Activity goes to background but secondary thread needs to end its work

2008-12-17 Thread polo777
Hi Everyone, I am currently working on an app that uses two threads: The first main UI one and a secondary one that I use to retrieve some data from the network, parse them and finally add them into a database. My question is regarding to the lifecycle of my thread. The problem is simple, I

[android-developers] Re: Activity goes to background but secondary thread needs to end its work

2008-12-17 Thread polo777
service. Have a look athttp://code.google.com/android/reference/android/app/Service.html. Services usually last longer and killed later then usual activities when memory is low. On Dec 17, 11:47 pm, polo777 polodr...@yahoo.com wrote: Hi Everyone, I am currently working on an app that uses

[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-25 Thread polo777
!!! The content is exactly the same. Looks like the WebKit doesn't work the same whether the file is an asset, page loaded from Network or a string or a text from a file (ContentProvider solution). This problem drives me crazy! Polo On Nov 21, 4:56 pm, polo777 [EMAIL PROTECTED] wrote: I am

[android-developers] Content Provider: create/open a file in the overrided openFile function

2008-11-24 Thread polo777
Hello Everyone, I am trying to override the openFile function of a contentProvider so that I can use the URI in the loadURL function. The following code is really spread on the forum but nobody seems to meet any problems on this line File file = new File(...). As far as I am concerned, I got a

[android-developers] Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777
Hi Everyone, I want to display into a WebView the concatenation of a string and the content of a file located in my asset. With the code below, when I display the string in my log it looks perfect but when I launch the activity I just get the following message: Web page not available the web

[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777
Re, Actually, I still have a problem. When I use this trick, the javascript containing in my page doesn't work whereas the same page(html/javascript) works when I load it from the network or from a file:///android_asset/myfile.html. Anything? Polo On Nov 21, 1:06 pm, polo777 [EMAIL PROTECTED

[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777
could use loadUrl or loadDataWithBaseURL properly using the url content:// blabla.provider? I am not sure exactly how to proceed. Thanks Polo On Nov 21, 4:26 pm, Mark Murphy [EMAIL PROTECTED] wrote: polo777 wrote: Re, Actually, I still have a problem. When I use this trick

[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777
I am gonna give a try and let you know. Thanks Mark! On Nov 21, 4:45 pm, Mark Murphy [EMAIL PROTECTED] wrote: polo777 wrote: After having tried to use addJavascriptInterface, I start working on the ContentProvider-based solution that you described. With this solution can I just create

[android-developers] Extend a EditText to create an editable view performing operation onKeyDown

2008-11-06 Thread polo777
Hi Everyone, I am trying desperately to extend the EditText view to override onKeyDown. My goal is to create an EditText that will update UI elements each time the user will type one character within. The code is as simple as that: public class SearchView extends EditText { public

[android-developers] Re: SharedPreferences: editor.commit() always false even though it commits

2008-11-05 Thread polo777
the password, I'd suggest at least encrypting it with a key that's hard coded in your app (yes, this is still not secure, but at least it won't be stored plaintext). jason On Tue, Nov 4, 2008 at 1:51 PM, polo777 [EMAIL PROTECTED] wrote: Hi everyone, Almost everything is in the title. I am trying

[android-developers] SharedPreferences: editor.commit() always false even though it commits

2008-11-04 Thread polo777
Hi everyone, Almost everything is in the title. I am trying to save username and password into the sharedpreferences file. I used the little function below to do so: Everything works (The data are written correctly, I can read them afterward) but the editor.commit() always returns false even