You can't run a Glass app on an Android app if the app uses Glass-specific API, so if you want to have a single app that runs on both Glass and a non-Glass Android phone, you should test to see if your app runs on Glass or not and apply different code when needed. For example, you can code like this:
try {
Class.forName ("com.google.android.glass.timeline.TimelineManager");
Log.v(">>>", "TimelineManager found");
}
catch (ClassNotFoundException e) {
Log.v(">>>", "TimelineManager ClassNotFound");
}
try {
Class.forName ("com.google.android.glass.timeline.LiveCard");
Log.v(">>>", "LiveCard found");
}
catch (ClassNotFoundException e) {
Log.v(">>>", "LiveCard ClassNotFound");
}
String manufacturer = Build.MANUFACTURER; String model = Build.MODEL;
Log.v(">>>", "Build: " + manufacturer + ", " + model);
And the output on Glass will be:
04-26 08:00:49.616: V/>>>(1988): TimelineManager ClassNotFound
04-26 08:00:49.616: V/>>>(1988): LiveCard found
04-26 08:00:49.616: V/>>>(1988): Build: Google, Glass 1
but on a Nexus tablet will be:
04-26 08:19:27.128: V/>>>(23528): TimelineManager ClassNotFound
04-26 08:19:27.128: V/>>>(23528): LiveCard ClassNotFound
04-26 08:19:27.128: V/>>>(23528): Build: asus, Nexus 7