Skip to content

Commit

Permalink
ssa
Browse files Browse the repository at this point in the history
  • Loading branch information
abenkdh committed Mar 2, 2020
1 parent 20ff50a commit 8005b35
Show file tree
Hide file tree
Showing 21 changed files with 371 additions and 476 deletions.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
228 changes: 170 additions & 58 deletions .idea/workspace.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,6 @@
<orderEntry type="library" name="Gradle: androidx.interpolator:interpolator:1.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: androidx.constraintlayout:constraintlayout:1.1.3@aar" level="project" />
<orderEntry type="module" module-name="bsjson" />
<orderEntry type="module" module-name="bsjson" />
</component>
</module>
36 changes: 22 additions & 14 deletions app/src/main/java/com/benkkstudio/bsjsonsample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,37 @@
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import android.view.View;

import com.benkkstudio.bsjson.API;
import com.benkkstudio.bsjson.BSJsonV2;
import com.benkkstudio.bsjson.Interface.BSJsonV2Listener;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

import org.json.JSONObject;
import com.benkkstudio.bsjson.BSJson;
import com.benkkstudio.bsjson.BSObject;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
JsonObject jsObj = (JsonObject) new Gson().toJsonTree(new API());
jsObj.addProperty("method_name", "settings");
new BSJsonV2.Builder(this)
.setObject(jsObj)
.setPurchaseCode("52394c52-11f0-4c5a-91d7-7c2c7c054fdb")
new BSJson.initializing()
.withSecret("6d1fa25b-d168-489f-96cf-d657d8fd207c")
.enableLogging(true);
load();
findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
load();
}
});

}

private void load(){
BSObject bsObject = new BSObject();
bsObject.addProperty("method_name", "settings");
new BSJson.Builder(this)
.setObject(bsObject.getProperty())
.setServer("https://benkkstudio.xyz/bsvideostatus/api.php")
.setMethod(BSJson.METHOD_POST)
.load();
}
}
9 changes: 7 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/button"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="load"/>
</androidx.constraintlayout.widget.ConstraintLayout>
118 changes: 0 additions & 118 deletions bsjson/src/main/java/com/benkkstudio/bsjson/API.java

This file was deleted.

Loading

0 comments on commit 8005b35

Please sign in to comment.