FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV Mobile 2024
→
Creating a SHARE button in Android
Creating a SHARE button in Android
Iniciado por Luca Forti, 06,sep. 2017 10:21 - 1 respuesta
Conéctese…
Luca Forti
#1
Publicado el 06,septiembre 2017 - 10:21
Hi everyone, I'm trying to create a share button in my android application to open the share chooser and send a text.
I found this java code online (it works in Android Studio) but I can't make it work in WinDev:
import android.content.Intent;
import android.content.Context;
import android.app.Activity;
PUBLIC static void OpenShare()
{
// Context context;
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Send text..."));
}
I wrote the code in a global procedure but when I generate the app, the error is:
Failure creating the Android application named <C:\My Mobile Projects\XXXXXXXX\Exe\Android application\XXXXXXXX.apk>.
Command Line: "C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" "-Dorg.gradle.appname=C:\My Mobile Projects\XXXXXXXX\Android\Generation" -classpath "C:\WINDEV Mobile 22\Personal\Android\Gradle\lib\gradle-launcher-2.14.1.jar" org.gradle.launcher.GradleMain assembleRelease -b "C:\My Mobile Projects\XXXXXXXX\Android\Generation\build.gradle"
Error returned:
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\My Mobile Projects\XXXXXXXX\Android\Generation\src\com\XXXXXXXX\XXXXXXXX\wdgen\GWDCPCOL_Java.java:31: error: <identifier> expected
PUBLIC static void OpenShare()
^
1 error
:compileReleaseJavaWithJavac FAILED
--------------------
Can someone help me?
Luca
Informar
0
0
Rubén Sánchez Peña
#2
Miembro registrado
797 mensajes
Popularité : +40 (42 votes)
Publicado el 06,septiembre 2017 - 11:46
Hi. Change "PUBLIC" to "public"
Rubén
Mensaje modificado, 06,septiembre 2017 - 11:47
Informar
0
0
→ Volver a WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto