1 Replies - 437 Views - Last Post: 01 September 2012 - 07:59 PM

#1 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 146
  • Joined: 30-November 11

Method call never reached

Posted 01 September 2012 - 04:54 PM

I have the following method:
switch(selected){
		case 0:
			 
			// get a Calendar object with current time
			  cal = Calendar.getInstance();
			 // add 5 minutes to the calendar object
			// cal.add(Calendar.MINUTE, m );
			// cal.set(year, month, day, 0, m);
			  i = 0;
			  intent = new Intent(this, AlarmReceiver.class);
			 intent.putExtra("vns", i);
			 
			  sender = PendingIntent.getBroadcast(this, 192837, intent, PendingIntent.FLAG_UPDATE_CURRENT);
			 
			
			  am = (AlarmManager) getSystemService(ALARM_SERVICE);
			 am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);
			 
			 ads();
			 
			
			break;

however the method call (ads())is never activated, or anything else for that matter. How can I remedy this situation?

Is This A Good Question/Topic? 0
  • +

Replies To: Method call never reached

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4336
  • View blog
  • Posts: 12,137
  • Joined: 18-April 07

Re: Method call never reached

Posted 01 September 2012 - 07:59 PM

Umm debug it? Put a break point at the switch statement, check what the value of "select" is and see if it is zero. If it is not, then that would explain why none of the code in that part is being activated.

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1