PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
[WM17] Bouton share
[WM17] Bouton share
Started by antoine, Nov., 20 2012 3:06 PM - 4 replies
Connect yourself…
antoine
#1
Posted on November, 20 2012 - 3:06 PM
Bonjour,
je souhaiterai savoir si quelqu'un a réussi à mettre en place un bouton share sous android permettant d'effectuer un partage avec les differentes applications installée sur l'android.
Comme cela :
Si oui pouvez vous m'aider.
Cordialement
Report
0
0
tony
#2
Posted on November, 21 2012 - 3:49 PM
Cela m’intéresse fortement aussi.
Report
0
0
wddev
#3
Posted on November, 22 2012 - 10:09 AM
C'est une nouveauté de la version 18.
Report
0
0
Laura L.
#4
Registered member
11 messages
Posted on December, 06 2012 - 11:48 AM
Et voila !
(remplacer "application/pdf" par le type de fichier à partager)
Laura
import android.net.Uri
;
import java.io.File
;
PUBLIC static
void Share
(
string
pdfPath
)
{
try
{
Intent shareIntent
=
new
Intent
(
)
;
shareIntent.setAction
(
Intent.ACTION_SEND
)
;
shareIntent.putExtra
(
Intent.EXTRA_STREAM
,
Uri.parse
(
new File
(
pdfPath
)
.
toString
(
)
)
)
;
shareIntent.setType
(
"application/pdf"
)
;
getActiviteEnCours
(
)
.
startActivity
(
Intent.createChooser
(
shareIntent
,
"Share"
)
)
;
}
catch
(
EXCEPTION
e
) {
}
}
Report
0
0
tony
#5
Posted on December, 07 2012 - 12:02 AM
Merci de votre réponse mais cela ne fonctionne pas windev me retourne une erreur:
Erreur retournée :
src\com\**\**\wdgen\GWDCPProceduresGlobales.java:950: error: <identifier> expected
PUBLIC static void Share(string publication)
^
la fonction est appelé comme cela Share("test")
merci d'avance
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text