How Can I Fix This Intent Issue?
TL;DR: How can I give one intent a preference over another? If two intents are run at the same time, I want only one of those intents to start. My game has a 20 second timer runni
Solution 1:
do timer checking on user click event should do it. or you can use flag/boolean to maintain state.
i dont know your code, just use simple conditional if..
if (timer <= 0){
//open whatever u want and reset timer again..
}
Solution 2:
I am suggesting you to take a global variable as a flag,
let say int = 0
Now initialize it as "0" and on your both intents give condition as below:
if(i == "0"){
.
.
.
//fire your intent..
i= 1;
}
,And then flush that variable to "0" whenever you want.Hope you got idea.
Post a Comment for "How Can I Fix This Intent Issue?"