Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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!");
share|improve this answer
Great that did it! – Coyote Feb 3 '13 at 11:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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