\r
//久坐时间获取\r
public static int getKeepSitRangeInMinutes(Context context ){\r
- return SharPreferenceUtil.getPrefInt(context,Constants.SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES,0);\r
+ return SharPreferenceUtil.getPrefIntPublic(context,Constants.SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES,0);\r
}\r
\r
//久坐时间设置\r
public static void setKeepSitRangeInMinutes(Context context, int RangeInMinutes){\r
- SharPreferenceUtil.setPrefInt(context,Constants.SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES,RangeInMinutes);\r
+\r
+ SharPreferenceUtil.setPrefIntPublic(context,Constants.SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES,RangeInMinutes);\r
}\r
\r
public static void setSleepDate(Context context,String dateyyyyMMddHHmmss){\r
\r
\r
public static void setSleepScore(Context context,int score){\r
- SharPreferenceUtil.setPrefInt(context,Constants.SHAREKEY_SETTING_SLEEP_SCORE,score);\r
+ SharPreferenceUtil.setPrefIntPublic(context,Constants.SHAREKEY_SETTING_SLEEP_SCORE,score);\r
}\r
\r
/**\r
import android.os.StatFs;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
+import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.enqualcomm.support.utils.DeviceInfoUtil;
import com.enqualcomm.support.utils.ICLogger;
import com.enqualcomm.support.utils.ImageUtil;
+import com.enqualcomm.support.utils.SharPreferenceUtil;
import com.enqualcomm.support.utils.TimeUtil;
import com.enqualcomm.support.utils.Util;
}
});
-
+ // tesetSharedKey();
// SimSignalUtil.send_at_to_onoff_simcard(CoreService.getInstance().runtime));
}
};
+
+ public void tesetSharedKey(){
+ Config.setSleepScore(this,344);
+ Config.setSleepDate(this,TimeUtil.getSystemTime3());
+ Config.setKeepSitRangeInMinutes(this,3);
+ ICLogger.d("SHAREKEY_SETTING_SLEEP_SCORE_DATE "+ SharPreferenceUtil.getPrefStringPublic(this,Constants.SHAREKEY_SETTING_SLEEP_SCORE_DATE,""));
+ ICLogger.d("SHAREKEY_SETTING_SLEEP_SCORE "+ SharPreferenceUtil.getPrefIntPublic(this,Constants.SHAREKEY_SETTING_SLEEP_SCORE,0));
+ ICLogger.d("SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES "+ SharPreferenceUtil.getPrefIntPublic(this,Constants.SHAREKEY_SETTING_SIT_ALARM_RANGE_IN_MINUTES,0));
+
+ }
}
SharedPreferences sp=context.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_WRITEABLE);\r
sp.edit().putString(key, value).commit();\r
}\r
-\r
+ public static void setPrefIntPublic(Context context, String key, int value) {\r
+ SharedPreferences sp=context.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_WRITEABLE);\r
+ sp.edit().putInt(key, value).commit();\r
+ }\r
+ public static int getPrefIntPublic(Context context, String key, int value) {\r
+ SharedPreferences sp=context.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_READABLE);\r
+ return sp.getInt(key, value);\r
+ }\r
}\r
-#Thu Aug 06 09:43:31 CST 2020\r
-VERSION_CODE=477\r
+#Thu Aug 06 17:23:57 CST 2020\r
+VERSION_CODE=479\r