protected function androidVerToStr($androidVer)
    {
        //https://en.wikipedia.org/wiki/Android_version_history

        if ($this->compareVersions($androidVer, '10') >= 0 && $this->compareVersions($androidVer, '11') < 0) {
            return 'Android Q'; //Still in beta will replace with final name when released
        } else if ($this->compareVersions($androidVer, '9') >= 0 && $this->compareVersions($androidVer, '10') < 0) {
            return 'Pie';
        } else if ($this->compareVersions($androidVer, '8') >= 0 && $this->compareVersions($androidVer, '9') < 0) {
            return 'Oreo';
        } else if ($this->compareVersions($androidVer, '7') >= 0 && $this->compareVersions($androidVer, '8') < 0) {
            return 'Nougat';
        } else if ($this->compareVersions($androidVer, '6') >= 0 && $this->compareVersions($androidVer, '7') < 0) {
            return 'Marshmallow';
        } else if ($this->compareVersions($androidVer, '5') >= 0 && $this->compareVersions($androidVer, '5.2') < 0) {
            return 'Lollipop';
        } else if ($this->compareVersions($androidVer, '4.4') >= 0 && $this->compareVersions($androidVer, '4.5') < 0) {
            return 'KitKat';
        } else if ($this->compareVersions($androidVer, '4.1') >= 0 && $this->compareVersions($androidVer, '4.4') < 0) {
            return 'Jelly Bean';
        } else if ($this->compareVersions($androidVer, '4') >= 0 && $this->compareVersions($androidVer, '4.1') < 0) {
            return 'Ice Cream Sandwich';
        } else if ($this->compareVersions($androidVer, '3') >= 0 && $this->compareVersions($androidVer, '3.3') < 0) {
            return 'Honeycomb';
        } else if ($this->compareVersions($androidVer, '2.3') >= 0 && $this->compareVersions($androidVer, '2.4') < 0) {
            return 'Gingerbread';
        } else if ($this->compareVersions($androidVer, '2.2') >= 0 && $this->compareVersions($androidVer, '2.3') < 0) {
            return 'Froyo';
        } else if ($this->compareVersions($androidVer, '2') >= 0 && $this->compareVersions($androidVer, '2.2') < 0) {
            return 'Eclair';
        } else if ($this->compareVersions($androidVer, '1.6') == 0) {
            return 'Donut';
        } else if ($this->compareVersions($androidVer, '1.5') == 0) {
            return 'Cupcake';
        } else {
            return self::PLATFORM_VERSION_UNKNOWN; //Unknown/unnamed Android version
        }
    }
protected function androidVerToStr($androidVer)
    {
        //https://en.wikipedia.org/wiki/Android_version_history

        if ($this->compareVersions($androidVer, '10') >= 0 && $this->compareVersions($androidVer, '11') < 0) {
            return 'Android Q'; //Still in beta will replace with final name when released
        } else if ($this->compareVersions($androidVer, '9') >= 0 && $this->compareVersions($androidVer, '10') < 0) {
            return 'Pie';
        } else if ($this->compareVersions($androidVer, '8') >= 0 && $this->compareVersions($androidVer, '9') < 0) {
            return 'Oreo';
        } else if ($this->compareVersions($androidVer, '7') >= 0 && $this->compareVersions($androidVer, '8') < 0) {
            return 'Nougat';
        } else if ($this->compareVersions($androidVer, '6') >= 0 && $this->compareVersions($androidVer, '7') < 0) {
            return 'Marshmallow';
        } else if ($this->compareVersions($androidVer, '5') >= 0 && $this->compareVersions($androidVer, '5.2') < 0) {
            return 'Lollipop';
        } else if ($this->compareVersions($androidVer, '4.4') >= 0 && $this->compareVersions($androidVer, '4.5') < 0) {
            return 'KitKat';
        } else if ($this->compareVersions($androidVer, '4.1') >= 0 && $this->compareVersions($androidVer, '4.4') < 0) {
            return 'Jelly Bean';
        } else if ($this->compareVersions($androidVer, '4') >= 0 && $this->compareVersions($androidVer, '4.1') < 0) {
            return 'Ice Cream Sandwich';
        } else if ($this->compareVersions($androidVer, '3') >= 0 && $this->compareVersions($androidVer, '3.3') < 0) {
            return 'Honeycomb';
        } else if ($this->compareVersions($androidVer, '2.3') >= 0 && $this->compareVersions($androidVer, '2.4') < 0) {
            return 'Gingerbread';
        } else if ($this->compareVersions($androidVer, '2.2') >= 0 && $this->compareVersions($androidVer, '2.3') < 0) {
            return 'Froyo';
        } else if ($this->compareVersions($androidVer, '2') >= 0 && $this->compareVersions($androidVer, '2.2') < 0) {
            return 'Eclair';
        } else if ($this->compareVersions($androidVer, '1.6') == 0) {
            return 'Donut';
        } else if ($this->compareVersions($androidVer, '1.5') == 0) {
            return 'Cupcake';
        } else {
            return self::PLATFORM_VERSION_UNKNOWN; //Unknown/unnamed Android version
        }
    }
