Example #1
0
        public void CheckBuildAndPermissions()
        {
            /*
             * string buildNumber = AppInfo.BuildString;
             * Log.Debug(TAG, "BUILDNUMBER:" + buildNumber); // prints 1 - not sure why
             * if (int.Parse(buildNumber) >= 23)
             * {
             */
            if (!CheckLocationPermission() || !CheckCallPermission() ||
                !CheckSMSPermission() || !CheckReadPhoneStatePermission())
            {
                Log.Debug(TAG, "REQUESTING ALL PERMISSIONS");
                RequestAllPermissions();
            }
            else
            {
                LocationHandler.StartLocationService();
                Log.Debug(TAG, "LocationService Started");
                // Move to...
            }

            /*
             * }
             * else
             * {
             *
             *
             * Log.Debug(TAG, "Something wrong with build.");
             * }
             */
        }