Reputation: 408
i have opened activity with disabled button, this activity when it opened automatically sends SMS message(Query Message) to our service provider . (that's the mission of this activity ).
NOW the trick i have broadcastreceiver listen to reply of my Query Message in some conditions i want to Enable button on the already opened activity .
in simple words - i want to enable, the disabled button in activity according of received message in broadcastreceiver while activity opened?
thanks
Upvotes: 1
Views: 162
Reputation: 12179
If you already have registered BroadcastReceiver
in this activity than just use setEnabled(true)
in onReceive
method:
@Override
public void onReceive(Context context, Intent intent) {
button.setEnabled(true);
}
Upvotes: 1