GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile 2024
→
Creating a SHARE button in Android
Creating a SHARE button in Android
Iniciado por Luca Forti, set., 06 2017 10:21 AM - 1 resposta
Conecte-se…
Luca Forti
#1
Publicado em setembro, 06 2017 - 10:21 AM
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
Denunciar
0
0
Rubén Sánchez Peña
#2
Membro registado
797 mensagems
Popularité : +40 (42 votes)
Publicado em setembro, 06 2017 - 11:46 AM
Hi. Change "PUBLIC" to "public"
Rubén
Mensagem modificada, setembro, 06 2017 - 11:47 AM
Denunciar
0
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto