J'ai mis en place un bouton dans mon application mobile et avoir un champ de texte avec un numéro de téléphone. Ce que je veux atteindre: Lorsque l'utilisateur Cliquez sur le bouton-> La page par défaut pour envoyer des SMS est ouverte dans Android et le Telefonnummer est Coller dans le champ de texte numérique par défaut pour Android.Comment mettre en œuvre dans JAVAFX/Gluon un bouton pour aller à l'envoi par défaut Message pour mon Android Mobile
I Utilisation gluons mobile avec JavaFX
:compileJava/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:4: error: package android.content does not exist
import android.content.Intent;
^
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:5: error: package android.net does not exist
import android.net.Uri;
^
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:12: error: cannot find symbol
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
^
symbol: class Intent
location: class AndroidSMSService
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:12: error: cannot find symbol
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
^
symbol: class Intent
location: class AndroidSMSService
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:12: error: cannot find symbol
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
^
symbol: variable Intent
location: class AndroidSMSService
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:13: error: cannot find symbol
smsIntent.setData(Uri.parse("sms:"));
^
symbol: variable Uri
location: class AndroidSMSService
/Users/yotti/CAMVOYAGE/MultiViewProjectFXML/src/main/java/com/gluonapplication/views/AndroidSMSService.java:15: error: cannot access Activity
FXActivity.getInstance().startActivity(smsIntent);
^
class file for android.app.Activity not found
7 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Pereda J'ai essayé votre solution et ajouté un groupe de compilation: 'com.google.android', nom: 'android', version: '4.1.1.4' à Gradle. mais j'ai cette erreur com.android.builder.packaging.DuplicateFileException: Dupliquer les fichiers copiés dans les ressources APK.arsc. La dépendance est-elle incorrecte? –
Pourquoi ajoutez-vous la dépendance Android? Il est déjà inclus par le plugin jfxmobile –
Lorsque je l'enlève, j'ai ce paquet d'erreur android.content n'existe pas. impossible de trouver le symbole Intention smsIntent = new Intent (Intent.ACTION_VIEW); –