Bonjour,

je voudrais créer une connexion automatique au bluetooth et au reseau mobile d'un smartphone androide.

pour le bluetooth pas de probleme via le fonction
BTactive(vrai)

mais pour le reseau mobile je ne trouve pas comment faire.

pouvez vous m'aider ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
SELON BTEtat()
	CAS btActif:
		LIB_status_BT..Libellé = "Bluetooth ON"
	CAS btDésactivé:
		LIB_status_BT..Libellé = "Bluetooth OFF"
		BTActive(Vrai)
		TANTQUE BTEtat() = btActivationEnCours
			LIB_status_BT..Libellé = "Activation bluetooth"
		FIN
		SI BTEtat() = btActif ALORS
			LIB_status_BT = "Bluetooth ON"
		SINON
			LIB_status_BT = "Erreur activation"
		FIN
FIN
 
SELON RéseauMobileEtat()
	CAS réseauConnecté:
		LIB_status_RM..Libellé = "Réseau mobile ON"
	CAS réseauDéconnecté:
		LIB_status_RM..Libellé = "Réseau mobile OFF"
 
FIN