How to get the SMS massage?

by lukewar » Tue, 13 Jan 2009 01:14:03 GMT


Sponsored Links
 I have a problem, how to get the sms massage in adroid. I have found a
solution how to get the incoming sms massage but still i can not get
to the already stored massages. Please help.
Luke

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



How to get the SMS massage?

by PRATAP SOLAPUR » Tue, 13 Jan 2009 13:14:07 GMT


 Look into android.telephony.gsm ann smsmanager classes...............




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


Sponsored Links


How to get the SMS massage?

by Genesio » Tue, 13 Jan 2009 19:00:58 GMT


 The simplest example is to open a Cursor in this way:

Cursor curSms = managedQuery(Uri.parse("content://sms"), null, null,
null, null);
(you can add /inbox in the Uri to get only incoming messages)

This Cursors has the following columns:

addressCol= mCurSms.getColumnIndex("address");
personCol= mCurSms.getColumnIndex("person");
Note: this is the Contact ID of the corresponding person, not the
actual Contact Name. You have to open a Cursor with People.CONTENT_URI
and get the value in "display_name" column.
dateCol = mCurSms.getColumnIndex("date");
protocolCol= mCurSms.getColumnIndex("protocol");
readCol = mCurSms.getColumnIndex("read");
statusCol = mCurSms.getColumnIndex("status");
typeCol = mCurSms.getColumnIndex("type");
subjectCol = mCurSms.getColumnIndex("subject");
bodyCol = mCurSms.getColumnIndex("body");

Some values are null, so make sure you check them.

Have fun.

Genesio
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Questions about adding an external shared library to Android image (donut)

Hi,
I have determined (or so I hope) how to add a new shared library to
the external part of Android image:
1. Add a directory called "foobar", under <root>/external
2. In that folder put my source files
3. Create Android.mk file
4. Update the file <root>/build/core/prelink-linux-arm.map and add my
library there, in the last section (titled "libraries for specific
apps..."), choosing a free memory area
5. Use the 'mm' or 'mmm' shell functions to build the library.

The output is (between dashed lines):
--------------------------
make: Entering directory `/media/disk-1/development/Donut/donut'
target thumb C: libfoobar <= external/foobar/src/foobar_01.c
target thumb C: libfoobar <= external/foobar/src/foobar_02.c
target SharedLib: libfoobar (out/target/product/generic/obj/
SHARED_LIBRARIES/libfoobar_intermediates/LINKED/libfoobar.so)
target Prelink: libfoobar (out/target/product/generic/symbols/system/
lib/libfoobar/libfoobar.so)
target Strip: libfoobar (out/target/product/generic/obj/lib/
libfoobar.so)
Install: out/target/product/generic/system/lib/libfoobar.so
make: Leaving directory `/media/disk-1/development/Donut/donut'
--------------------------

So far, so good.

My questions are:
1. Is the process above correct? If not, where did I go wrong?
2. Is this process documented and if so, where?
3. How do I prevent the library from being stripped?
4. Alternatively, can I tell the make process to preserve certain
symbols and strip all others?
5. If I want the foobar library to be built from objects and
libraries, located elsewhere, without any C compilations, how do I do
it by tweaking the Android.mk file?

Thanks,
Amir

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

2. Kernel Stuck

Hi all, i try to porting android to omaop 3430 and i have problem like
that

#mmcinit
#fatload mmc 0 80300000 uImage
# bootm 80300000

## Booting image at 80300000 ...
   Image Name:   Linux-2.6.24.7-omap1-
arm2
   Image Type:   ARM Linux Kernel Image
(uncompressed)
   Data Size:    2191272 Bytes =  2.1
MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

and my kernel stuck at point..any idea?

Best Regards,
Aldyth M

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Ongoing...

4. Anyone else notice that the "Top" apps in android.market.com seem inaccurate?

5. Create Cool styled buttons

6. Send audio via mms

7. where to call ListView.clearChoices()