I have many assumptions about android because I lack of knowledge of android internal. I'm developing apps with Android Studio. I usually search code snippet for java instead of android.
For example I search "java read file into byte array" rather than "android read file into byte array" so search results show java code snippets. But sometimes, I see something like - "JAVA 7+" or "java 6+" which I translate as - "this code only work if I'm writing for this version (or above) of java".
I'm running android studio with JRE version 8 so I'm sure that my code will work in android studio and my APK will be generated successfully. But I'm also afraid that if a device does not have that version of java, my APK will crash on that device. This is all because I have the following assumptions:
- android is based on JAVA and XML.
- so android has JRE or JDK internally.
- that JRE or JDK version(6/7/8..) depends on what android version that device has. For example may be Jellybean has JRE 6 and Oreo has JRE 8 etc (if it's true then what version has what?).
- my app will crash if I compile code for JAVA 8 and my APK meets a device that runs on a lower version of JRE.
That are my assumptions, it's a long question so I couldn't search it using keywords. Please guide me (tell me which assumption is wrong and what is right).