<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
+ <JetCodeStyleSettings>
+ <option name="PACKAGES_TO_USE_STAR_IMPORTS">
+ <value>
+ <package name="java.util" alias="false" withSubpackages="false" />
+ <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
+ <package name="io.ktor" alias="false" withSubpackages="true" />
+ </value>
+ </option>
+ <option name="PACKAGES_IMPORT_LAYOUT">
+ <value>
+ <package name="" alias="false" withSubpackages="true" />
+ <package name="java" alias="false" withSubpackages="true" />
+ <package name="javax" alias="false" withSubpackages="true" />
+ <package name="kotlin" alias="false" withSubpackages="true" />
+ <package name="" alias="true" withSubpackages="true" />
+ </value>
+ </option>
+ </JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <bytecodeTargetLevel target="1.8" />
+ </component>
+</project>
\ No newline at end of file
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
+ <option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
<textMaps />
</LinkMapSettings>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="JDK" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
applicationId "net.osdn.gokigen.pkremote"
minSdkVersion 14
targetSdkVersion 29
- versionCode 10800
- versionName "1.8.0"
+ versionCode 10801
+ versionName "1.8.1"
}
buildTypes {
release {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.exifinterface:exifinterface:1.2.0'
+ implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'androidx.preference:preference:1.1.1'
- implementation 'com.google.android.material:material:1.2.0'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation 'com.google.android.material:material:1.2.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
api files('libs/olycamerakit.jar')
httpCommandBytes(url, "POST", postData, setProperty, null, timeoutMs, callback);
}
+ /**
+ *
+ *
+ *
+ */
+ public static void httpPostBytesWithHeader(String url, String postData, Map<String, String> setProperty, @Nullable String contentType, int timeoutMs, @NonNull IReceivedMessageCallback callback)
+ {
+ httpCommandBytes(url, "POST", postData, setProperty, contentType, timeoutMs, callback);
+ }
+
private static void httpCommandBytes(@NonNull String url, @NonNull String requestMethod, @Nullable String postData, @Nullable Map<String, String> setProperty, @Nullable String contentType, int timeoutMs, @NonNull IReceivedMessageCallback callback)
{
HttpURLConnection httpConn = null;
*
*
*/
+ public static Bitmap httpPostBitmapWithHeader(String url, String postData, @Nullable Map<String, String> setProperty, @Nullable String contentType, int timeoutMs)
+ {
+ return (httpCommandBitmap(url, "POST", postData, setProperty, contentType, timeoutMs));
+ }
+
+ /**
+ *
+ *
+ *
+ */
private static Bitmap httpCommandBitmap(@NonNull String url, @NonNull String requestMethod, @Nullable String postData, @Nullable Map<String, String> setProperty, @Nullable String contentType, int timeoutMs)
{
HttpURLConnection httpConn = null;
try
{
- String response = SimpleHttpClient.httpPost(commandsExecuteUrl, startSessionData, TIMEOUT_MS);
+ String response = SimpleHttpClient.httpPostWithHeader(commandsExecuteUrl, startSessionData, null, "application/json;charset=utf-8", TIMEOUT_MS);
Log.v(TAG, " " + commandsExecuteUrl + " " + startSessionData + " " + response);
- String response2 = SimpleHttpClient.httpPost(getStateUrl, "", TIMEOUT_MS);
+ String response2 = SimpleHttpClient.httpPostWithHeader(getStateUrl, "", null, "application/json;charset=utf-8", TIMEOUT_MS);
Log.v(TAG, " " + getStateUrl + " " + response2);
onConnectNotify();
try
{
- String responseS = SimpleHttpClient.httpPost(commandsExecuteUrl, startSessionData, TIMEOUT_MS);
+ String responseS = SimpleHttpClient.httpPostWithHeader(commandsExecuteUrl, startSessionData, null, "application/json;charset=utf-8", TIMEOUT_MS);
Log.v(TAG, " " + commandsExecuteUrl + " " + startSessionData + " " + responseS);
- String response = SimpleHttpClient.httpPost(getStateUrl, "", TIMEOUT_MS);
+ String response = SimpleHttpClient.httpPostWithHeader(getStateUrl, "", null, "application/json;charset=utf-8", TIMEOUT_MS);
Log.v(TAG, " " + getStateUrl + " " + response);
if (response.length() > 0)
{
String sessionId = jsonObject.getString("sessionId");
String setApiLevelData = "{\"name\":\"camera.setOptions\",\"parameters\":{" + "\"sessionId\" : \"" + sessionId + "\", \"options\":{ \"clientVersion\":2}}}";
- String response3 = SimpleHttpClient.httpPost(commandsExecuteUrl, setApiLevelData, TIMEOUT_MS);
+ String response3 = SimpleHttpClient.httpPostWithHeader(commandsExecuteUrl, setApiLevelData, null, "application/json;charset=utf-8", TIMEOUT_MS);
Log.v(TAG, " " + commandsExecuteUrl + " " + setApiLevelData + " " + response3);
}
onConnectNotify();
private final int maxCount;
private final boolean useThetaV21;
- private List<ICameraContent> cameraContentList;
+ private final List<ICameraContent> cameraContentList;
public ThetaPlaybackControl(@NonNull Activity activity, int timeoutMs, int maxCount)
{
String postData = "{\"name\":\"camera.getImage\",\"parameters\":{\"_type\":\"thumb\",\"fileUri\":\"" + path + "\"}}";
//Log.v(TAG, " postData : " + postData);
- Bitmap bmp = SimpleHttpClient.httpPostBitmap(url, postData, timeoutValue);
+ Bitmap bmp = SimpleHttpClient.httpPostBitmapWithHeader(url, postData, null, "application/json;charset=utf-8", timeoutValue);
HashMap<String, Object> map = new HashMap<>();
map.put("Orientation", 0);
callback.onCompleted(bmp, map);
{
//Log.v(TAG, " exec getFileList");
String imageListurl = "http://192.168.1.1/osc/commands/execute";
- String contentList = SimpleHttpClient.httpPost(imageListurl, paramData, timeoutValue);
+ String contentList = SimpleHttpClient.httpPostWithHeader(imageListurl, paramData, null, "application/json;charset=utf-8", timeoutValue);
if (contentList != null)
{
JSONObject resultsObject = new JSONObject(contentList).getJSONObject("results");
String postData = "{\"name\":\"camera.getImage\",\"parameters\":{\"_type\":\"full\",\"fileUri\":\"" + path + "\"}}";
try
{
- SimpleHttpClient.httpPostBytes(urlToGet, postData, null, timeoutValue, new SimpleHttpClient.IReceivedMessageCallback() {
+ SimpleHttpClient.httpPostBytesWithHeader(urlToGet, postData, null, "application/json;charset=utf-8", timeoutValue, new SimpleHttpClient.IReceivedMessageCallback() {
@Override
public void onCompleted() {
callback.onCompleted();
String contentList;
try
{
- contentList = SimpleHttpClient.httpPost(imageListurl, paramStr, timeoutValue);
+ contentList = SimpleHttpClient.httpPostWithHeader(imageListurl, paramStr, null, "application/json;charset=utf-8", timeoutValue);
if (contentList == null)
{
// ぬるぽ発行
{
String paramStr = "{\"name\":\"camera.listFiles\",\"parameters\":{\"fileType\":\"all\",\"entryCount\":" + maxCount + ",\"maxThumbSize\":640,\"_detail\":false, \"_sort\":\"newest\"}}";
//Log.v(TAG, " paramStr : " + paramStr);
- contentList = SimpleHttpClient.httpPost(imageListurl, paramStr, timeoutValue);
+ contentList = SimpleHttpClient.httpPostWithHeader(imageListurl, paramStr, null, "application/json;charset=utf-8", timeoutValue);
if (contentList == null)
{
// ぬるぽ発行
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.0'
+ classpath 'com.android.tools.build:gradle:4.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
-#Sat May 30 16:01:16 JST 2020
+#Tue Dec 29 19:08:31 JST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip