I'm new on this Android thing and i dont know how to proceed from this point.
I would like to apply a rule to a button, the idea is simple. I got this button and when i press it, it has two options: it should check the code, if it matches then it start one Activity, if not, keep going as usual.
if it is the "same" as the data base, it goes to this new Activity
else it keep rooling the same class as it is.
I reach to this code, but i got no idea how to proceed from here.
That is my code :
public void Send(View view) throws IOException {
BdLocal bd = new BdLocal(this);
if (bd.getCodeCompany() == "0A0A0A0A0A0A0A") {
Intent intent = new Intent(NewCompanyCodeActivity.this, NewCompCodeSetup.class);
startActivityForResult(intent, 0);
} else {
//i dont know how to put the cass SendHug here
//Object.getClass(SendHug);?
}
class SendHug extends AsyncTask<String, Void, String>{
... }
Separated this Activitys and class work fine
Thanks!
Aucun commentaire:
Enregistrer un commentaire