[android-developers] How to manually show the EditTextPreference dialog?

2009-02-11 Thread Kuba Lipiński

Hi,

I have a Preferences dialog with some EditTextPreference elements. The
preference values can be edited by end-users when they click on the
particular item. However, at the first application launch, I would
like to create a sort of wizard to guide the end-users through the
configuration. I need to show the EditTextPreference edit dialog
programatically. Somehow I need to emulate the end-user clicked on the
preference.

Is it possible?

Cheers,

Kuba

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to receive connectivity change notifications?

2009-01-29 Thread Kuba Lipiński

I'm answering myself:

So actually it works well. I was expecting the broadcast to be sent
more frequently, but it looks like my G1 is keeping the connection
open all the time. The easiest way to test the broadcast is to go to
settings and switch to 2G and back to 3G. The event is fired.

Cheers,

Kuba

On Jan 23, 8:12 pm, Kuba Lipiński  wrote:
> Hello,
>
> I would like my service to be started when the phone is connected to
> the Internet.
>
> I created a class MyReciever which extends BroadcastReceiver and
> starts my service when onReceive is called with intent
> android.net.conn.CONNECTIVITY_CHANGE as parameter.
>
> I added following lines to my application manifest:
>
>                                   android:enabled="true"
>                  android:priority = "0">
>                     
>                          android:name="android.net.conn.CONNECTIVITY_CHANGE" /
>
>                     
>                 
>
>     
>
>          android:name="android.permission.ACCESS_NETWORK_STATE" />
>         
>
> Unfortunatelly MyReciever.onReceive is never call when I establish the
> Internet connection using any different application. Why is that?
>
> Cheers,
>
> Kuba
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to receive connectivity change notifications?

2009-01-23 Thread Kuba Lipiński

Hello,

I would like my service to be started when the phone is connected to
the Internet.

I created a class MyReciever which extends BroadcastReceiver and
starts my service when onReceive is called with intent
android.net.conn.CONNECTIVITY_CHANGE as parameter.

I added following lines to my application manifest:












Unfortunatelly MyReciever.onReceive is never call when I establish the
Internet connection using any different application. Why is that?

Cheers,

Kuba
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] An activity, a service and receivers - an architectural question

2009-01-21 Thread Kuba Lipiński

Hello,

I'm not sure if I correctly understand the application life cycle and
would like to consult the architecture of my application with the
group.

My application is intended to perform some time consuming (about 30
seconds) operation from time to time. The operation can be either
invoked by the end-user (from app UI) or by some system event (through
receiver). The operation should be performed in background but its
current status should be visible on the application window. One
operation can be performed at one time. They should not overlap. If
new events which invoke the operation occur when the operation is
already running, the new operation should start after the running one
ends.

My current package consists of following elements:
The Service - the whole operation is performed in onStart()
2 receivers which just launch the service by calling startService()
The Activity which is about to display a status and from which the end-
user can start the service (via startService())

My questions are following:
Should the service run in separate process (via remote attribute)?
Will it be able to still share the preferences?
Or maybe the service can run in the same process? But will UI work
during the operation?
The operation does not need any parameters. Do I need to define IDL's
etc? Or calling startService() is enough?
What if startService() is called but the service is busy in onStart()?
Will the request be queued? Or should I run the operation in the
separate thread and create my own queue?
How to share the operation status (text only) between the service and
the UI? Is SharedPreferences suitable for this purpose?

Thanks

Kuba


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---