protected function androidVerToStr ( $ androidVer ) { //https://en.wikipedia.org/wiki/Android_version_history if ( $ this -> compareVersions ( $ androidVer , '10' ) >= 0 && $ this -> compareVersions ( $ androidVer , '11' ) < 0 ) { return 'Android Q' ; //Still in beta will replace with final name when released } else if ( $ this -> compareVersions ( $ androidVer , '9' ) >= 0 && $ this -> compareVersions ( $ androidVer , '10' ) < 0 ) { return 'Pie' ; } else if ( $ this -> compareVersions ( $ androidVer , '8' ) >= 0 && $ this -> compareVersions ( $ androidVer , '9' ) < 0 ) { return 'Oreo' ; } else if ( $ this -> compareVersions ( $ androidVer , '7' ) >= 0 && $ this -> compareVersions ( $ androidVer , '8' ) < 0 ) { return 'Nougat' ; } else if ( $ this -> compareVersions ( $ androidVer , '6' ) >= 0 && $ this -> compareVersions ( $ androidVer , '7' ) < 0 ) { return 'Marshmallow' ; } else if ( $ this -> compareVersions ( $ androidVer , '5' ) >= 0 && $ this -> compareVersions ( $ androidVer , '5.2' ) < 0 ) { return 'Lollipop' ; } else if ( $ this -> compareVersions ( $ androidVer , '4.4' ) >= 0 && $ this -> compareVersions ( $ androidVer , '4.5' ) < 0 ) { return 'KitKat' ; } else if ( $ this -> compareVersions ( $ androidVer , '4.1' ) >= 0 && $ this -> compareVersions ( $ androidVer , '4.4' ) < 0 ) { return 'Jelly Bean' ; } else if ( $ this -> compareVersions ( $ androidVer , '4' ) >= 0 && $ this -> compareVersions ( $ androidVer , '4.1' ) < 0 ) { return 'Ice Cream Sandwich' ; } else if ( $ this -> compareVersions ( $ androidVer , '3' ) >= 0 && $ this -> compareVersions ( $ androidVer , '3.3' ) < 0 ) { return 'Honeycomb' ; } else if ( $ this -> compareVersions ( $ androidVer , '2.3' ) >= 0 && $ this -> compareVersions ( $ androidVer , '2.4' ) < 0 ) { return 'Gingerbread' ; } else if ( $ this -> compareVersions ( $ androidVer , '2.2' ) >= 0 && $ this -> compareVersions ( $ androidVer , '2.3' ) < 0 ) { return 'Froyo' ; } else if ( $ this -> compareVersions ( $ androidVer , '2' ) >= 0 && $ this -> compareVersions ( $ androidVer , '2.2' ) < 0 ) { return 'Eclair' ; } else if ( $ this -> compareVersions ( $ androidVer , '1.6' ) == 0 ) { return 'Donut' ; } else if ( $ this -> compareVersions ( $ androidVer , '1.5' ) == 0 ) { return 'Cupcake' ; } else { return self :: PLATFORM_VERSION_UNKNOWN ; //Unknown/unnamed Android version } }
Convert the Android version numbers to the operating system name. For instance '1.6' returns 'Donut'.
@access protected
@param string $androidVer The Android version numbers as a string.
@return string The operating system name or the constant PLATFORM_VERSION_UNKNOWN if nothing match the version
numbers.
Convert the Android version numbers to the operating system name . For instance 1 . 6 returns Donut .