IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Composants graphiques Android Discussion :

Progress Dialog avec thread


Sujet :

Composants graphiques Android

  1. #1
    Candidat au Club
    Homme Profil pro
    Technicien réseaux et télécoms
    Inscrit en
    Mai 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : Technicien réseaux et télécoms
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mai 2014
    Messages : 6
    Points : 4
    Points
    4
    Par défaut Progress Dialog avec thread
    Bonjour à tous,

    Je crée une application android dans laquelle l'utilisateur doit se logger pour avoir accès à l'appli. Le code marche bien sauf que j'aimerai utiliser un thred pour afficher une progress dialog pendant la vérification des identifiants et lorsque je le fait l'appli se ferme et dans le logCat on lire : "thread exiting with uncaugth exception"

    Quelqu'un sait-il ce qu'il y a lieu de faire ?

    Voici mon code :

    Code Java : 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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.List;
     
    import org.apache.http.HttpResponse;
    import org.apache.http.NameValuePair;
    import org.apache.http.client.HttpClient;
    import org.apache.http.client.methods.HttpPost;
    import org.apache.http.message.BasicNameValuePair;
     
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.app.ProgressDialog;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.content.SharedPreferences;
    import android.os.Bundle;
    import android.preference.PreferenceManager;
    import android.view.Menu;
    import android.view.View;
    import android.widget.Button;
    import android.widget.CheckBox;
    import android.widget.EditText;
    import android.widget.TextView;
    import android.widget.Toast;
     
    public class ConnexionActivity extends Activity {
     
    	/** Called when the activity is first created. */
     
    	String name="",pass="";
    	EditText un,pw;  
    	TextView error;  
    	Button ok;
    	byte[] data;
    	HttpPost httppost;
    	StringBuffer buffer;
    	HttpResponse response;
    	HttpClient httpclient;
    	InputStream inputStream;
    	SharedPreferences app_preferences ;
    	List<NameValuePair> nameValuePairs;
    	private ProgressDialog progressDialog;
     
    	CheckBox check;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.connexion_layout);
     
    		un=(EditText)findViewById(R.id.username);  
    		pw=(EditText)findViewById(R.id.password);  
    		ok=(Button)findViewById(R.id.connexion);  
    		error=(TextView)findViewById(R.id.tv_error); 
     
     
    		app_preferences = PreferenceManager.getDefaultSharedPreferences(this);
    		un = (EditText) findViewById(R.id.username);
    		pw = (EditText) findViewById(R.id.password);
     
    		check = (CheckBox) findViewById(R.id.check);
     
    		String Str_user = app_preferences.getString("username","0");
    		String Str_pass = app_preferences.getString("password", "0");
    		String Str_check = app_preferences.getString("checked", "no");
     
    		if(Str_check.equals("yes"))
    		{
    			un.setText(Str_user);
    			pw.setText(Str_pass);
    			check.setChecked(true);
    		}
     
    		ok.setOnClickListener(new View.OnClickListener() {  
     
    			@SuppressWarnings("deprecation")
    			@Override  
     
    			public void onClick(View v) {  
    				// TODO Auto-generated method stub
     
    				//start the progress dialog
    				progressDialog = ProgressDialog.show(ConnexionActivity.this, "", "Loading...");
     
    				name = un.getText().toString();
    				pass = pw.getText().toString();
    				String Str_check2 = app_preferences.getString("checked", "no");
    				if(Str_check2.equals("yes"))
    				{
    					SharedPreferences.Editor editor = app_preferences.edit();
    					editor.putString("username", name);
    					editor.putString("password", pass);
    					editor.commit();
    				}
    				if(name.equals("") || pass.equals(""))
    				{
    					Toast.makeText(ConnexionActivity.this, "Champs vides .. Veuillez entrer vos identifiants", Toast.LENGTH_LONG).show();
    					error.setText("Champs invalides !!!");
    				}
    				else
    				{
    					new Thread() {
    						public void run() {
     
    							ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();  
    							postParameters.add(new BasicNameValuePair("username", name));  
    							postParameters.add(new BasicNameValuePair("password", pass));  
     
    							//String valid = "1";  
    							String response = null;  
    							try { 
    								//response = CustomHttpClient.executeHttpPost("http://127.0.0.1/ACMS_Project/connexion.php", postParameters);
    								response = CustomHttpClient.executeHttpPost("http://192.168.217.1/ACMS_Project/connexion.php", postParameters);  //Enetr Your remote PHP,ASP, Servlet file link  
    								String res=response.toString();  
    								// res = res.trim();  
    								res= res.replaceAll("\\s+","");  
    								//error.setText(res);  
     
    								if(res.equals("Y")) { 
    									error.setText("Accès autorisé"); 
    									// dismiss the progress dialog
    									progressDialog.dismiss();
    									Toast.makeText(getApplicationContext(), "Accès autorisé", Toast.LENGTH_LONG).show();
    									Intent i = new Intent(getApplicationContext(), DashbordActivity.class);
    									i.putExtra("selection", "causerie");
    									startActivity(i);
    								}
    								else{  
    									// dismiss the progress dialog
    									progressDialog.dismiss();
     
    									error.setText("Nom utilisateur et/ou mot de passe incorrecte"); 
     
    									AlertDialog alertDialog = new AlertDialog.Builder(ConnexionActivity.this).create();
    									// Setting Dialog Title
    									alertDialog.setTitle("Accès refusé");
    									// Setting Dialog Message
    									alertDialog.setMessage("Nom utilisateur et/ou mot de passe incorrecte");
    									// Setting Icon to Dialog
    									alertDialog.setIcon(R.drawable.busy);
    									// Setting OK Button
    									alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
    										public void onClick(DialogInterface dialog, int which) {
     
    											dialog.cancel();
    										}
    									});
    									// Showing Alert Message
    									alertDialog.show();
    								}
     
    							} catch (Exception e) { 
    								// dismiss the progress dialog
    								progressDialog.dismiss();
     
    								error.setText("Impossible de se connecter au serveur");
     
    								AlertDialog alertDialog = new AlertDialog.Builder(ConnexionActivity.this).create();
    								// Setting Dialog Title
    								alertDialog.setTitle("Connexion impossible");
    								// Setting Dialog Message
    								alertDialog.setMessage("Impossible de se connecter au serveur; Vérifier vos paramètres de connexion");
    								// Setting Icon to Dialog
    								alertDialog.setIcon(R.drawable.warning);
    								// Setting OK Button
    								alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
    									public void onClick(DialogInterface dialog, int which) {
     
    										dialog.cancel();
    									}
    								});
    								// Showing Alert Message
    								alertDialog.show();
    							}
     
    						} 
    					}.start();
    				}
    			}  
    		});
     
    		check.setOnClickListener(new View.OnClickListener()
    		{
    			public void onClick(View v)
    			{
    				// Perform action on clicks, depending on whether it's now checked
    				SharedPreferences.Editor editor = app_preferences.edit();
    				if (((CheckBox) v).isChecked())
    				{
    					editor.putString("checked", "yes");
    					editor.commit();
    				}
    				else
    				{
    					editor.putString("checked", "no");
    					editor.commit();
    				}
    			}
    		});
    	}
     
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater().inflate(R.menu.connexion, menu);
    		return true;
    	}
    }

    Merci

  2. #2
    Membre éclairé
    Avatar de LeBzul
    Homme Profil pro
    Inscrit en
    Décembre 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 381
    Points : 832
    Points
    832
    Par défaut
    Salut,
    Tu ne peux pas faire des actions modifiant l'UI autre part que dans le mainThread.
    Tu peux utiliser les Handler pour cela :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    	public Handler progressHandler = new Handler() {
    		public void handleMessage(android.os.Message msg) {
     
    			if (msg.what == 1) 
    			{
    				progressDialog.show();
    			} else if (msg.what == 0) 
    			{
    				progressDialog.dismiss();
    			}
    		};
    	};
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    progressHandler.sendEmptyMessage(0);
    "Quand la lune n'est pas là, la nuit mène une existence obscure"

  3. #3
    Candidat au Club
    Homme Profil pro
    Technicien réseaux et télécoms
    Inscrit en
    Mai 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : Technicien réseaux et télécoms
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mai 2014
    Messages : 6
    Points : 4
    Points
    4
    Par défaut
    Merci,
    dans ce cas où suis-je supposé ajouter ce bout de code ? Dois-je modifier le code initial ou juste ajouter le nouveau ?

  4. #4
    Membre éclairé
    Avatar de LeBzul
    Homme Profil pro
    Inscrit en
    Décembre 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 381
    Points : 832
    Points
    832
    Par défaut
    Ca devrait donner quelque chose comme ca :

    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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.List;
     
    import org.apache.http.HttpResponse;
    import org.apache.http.NameValuePair;
    import org.apache.http.client.HttpClient;
    import org.apache.http.client.methods.HttpPost;
    import org.apache.http.message.BasicNameValuePair;
     
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.app.ProgressDialog;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.content.SharedPreferences;
    import android.os.Bundle;
    import android.preference.PreferenceManager;
    import android.view.Menu;
    import android.view.View;
    import android.widget.Button;
    import android.widget.CheckBox;
    import android.widget.EditText;
    import android.widget.TextView;
    import android.widget.Toast;
     
    public class ConnexionActivity extends Activity {
     
    	/** Called when the activity is first created. */
     
    	String name="",pass="";
    	EditText un,pw;  
    	TextView error;  
    	Button ok;
    	byte[] data;
    	HttpPost httppost;
    	StringBuffer buffer;
    	HttpResponse response;
    	HttpClient httpclient;
    	InputStream inputStream;
    	SharedPreferences app_preferences ;
    	List<NameValuePair> nameValuePairs;
    	private ProgressDialog progressDialog;
     
    	CheckBox check;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.connexion_layout);
     
    		un=(EditText)findViewById(R.id.username);  
    		pw=(EditText)findViewById(R.id.password);  
    		ok=(Button)findViewById(R.id.connexion);  
    		error=(TextView)findViewById(R.id.tv_error); 
     
     
    		app_preferences = PreferenceManager.getDefaultSharedPreferences(this);
    		un = (EditText) findViewById(R.id.username);
    		pw = (EditText) findViewById(R.id.password);
     
    		check = (CheckBox) findViewById(R.id.check);
     
    		String Str_user = app_preferences.getString("username","0");
    		String Str_pass = app_preferences.getString("password", "0");
    		String Str_check = app_preferences.getString("checked", "no");
     
    		if(Str_check.equals("yes"))
    		{
    			un.setText(Str_user);
    			pw.setText(Str_pass);
    			check.setChecked(true);
    		}
     
    		ok.setOnClickListener(new View.OnClickListener() {  
     
    			@SuppressWarnings("deprecation")
    			@Override  
     
    			public void onClick(View v) {  
    				// TODO Auto-generated method stub
     
    				//start the progress dialog
    				progressDialog = ProgressDialog.show(ConnexionActivity.this, "", "Loading...");
     
    				name = un.getText().toString();
    				pass = pw.getText().toString();
    				String Str_check2 = app_preferences.getString("checked", "no");
    				if(Str_check2.equals("yes"))
    				{
    					SharedPreferences.Editor editor = app_preferences.edit();
    					editor.putString("username", name);
    					editor.putString("password", pass);
    					editor.commit();
    				}
    				if(name.equals("") || pass.equals(""))
    				{
    					Toast.makeText(ConnexionActivity.this, "Champs vides .. Veuillez entrer vos identifiants", Toast.LENGTH_LONG).show();
    					error.setText("Champs invalides !!!");
    				}
    				else
    				{
    					new Thread() {
    						public void run() {
     
    							ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();  
    							postParameters.add(new BasicNameValuePair("username", name));  
    							postParameters.add(new BasicNameValuePair("password", pass));  
     
    							//String valid = "1";  
    							String response = null;  
    							try { 
    								//response = CustomHttpClient.executeHttpPost("http://127.0.0.1/ACMS_Project/connexion.php", postParameters);
    								response = CustomHttpClient.executeHttpPost("http://192.168.217.1/ACMS_Project/connexion.php", postParameters);  //Enetr Your remote PHP,ASP, Servlet file link  
    								String res=response.toString();  
    								// res = res.trim();  
    								res= res.replaceAll("\\s+","");  
    								//error.setText(res);  
     
    								if(res.equals("Y")) { 
    									error.setText("Accès autorisé"); 
    									// dismiss the progress dialog
    									//progressDialog.dismiss();
                                                                            progressHandler.sendEmptyMessage(0);
    									Toast.makeText(getApplicationContext(), "Accès autorisé", Toast.LENGTH_LONG).show();
    									Intent i = new Intent(getApplicationContext(), DashbordActivity.class);
    									i.putExtra("selection", "causerie");
    									startActivity(i);
    								}
    								else{  
    									// dismiss the progress dialog
    									//progressDialog.dismiss();
                                                                            progressHandler.sendEmptyMessage(0);
    									error.setText("Nom utilisateur et/ou mot de passe incorrecte"); 
     
    									AlertDialog alertDialog = new AlertDialog.Builder(ConnexionActivity.this).create();
    									// Setting Dialog Title
    									alertDialog.setTitle("Accès refusé");
    									// Setting Dialog Message
    									alertDialog.setMessage("Nom utilisateur et/ou mot de passe incorrecte");
    									// Setting Icon to Dialog
    									alertDialog.setIcon(R.drawable.busy);
    									// Setting OK Button
    									alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
    										public void onClick(DialogInterface dialog, int which) {
     
    											dialog.cancel();
    										}
    									});
    									// Showing Alert Message
    									alertDialog.show();
    								}
     
    							} catch (Exception e) { 
    								// dismiss the progress dialog
    								//progressDialog.dismiss();
                                                                    progressHandler.sendEmptyMessage(0);
    								error.setText("Impossible de se connecter au serveur");
     
    								AlertDialog alertDialog = new AlertDialog.Builder(ConnexionActivity.this).create();
    								// Setting Dialog Title
    								alertDialog.setTitle("Connexion impossible");
    								// Setting Dialog Message
    								alertDialog.setMessage("Impossible de se connecter au serveur; Vérifier vos paramètres de connexion");
    								// Setting Icon to Dialog
    								alertDialog.setIcon(R.drawable.warning);
    								// Setting OK Button
    								alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
    									public void onClick(DialogInterface dialog, int which) {
     
    										dialog.cancel();
    									}
    								});
    								// Showing Alert Message
    								alertDialog.show();
    							}
     
    						} 
    					}.start();
    				}
    			}  
    		});
     
    		check.setOnClickListener(new View.OnClickListener()
    		{
    			public void onClick(View v)
    			{
    				// Perform action on clicks, depending on whether it's now checked
    				SharedPreferences.Editor editor = app_preferences.edit();
    				if (((CheckBox) v).isChecked())
    				{
    					editor.putString("checked", "yes");
    					editor.commit();
    				}
    				else
    				{
    					editor.putString("checked", "no");
    					editor.commit();
    				}
    			}
    		});
    	}
     
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater().inflate(R.menu.connexion, menu);
    		return true;
    	}
     
    	public Handler progressHandler = new Handler() {
    		public void handleMessage(android.os.Message msg) {
     
    			if (msg.what == 1) 
    			{
    				progressDialog.show();
    			} else if (msg.what == 0) 
    			{
    				progressDialog.dismiss();
    			}
    		};
    	};
    }
    Je pense qu'il faut faire quelque chose d'équivalent pour tes AlertDialog, sinon tu auras la même erreur.
    "Quand la lune n'est pas là, la nuit mène une existence obscure"

  5. #5
    Candidat au Club
    Homme Profil pro
    Technicien réseaux et télécoms
    Inscrit en
    Mai 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : Technicien réseaux et télécoms
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mai 2014
    Messages : 6
    Points : 4
    Points
    4
    Par défaut
    Pour l'alertDialog sais-tu comment personnaliser les messages et les titres qui s'affichent ?

  6. #6
    Membre éclairé
    Avatar de LeBzul
    Homme Profil pro
    Inscrit en
    Décembre 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 381
    Points : 832
    Points
    832
    Par défaut
    Je pense que j'ai pas compris la question..
    C'est ce que tu fais déjà ici, non ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    AlertDialog alertDialog = new AlertDialog.Builder(ConnexionActivity.this).create();
    // Setting Dialog Title
    alertDialog.setTitle("Connexion impossible");
    // Setting Dialog Message
    alertDialog.setMessage("Impossible de se connecter au serveur; Vérifier vos paramètres de connexion");
    // Setting Icon to Dialog
    alertDialog.setIcon(R.drawable.warning);
    "Quand la lune n'est pas là, la nuit mène une existence obscure"

  7. #7
    Candidat au Club
    Homme Profil pro
    Technicien réseaux et télécoms
    Inscrit en
    Mai 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : Technicien réseaux et télécoms
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mai 2014
    Messages : 6
    Points : 4
    Points
    4
    Par défaut
    Je veux dire au cas où je veux créer plus d'une alertDialog, en utilisant un Handler il faudrai personnaliser le titre et le message à afficher à chaque appel de la boite de dialog

  8. #8
    Membre éclairé
    Avatar de LeBzul
    Homme Profil pro
    Inscrit en
    Décembre 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 381
    Points : 832
    Points
    832
    Par défaut
    Ah ok !
    Tu peux envoyer des messages à ton Handler comme ci par exemple :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     Message message = handler.obtainMessage();
     Bundle bundle = new Bundle();
     bundle.putString("title", "My title");
     bundle.putString("text", "your string message");
     message.setData(bundle);
     handler.sendMessage(message);
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    public Handler progressHandler = new Handler() 
    {
    public void handleMessage(android.os.Message msg) {
     
                Bundle bundle = msg.getData();
     
                String textTitle = bundle.getString("title");
                String textMessage = bundle.getString("text");
    };
    };
    "Quand la lune n'est pas là, la nuit mène une existence obscure"

Discussions similaires

  1. Réponses: 5
    Dernier message: 13/09/2006, 17h47
  2. [SWING] Exception bizarre avec Thread
    Par Gob4 dans le forum Débuter
    Réponses: 2
    Dernier message: 13/09/2005, 22h55
  3. [MFC][DLL]Dialog Avec ActiveX dans une DLL ?
    Par matazz dans le forum MFC
    Réponses: 1
    Dernier message: 16/05/2005, 17h36
  4. [MFC] Cherche Timer avec thread
    Par romeo9423 dans le forum MFC
    Réponses: 17
    Dernier message: 09/03/2005, 11h33
  5. Variable static avec thread
    Par oxor3 dans le forum Threads & Processus
    Réponses: 7
    Dernier message: 27/08/2004, 12h45

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo