Content Observer

by Kiran » Fri, 19 Feb 2010 02:19:14 GMT


Sponsored Links
 As per normal content observer, you will just get to know that content
has been changed but not the data.

So how can I exactly find out what changes has been made using Content
Observer?
Is there any alternative way to obtain the changes done on specific
content URI?

Thanks a lot in advance !!

Thanks
kiran

--



Other Threads

1. How to use AutoCompleteTextView with SimpleCursorAdapter

Hello,

I have an application that involves reading a text dictionary file with
about 7000 entries, and allowing the user to choose one of these. My first
approach was to allow the user to select one of these by using a
AutoCompleteTextView together with ArrayAdapter<String>. This works, but is
very slow (~10 seconds to update the word list each time the user enters a
character to narrow down the choice).

I was wondering how to rework it so that I could use a database using a
SimpleCursorAdapter instead. In other words, to hope that a SQL database
could provide a more efficient ordering and access for the elements.
Is this the best way to do it? I've also seen several references to
SQLiteDatabase, but don't know which one to use.

I found this code fragmant consisting of an extended SimpleAdapter.
http://sacoskun.blogspot.com/2008/08...leadapter.html<http://sacoskun.blogspot.com/2008/08/autocompletetextview-with-simpleadapter.html>

Unfortunately, this is not a complete worked out example. Could someone
forward me a more complete example? I've found lots of code fragments, but
no code that shows how to initialise the SimpleCursorAdapter contents, or
how it works together with the AutoCompleteTextView.

Many thanks,
Paul

--~--~---------~--~----~------------~-------~--~----~

2. Multicast problem

Hi, I'm trying to develop an application that need to send UDP
Multicast packets to the local network.
There is a few equipments that respond to this packets and send back
some informations.
I'm not worried with the server right now, because there is a server
on the same network that collect all this multicast data.
I just want to make my mobile able to send the request message to
start the process.

My client class is called MCastClient, see below:
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;

public class MCastClient {
        private int port = 50000;
        private String addr = "239.192.1.100";
        private MulticastSocket sock = null;

        public void sendData(String data) {
                try {
                        InetAddress group = InetAddress.getByName(addr);

                        sock = new MulticastSocket(port);

                        sock.joinGroup(group);

                        DatagramPacket dataPckt = new 
DatagramPacket(data.getBytes(),
                                        data.length(), group, port);

                        sock.send(dataPckt);
                        sock.leaveGroup(group);
                        sock.close();
                } catch (Exception e) {}
        }
}

It runs perfectly on my computer as a Java Application.

On the Android Emulator i create a simple application with a button
and add a OnClickListener.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    final MCastClient mcClient = new MCastClient();
    Button btn = (Button)findViewById(R.id.btn_send);

    btn.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            mcClient.sendData("001RequestData");
        }
    });

I believe that my packet is not arriving on the local network.
I already did some test with the command "redir add udp:50000:50000"
on telnet port of the emulator, that i got from
http://developer.android.com/guide/developing/tools/emulator.html#connecting.

There is any other command that can forward ports to the emulator?
I'm almost putting a port sniffer on my machine just to check what is
happening.

Thanks for the help, it will be very appreciated.
Thiago B.


--~--~---------~--~----~------------~-------~--~----~

3. who put an icon in status bar to indicate the mobile network type?

4. Post subject: Store the data in raw folder of res directory

5. Email Configuration - Compose activity

6. About music recording

7. How to order the items of GridView?