Okay, now for the third time in 4 days, I will try to get this message
posted....
Anyway, I have a problem while showing a custom dialog.
In an Activity where I have to enter a couple of different settings
for my application, I want to show a custom dialog on which I want to
let the user put in an IP-Address and a port, to use as endpoints
where I send data to. The IP-Addresses & ports shall be shown in the
Activity in a listview. To add another endpoint, you have to press the
Add button right beneath it.
Now this is where the custom dialog shows up. On it I have 2
EditTexts, and 2 Buttons. However, when I try to add handlers to the
Buttons, they returned as null, at first. After some searching, I
found out I used the wrong context (the application context instead of
the activity context). But when I try to run it now, it will still end
my application. When I check the logcat, it will say:

requestfeature must be called before adding content.

I tried doing this by calling requestWindowFeature(), but this didn't
do anything to help me... Could anybody help me with this?

I also have a question about DatagramSockets... Like I would like to
be able to change settings in a socket while I run my app (like
changing it's port, IP-Address will remain the same). But how could I
achieve this?

Lastly, I have trouble with starting a service in my app. In my code,
I call the service like this:

        // Create Intent and add data to it
        Intent serviceIntentWithData = new
Intent(getApplicationContext(),
                        UDPClientService.class);
        Bundle serviceData = new Bundle();

        serviceData.putStringArray("Raw EndPoints", mEndPointData);

        serviceIntentWithData.putExtras(serviceData);

        // Start the service
        startService(serviceIntentWithData);

However, my application will end as soon as startService is called.
It might be that I try to start a DatagramSocket in the service on the
Emulator, which it doesn't like to do. Or it might be something else,
which I don't know...

Please, if you have an answer to any of these questions, please fill
me in on this...
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to