-1

Hi I am doing research into developing for smart watches for an upcoming project i may be undertaking. I am looking to develop a custom launcher for a smart watch to be used as the main interface that the user interacts with. I have done my research into this and i think i know what direction to head in. What I dont know how ever (and Im sure a lot of others dont and would like to know) is how to set my self up in Eclipse or Android Studio to develop apps for the small screen sizes of Smart watches.

Is it simply setting dimensions in the res/values folder or is it more complicated than that? Also is there any special SDKs i can get my hands on to aid me in developing for Smartwatches?(i know of the Sony SDK but havnt been able to find any others.) Also is there a way to configure my IDEs so that i can easily set up Smart watch projects?

MarcD
  • 65
  • 8
  • 1
    Wondering why the downvotes? Is it because its an opinion question or is it because OP didnt show his work – Akshat Agarwal Dec 10 '13 at 15:44
  • I was wondering the same thing Smart watches are such a new technology that there isn't any central SDK or IDE for them so i was hoping to get the advice and wisdom of those who may have already developed for smartwatches cause i have not before. – MarcD Dec 10 '13 at 15:47
  • is there a generic dimension that i could use when initially testing the Launcher app I plan on developing? – MarcD Dec 10 '13 at 15:59
  • 1
    What do you mean by SmartWatch? Something running native Android you can run native code on? e.g. OMate, WereIt and a number of others. Or are you talking something working as a companion to a smartphone with the main app on the smartphone and then some SDK to access the watch like the Sony watches. – Ifor Dec 12 '13 at 15:32
  • Something that will be running full native android, but it will be working as a companion as well if it doesn't have a SIM card. – MarcD Dec 16 '13 at 09:11

1 Answers1

1

You can use an emulator to see your results for different dpi.

DPI is a measure that you can use on your dimens.xml, and if you have a measure in pixel,you can use this to know which kind of dpi is.

switch (getResources().getDisplayMetrics().densityDpi) {
    case DisplayMetrics.DENSITY_LOW:
        System.out.println("low");
        // ...
        break;
    case DisplayMetrics.DENSITY_MEDIUM:
        System.out.println("medium");
        // ...
        break;
    case DisplayMetrics.DENSITY_HIGH:
        System.out.println("high");
        // ...
        break;
    case DisplayMetrics.DENSITY_XHIGH:
        System.out.println("xhigh");
        // ...
        break;
    }

For example, Nexus 4 has a density of 320 (xhdpi), Samsung Galaxy SII 240 (hdpi)

user3084416
  • 78
  • 1
  • 6