Results 1 to 6 of 6
Thread: toast wont work in time
- 04-10-2012, 10:22 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 12
- Rep Power
- 0
toast wont work in time
hi there
iam trying to make a toast in specific time , but when i start the emulator and wait for the minute to change it dosent do anything ,
but reloading the application shows the toast massage (just in that minute).
here is the code:
why that happens and how i can fix this so it work on time without refreshing it to get the result .Java Code:public class Awkat_sala_lodActivity extends Activity { MediaPlayer myAudio; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Calendar ci = Calendar.getInstance(); String CiDateTime = (ci.get(Calendar.MONTH) + 1) + "/" + ci.get(Calendar.DAY_OF_MONTH) + " " + ci.get(Calendar.HOUR_OF_DAY) + ":" + ci.get(Calendar.MINUTE); myAudio = MediaPlayer.create(this, R.raw.ce); ///// if(ci.get(Calendar.MONTH) + 1 == 4) { if(ci.get(Calendar.DAY_OF_MONTH) == 10){ if(ci.get(Calendar.HOUR_OF_DAY) == 20 ){ if(ci.get(Calendar.MINUTE) ==05){ Toast.makeText(Awkat_sala_lodActivity.this, "test", Toast.LENGTH_LONG).show(); myAudio.start(); } }
thanks for the helpers and have a nice day.
- 04-11-2012, 07:25 AM #2
- 04-11-2012, 07:35 AM #3
Member
- Join Date
- Oct 2011
- Posts
- 12
- Rep Power
- 0
Re: toast wont work in time
hi
iam not using db
emulator = virtual mobile device that runs on your computer
- 04-11-2012, 07:58 AM #4
Re: toast wont work in time
CLDC/MIDP or Android?
That's my initials, silly.iam not using db
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-11-2012, 08:17 PM #5
Member
- Join Date
- Oct 2011
- Posts
- 12
- Rep Power
- 0
Re: toast wont work in time
Android
- 04-11-2012, 09:34 PM #6
Similar Threads
-
Why wont it work???
By fredrik8719 in forum New To JavaReplies: 0Last Post: 04-08-2012, 07:38 PM -
Why Wont This Work???
By Billywizz in forum New To JavaReplies: 11Last Post: 03-09-2011, 02:33 AM -
why wont the %.2f work here?
By jjth39347 in forum New To JavaReplies: 2Last Post: 03-06-2011, 05:55 AM -
class that wont work out properly.
By vampire-elf in forum New To JavaReplies: 7Last Post: 09-07-2010, 01:39 AM -
save will work but load wont?!?!
By Sticks_ll in forum New To JavaReplies: 1Last Post: 06-12-2008, 04:19 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks