How would it be possible to test for the presence of the ODK at run time? Currently I took this approach:

private activityDelegate delegate;
public void onCreate(Bundle savedInstanceState) {
    //Need to test for the presence of the ouya ODK here
        delegate = new OuyaDelegate(savedInstanceState);

But maybe there is a better way of doing this than in the main activity?


The standard way of doing this is to pick a class that you know should exist and then see whether it does:

} catch (ClassNotFoundException e){
    Log.e(TAG, "No ODK Found!");
| improve this answer | |
  • \$\begingroup\$ Great that did it! \$\endgroup\$ – Coyote Feb 3 '13 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.