0
I got my main class where I got
... String ola = "Hello fellas";
and I have my other class:
public class NotificacaoDiaria extends BroadcastReceiver {
@Override
public void onReceive(Context arg0, Intent arg1) {
Toast.makeText(arg0, "Funciona!!!", Toast.LENGTH_LONG).show();
Toast t = Toast.makeText(this, ola, Toast.LENGTH_SHORT).show();
}
}
I want this string to be interpreted here, not for this function, but so I can control it in this class.
in the main class of the certificate, only in the Broadcastreceiver you have to adapt: public void onReceive(Context arg0, Intent arg1) { String test = arg1.getStringExtra("test"); Maketoast.Text(arg0, test, Toast.LENGTH_LONG). show();}
– JBarbosa