I am trying to write an app that calls APNDroid for enabling/disabling the 3G. I looked at the code snippets provided by the developer. I can't seem to understand how to incorporate them in my code. Here is the code snippet I am referring to:
boolean targetState = getCheckBoxState(R.id.target_state);
boolean keepMms = getCheckBoxState(R.id.keep_mms);
boolean showNotification = getCheckBoxState(R.id.show_notification);
Intent intent = new Intent(ApplicationConstants.CHANGE_STATUS_REQUEST);
int onState = ApplicationConstants.State.ON;
int offState = ApplicationConstants.State.OFF;
intent.putExtra(ApplicationConstants.TARGET_MMS_STATE, keepMms ? onState : offState);
intent.putExtra(ApplicationConstants.TARGET_APN_STATE, targetState ? onState : offState);
intent.putExtra(ApplicationConstants.SHOW_NOTIFICATION, showNotification);
MyActivity.this.startActivityForResult(intent, CHANGE_REQUEST);
Specifically, I do not understand how this code knows to call an APNDroid activity. The constants are found here
Obviously none of this is recognized by "eclipse" when I embed it in my code. Should I import something? Should I somehow give a reference to the APNDroid app?
Any help will be much appreciated.
Thank you. Avi