Professional Documents
Culture Documents
ANDROID
ODOO (OPENERP)
DJANGO
TRICKS
MEET TEAM
ADD A M E NU
ADD A M E NU
ARCH IVE S
June 2014
January 2014
December 2013
November 2013
October 2013
September 2013
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
Read
SMS
Mess
age
from
Inbo
x/
Sent
/
Draft
in
CONNECT
WITH
ME
TWITTEFACE
R
B OOK
GOOGLLEINKE D
P L U S IN
SUBSCRIBE
TO
BLOG
VIA
EM AIL
1/23
14/07/2015
in
Andr
oid
Email Address
SUBSCRIBE
POPU L AR
POSTS
b y V IM AL
OPENERP
RUGHANI
in ANDROID
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
In
previous
tutorial we
learn How to
send SMS
Message from
Android
Application.
Now its time to
learn How to
read SMS
Message from
Inbox / Sent /
Draft in android
application. To
complete this
task we will use
built-in SMS
Content
Provider of
Android. We
will create
Run
Odoo
from
port
80
instead
of
8069
RECENT
POSTS
OPENERP
Run
Odoo
from
port
80
instead
of
8069
DJANGO
Install
Django
on
Windows
8
2/23
14/07/2015
will create
simple Android
application,
which will have
3 buttons
(Inbox , Sent
and Draft) when
user click on
button it will
display SMS
Message of
respective
message box.
ANDROID
Read
NFC
Tag
with
Android
Application
OPENERP
Install
Odoo
on
Ubuntu
14.04
from
Github
OPENERP
Code to
read
SMS
Messag
e from
Inbox
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
Install
Odoo
(Open
ERP
v8)
on
Ubuntu
12.04
from
launchpad
3/23
14/07/2015
message.
01
02
03
04
05
06
07
08
09
10
11
Code to
read
SMS
Messag
e form
Sent
box
Now lets see
how to read
SMS Message
from mobile
sentbox
01
02
03
04
05
06
07
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
14/07/2015
07
08
09
10
11
Code to
read
SMS
Messag
e from
Draft
Lets read draft
messages from
mobile .
01
02
03
04
05
06
07
08
09
10
11
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
Permiss
ion
require
d to
5/23
14/07/2015
d to
Read
Messag
e from
Mobile
uses-permission
Databas
e
Column
s List of
Built-in
SMS
Content
Provide
r
Column ID -
Column Name
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
0 :
_id
1 :
thread_id
2 :
6/23
14/07/2015
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
2 :
address
3 :
person
4 :
date
5 :
protocol
6 :
read
7 :
status
8 :
type
9 :
reply_path_pre
sent
10 :
subject
11 :
body
12 :
service_center
13 :
locked
7/23
14/07/2015
from mobile.
Create New
Android
Project
1. Create a new
project and fill
the required
details File
New
Android
Project
2. Now open
main.xml
(res/layout)
and create
simple GUI
which have
three different
buttons, Inbox,
Sent and Draft.
and List view to
display list of
message.
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
01
02
03
04
05
06
07
08
09
10
11
12
13
<?xml
<LinearLayout
android:layout_width
android:orientation
<LinearLayout
8/23
14/07/2015
13
14
15
16
17
18
19
20
21
</
<ListView
</LinearLayout
3. Now open
Activity Class
where we will
fetch Built-in
SMS content
provider and
display
Messages in
listview.
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
package
import
import
import
import
import
import
import
import
import
import
import
public
// GUI Widget
Button btnSent, btnInbox, bt
TextView lblMsg, lblNo;
ListView lvMsg;
// Cursor Adapter
SimpleCursorAdapter adapter;
9/23
14/07/2015
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
}
@Override
public
10/23
14/07/2015
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
}
11/23
14/07/2015
4. Dont forget
to put below
permission in
AndroidMenifes
t.xml file
1
<uses-permission
5. Now execute
application.
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
12/23
14/07/2015
views to to
improve
content. Happy
Coding !!!
Down
load
Sourc
e
Code
Sh
are
this
:
Facebook 46
Google
Twitter 6
LinkedIn 1
Reddit
Go
ogl
e+
vimal rughani
Follow
391
Related
Tutorials
:
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
13/23
14/07/2015
How to send
SMS Message
in Android
Contacts
Content
SQLite
Database in
Tagged with:
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
14/23
14/07/2015
ABOUT
THE
AUTHOR
Vimal
Rughani
Working
as
Creative
Product
Manager
at
Virtual
Reality
Systems,
Rajkot,
India
Comments
Community
1
Login
Recommend 6
Sort by Best
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
15/23
14/07/2015
Hi at first
thanks a lot
for your
tutorial! I
need it for
my app but
I need also
to get text
from sms
to editText
when I
click on
one of
those
shown
sms in list.
Could you
help me
with this
task or just
give a hint
? Thanks
for your
time
1
Reply
Share
Vimal
Rughani
Mod
>
Robert
Greso
a
year
ago
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
Hi
Robert,
I
am
happy
that
you
liked
16/23
14/07/2015
liked
my
tutorial.
It
will
be
my
pleasure
to
help
you
in
your
task.
If
you
want
to
extend
this
example
to
full
fill
your
needs,
you
need
to
set
setOnItemClickListener
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
for
your
message
listview
(lvMsg).
In
that
part
you
can
set
sms
content
into
your
desired
edittextbox.
Please
17/23
14/07/2015
Please
let
me
know
if
you
find
any
difficulty,
you
can
send
me
your
code
for
exact
answer.
Reply
Share
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
18/23
14/07/2015
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
19/23
14/07/2015
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
20/23
14/07/2015
eshal
2
days
ago
hai sir!
will you
help me
please ..
your
tutorial is
best but i
am not
gettig how
to set the
listView
inside item
which you
have given
ids {
ibimsg nd
ibinumber}.
i am new
to android
and
working on
messages
field in
android
thanks
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
21/23
14/07/2015
Reply
Share
Vimal
Rughani
Mod
>
eshal
a
day
ago
Hi
Eshal,
You
have
to
use
custom
row
for
your
listview.
You
can
download
full
source
code
from
download
link.
in
that
code
you
will
find
row.xml
file
which
is
used
for
custom
row.
You
can
put
any
details
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
22/23
14/07/2015
which
you
want
to
put.
Let
me
know
if
you
have
any
query.
Reply
Share
hossein
shooshtari
PULSE7
http://pulse7.net/android/read-sms-message-inbox-sent-draft-android/
23/23