[android-developers] How to transfer the URI reading permissions of an Intent

2012-04-12 Thread elDoudou
Hello. I am facing the following problem. In my Android application, I have attached a special IntentFilter to an Activity named A, which enables this A Activity to be launched when clicking the Gmail application "Overview" button on an e-mail file attachment. The e-mail file MIME type is "app

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Kostya. Yes, my intent is to invoke those methods from a worker background thread. You assume that I want to get i18n string to update the UI, but this is not my exact use case. I need to get an i18n string, because I want to prepare the computation of a string (imagine that the string

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Mark. If you implement "Fragment.getContext()" the following way, I think that it works: public final Fragment.getContext() { if (isDetached() == true) { if (getView() == null) { throw new IllegalStateException("..."); } return getView().getContext()"; } els

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Mark. Yes sure, this is a way to address this issue. But if the i18n string I need to get depends on the result of a web service call, this means that I need to provide all i18n strings at AsyncTask build time. And if I need to use the "getString(int resourceId, ...)" form? In that case,

[android-developers] "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Hello. With the Fragment API, the easy and straightforward way to access to the i18n is to use the "Fragment.getString(int resId)" method. Unfortunately, the implementation resorts to the underlying attached Activity, which is only available between the "Fragment.onAttach(Activity activity)" and t

[android-developers] Re: How to know what internal process runs an application

2011-07-25 Thread elDoudou
Thank you "Indicator Veritatis" for your clear answer. For you, what I intend to do is impossible. I cannot figure out why the Android team declared an "android:process" attribute, and do not expose that value at runtime to the application, because this information is only an instruction on whethe

[android-developers] Re: How to know what internal process runs an application

2011-07-25 Thread elDoudou
Thank you Boston. As I stated, I cannot use lazy instantiation, because this initialization starts up things which is time-dependent, and hence that need to be started as soon as the process starts. Otherwise, yes, I would definitively chose this option. Regards, Édouard -- You received this m

[android-developers] Re: How to know what internal process runs an application

2011-07-25 Thread elDoudou
Thank you Mark. However, you still do not answer my question, and this coding design pattern does not help in that specific situation. I do not need a work- around, I'd like to know if what I attempt to achieve is feasible. Thank you for your understanding. Édouard -- You received this message

[android-developers] Re: How to know what internal process runs an application

2011-07-24 Thread elDoudou
Thank you Mark for taking care to answer. I have already thought of implementing it the straightforward way you propose, but I think that this is not satisfactory, for the reasons I have attempted to expose in my previous post. I'm sorry, but your answer does not answer my requirements, and as I

[android-developers] Re: How to know what internal process runs an application

2011-07-24 Thread elDoudou
Thank you a lot Dianne and Rich for helping: I think that this discussion will be helpful to many other Android developers ;) I understand that I was not successful in explaining the core issue. Let me attempt to rephrase it in a more appropriate way. As far as I understand, when an application p

[android-developers] Re: How to know what internal process runs an application

2011-07-18 Thread elDoudou
distinguish them, > you have a problem in your design. > > On Tue, Jul 12, 2011 at 1:43 AM, elDoudou > wrote: > > > > > > > > > > > Hello Doug and thank you. > > > The process id does not indicate the Android declared process in the > >

[android-developers] Re: How to know what internal process runs an application

2011-07-12 Thread elDoudou
Hello Doug and thank you. The process id does not indicate the Android declared process in the AndroidManifest.xml file, unfortunately. What I need to know is the "android:process" which causes the process to start. If I declare a service in the manifest with a specific process name (tag "android:

[android-developers] Re: How to know what internal process runs an application

2011-07-10 Thread elDoudou
Mark, your answer does not answer to my problem. I am an Android advanced developer and I have a good reason to spawn a new process. Anyone by Google? Do I really need to dig more in the Android source code? Thank you for your time. Regards, Édouard -- You received this message because you are

[android-developers] How to know what internal process runs an application

2011-07-04 Thread elDoudou
I am developing an Android application, which hosts two processes, as declared in the AndroidManifest.xml file through the "android:process" XML attributes : a first main process stated on the XML node with a value set to "dummy.com" ; a background service, declared as a XML node with a value set

[android-developers] Re: Problem of vertical alignment in a RelativeLayout

2009-07-24 Thread elDoudou
Very shortly, because I do not have much time. Thanks so much Peli, you saved my life ;) I did not think of the "layout_weight" option... When I have time, I should post the solution, so that everyone enjoys. Cheers, Édouard --~--~-~--~~~---~--~~ You received this m

[android-developers] Re: Problem of vertical alignment in a RelativeLayout

2009-07-21 Thread elDoudou
Thank you Guy for giving some hint. - Would you confirm that what I intend to perform is impossible with the built-in layouts? - If yes, what is the exact mean of the RelativeLayout parameter 'android:layout_centerVertical="true"'? - If only possible through the building of a custom "ViewGroup

[android-developers] Re: Problem of vertical alignment in a RelativeLayout

2009-07-20 Thread elDoudou
Hello there. Sorry, I won't give up this time, because this naughty default behavior really prevents me from designing a nice and clean layout. To me, it's kind of bug on the Android layout layer. I know that this support request is far from sexy, but as you know, the details make all the differe

[android-developers] Re: Problem of vertical alignment in a RelativeLayout

2009-07-16 Thread elDoudou
Thank you for taking so much care, but unfortunately, the problem is still not solved with your advice of setting the widgets 1 and 3 height to "fill_parent" (they were actually formerly set to "wrap_content"). I'm kind of thinking that I should open up a challenge for the person who solves this p

[android-developers] Re: Problem of vertical alignment in a RelativeLayout

2009-07-15 Thread elDoudou
Thank you Mark for taking the time. Yes, my ASCII "art" does not fit well with the browser non-fixed-space font. - Just to let you know that setting android:layout_centerVertical="true" on the 3 widget does not solve the problem (I forgot to mention that I had already tried...) - I cannot use a

[android-developers] Problem of vertical alignment in a RelativeLayout

2009-07-15 Thread elDoudou
Hello. I know my original post (at http://groups.google.com/group/android-developers/browse_thread/thread/57129a72b400754c/cc6cb59adf79bd24?lnk=gst, I could not find a way to perform a reply, maybe it's too old) is not sexy, but I'm now facing that problem in many situations. Let me please rephra

[android-developers] RelativeLayout with vertical center positioning problem

2009-05-06 Thread elDoudou
Hello. I've been fighting for hours now, and still do not understand what I'm missing. Sorry for posting only text, since I cannot attach an image to this post. I have an activity which uses an XML layout made of a top-level RelativeLayout composed of 3 TextViews (see the XML at the end of the p

[android-developers] Re: How to remove the WebView top/left 8-pixel inner margin?

2009-04-13 Thread elDoudou
That was my fear, i.e. that the left and top margin be hard-coded deep down on the C inaccessible layer ;( Thank you for taking the time. By "accuracy", I mean that I want to control the width of the total WebView widget, so that it takes exactly 320 pixels and that the loaded HTML inside the WebV

[android-developers] Re: How to remove the WebView top/left 8-pixel inner margin?

2009-04-13 Thread elDoudou
Anyone on this? Do I need to reformulate my question? I know it sounds cosmetics, but since I need to display a HTML banner, the need for accuracy is really needed? Android Googlers, your help is very welcome ;) Regards, Édouard --~--~-~--~~~---~--~~ You received th

[android-developers] Re: Margin-problem with changed layout for titlebar

2009-04-13 Thread elDoudou
As you are asking, please read http://developer.android.com/guide/developing/tools/hierarchy-viewer.html for the explanations about the hierarchy viewer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Develo

[android-developers] Re: Margin-problem with changed layout for titlebar

2009-04-10 Thread elDoudou
If you take a look at the hierarchy viewer, you will notice that the customized title is contained in a FrameLayout with id "title_container", which has a left and right padding set to 7. I would be you, I'd try something like have a handle on your activity root view, ask for its parent (a FrameLa

[android-developers] How to remove the WebView top/left 8-pixel inner margin?

2009-04-10 Thread elDoudou
Hello. After some search, even in the WebView and related classes source code, I could not find where the built-in 8-pixel inner margin of a WebView is set. I would like to display a WebView with no inner margin: is it feasible, please? Or am I missing something and there is no top and left inner

[android-developers] Re: Changing background style of MenuItem

2009-04-09 Thread elDoudou
Thank you for posting your conclusion. However, according to me, setting the "android:itemBackground" element in an applied theme does not change anything neither, so this work-around is not working: please, tell me if I'm wrong... I went to the same conclusion by analyzing the Android source code

[android-developers] Re: RecentCallsListActivity: adding a contextual menu extra entry

2009-01-23 Thread elDoudou
Thank you for taking the time to answer, even for bad news ;-) --~--~-~--~~~---~--~~ 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 uns

[android-developers] Re: RecentCallsListActivity: adding a contextual menu extra entry

2009-01-23 Thread elDoudou
Sorry to insist, but we thought that a very benefit of Android is to re-use other Activities via Intents. Any one has a hint, on how to add extra menu entry to the built-in "Contacts" Android application? Thank you for your understanding. Cheers, Édouard --~--~-~--~~~-

[android-developers] RecentCallsListActivity: adding a contextual menu extra entry

2009-01-19 Thread elDoudou
Hello. I've been digging the "Contacts" built-in Android application source code, and do not see a way for an external application to add an entry in this application. I would like to propose to create a task from a missed call. Am I missing, something, please? Thank you for your help. Édouard -

[android-developers] Re: A notification sound taken from the Android .apk

2008-12-16 Thread elDoudou
Maybe my question was not clear. Is it possible with the "Notification" to set up a sound field which is taken from the .apk bundle, instead of providing a file path? If not, does it mean that the .ogg file taken from the .apk should be first copied on the file system? Where should it be unpacked:

[android-developers] A notification sound taken from the Android .apk

2008-12-13 Thread elDoudou
Hello. I can't find in the API nor in this discussion group a way to attach a sound which is present in my Android application 'res/raw' folder, to a notification. Is it feasible? Since the "Nofitication.sound" attribute is a URI, the problem can be thought in terms of finding a way to turn an An

[android-developers] Re: How to control a sound notification duration?

2008-12-13 Thread elDoudou
Thank you for the information. I was mislead because the Android built-in ring tones under 'system/ media/audio/ringtones' seem to loop when played. Yes, the idea of scheduling an alert for cancelling the notification is a solution, if the sound is looping. --~--~-~--~~~--

[android-developers] Re: How to control a sound notification duration?

2008-12-12 Thread elDoudou
Maybe my request was not clear enough: is there a way to indicate for how long a sound is played when a sound-based notification is triggered, please? Thank you, Édouard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[android-developers] How to control a sound notification duration?

2008-12-10 Thread elDoudou
Hello. Could not find a thread of discussion nor information on the web on how to control the duration of a sound playing for a notification. The "Notification" class does not seem to offer that feature. Am I missing something, please? Thank you. Édouard --~--~-~--~~~

[android-developers] Astronomical Android Dev Phone 1 shipping free

2008-12-08 Thread elDoudou
Dear Google Team. Just wanted to react over the now available "Android Dev Phone 1" device, which is available at $399. A very good news, if you omit the $183,81 shipping fee (at least from France), resulting from what is named "UPS Innovations". I was about to purchase it, but at check-out final

[android-developers] Re: No audio picker activity?

2008-10-31 Thread elDoudou
Thank you for this valuable information. I think that I will use the Rings Extended app in the meantime. Does anyone knows when the Android SDK will provide built-in: - a video-capturing activity? A video picking activity? - a photo capturing activity? Photo picking is already implemented, right?

[android-developers] No audio picker activity?

2008-10-31 Thread elDoudou
Hello. Did I miss something, because, when attempting to run an intent with the action "Intent.ACTION_PICK" and the type "audio/*" (and with a SD card present with audio files on it), I get a "ERROR/ AndroidRuntime(1016): android.content.ActivityNotFoundException: No Activity found to handle Inte

[android-developers] Re: Read/write files on the device SD card from a desktop/laptop application

2008-10-31 Thread elDoudou
Thank you Romain. Since I'm not a G1 owner (leaving in France, you know what I mean :), didn't know that, when USB-plugged, the Android device was recognized as a usual USB storage (this is what I understand from your answer). 1. I guess that the mounted volume is the "/sdcard" folder, right? 2.

[android-developers] Read/write files on the device SD card from a desktop/laptop application

2008-10-31 Thread elDoudou
Hi. I need to write a desktop application (let's say under Windows to start with), which needs to access the Android device SD card in read and write mode, so that the application can upload/download files, and create/delete folders on the remote device. Lately, I had a guess by using the Window

[android-developers] Re: A Bitmap/Drawable from GTalk avatar?

2008-06-19 Thread elDoudou
Someone asking for a snippet of code for computing a Gmail acount avatar. Since I'm not totally a bad person, here it is: String gtalkAccount = "userName" + "@gmail.com"; String imFilter = Im.Contacts.USERNAME + "='" + gtalkAccount + "'"; Cursor imCursor = contentResolver.query(Im.Contacts.CONTEN

[android-developers] Re: tracview: "Qemu trace files not supported yet."

2008-05-30 Thread elDoudou
I do not know how I went to this conclusion, but the traceview tool works perfectly on my Mac OS :) Sorry for the previous bad post. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post t

[android-developers] Re: A Bitmap/Drawable from GTalk avatar?

2008-05-18 Thread elDoudou
Just to let you know that I've found one piece of answer regarding the way to create a bitmap from a GTalk avatar through the post http://groups.google.com/group/android-developers/browse_thread/thread/b9a52b08872f37ab?fwc=1: it works. --~--~-~--~~~---~--~~ You rece

[android-developers] A Bitmap/Drawable from GTalk avatar?

2008-05-12 Thread elDoudou
Hello there. I'm trying to extract a Bitmap/Drawable from the Instant Messaging database (located in "/data/data/com.google.android.providers.im/ databases/im.db"). In the "_data" column of the "avatars" table, there seem to be binary information corresponding to the portrait of a GTalk/ Gmail ac

[android-developers] Re: Bug in date picker?

2008-05-05 Thread elDoudou
Just to notify you that I've double-checked on my side and that the problem is still there. I've reported what seems t be a bug under the Android issue under http://code.google.com/p/android/issues/detail?id=697. Seems to be a problem of locale... Cheers, Edouard --~--~-~--~~-

[android-developers] tracview: "Qemu trace files not supported yet."

2008-04-20 Thread elDoudou
Just to indicate that on Mac Os, when using the "Debug" class in order to audit an application, when I want to analyze the logs by using the traceview command, I get a "Qemu trace files not supported yet." error message. Is it due to the fact that I'm on MacOS? Is the traceview tool not totally i

[android-developers] Open the contact picker activity with a specific contact defaulty selected

2008-04-01 Thread elDoudou
I would like to know whether this is possible to open the contacts picker activity and have a specific contact selected? I use the following snippet of code: startSubActivity(new Intent(Intent.PICK_ACTION, Contacts.People.CONTENT_URI), 0); in order to open the activity, and it works perfectly.