Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uv-amse-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lucas NAURY
uv-amse-android
Commits
1f7cb7b3
Commit
1f7cb7b3
authored
Feb 22, 2024
by
Lucas NAURY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remplacement de l'Intent SMS
parent
e1bc847a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
DetailScreen.java
...rc/main/java/com/example/tpleboncoin/ui/DetailScreen.java
+3
-5
No files found.
app/src/main/java/com/example/tpleboncoin/ui/DetailScreen.java
View file @
1f7cb7b3
...
@@ -58,11 +58,9 @@ public class DetailScreen extends AppCompatActivity {
...
@@ -58,11 +58,9 @@ public class DetailScreen extends AppCompatActivity {
binding
.
smsButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
binding
.
smsButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
arg0
)
{
public
void
onClick
(
View
arg0
)
{
Intent
smsIntent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
Uri
uri
=
Uri
.
parse
(
"smsto:"
+
annonce
.
getNumeroTelephone
());
smsIntent
.
setData
(
Uri
.
parse
(
"sms:"
));
Intent
smsIntent
=
new
Intent
(
Intent
.
ACTION_SENDTO
,
uri
);
smsIntent
.
setType
(
"vnd.android-dir/mms-sms"
);
smsIntent
.
putExtra
(
"sms_body"
,
"Bonjour,\nJe suis intéressé par votre annonce \""
+
annonce
.
getTitre
()+
"\", n'hésitez pas à me recontacter. \n\n Merci"
);
smsIntent
.
putExtra
(
Intent
.
EXTRA_TEXT
,
""
);
smsIntent
.
putExtra
(
"address"
,
annonce
.
getNumeroTelephone
());
startActivity
(
smsIntent
);
startActivity
(
smsIntent
);
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment