added a few things
This commit is contained in:
@@ -8,10 +8,11 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.example.generator"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 5
|
||||
|
||||
versionName = "2.3"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -26,18 +27,46 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "META-INF/DEPENDENCIES"
|
||||
excludes += "META-INF/INDEX.LIST"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||
implementation("androidx.multidex:multidex:2.0.1")
|
||||
|
||||
// Core Android UI
|
||||
implementation(libs.appcompat)
|
||||
implementation(libs.material)
|
||||
implementation(libs.activity)
|
||||
implementation(libs.constraintlayout)
|
||||
|
||||
// Google Sheets & Core API (The "1.x" branch fix)
|
||||
implementation("com.google.apis:google-api-services-sheets:v4-rev581-1.25.0")
|
||||
implementation("com.google.api-client:google-api-client:1.32.1")
|
||||
implementation("com.google.oauth-client:google-oauth-client:1.32.1")
|
||||
implementation("com.google.http-client:google-http-client-gson:1.42.3")
|
||||
implementation("com.google.auth:google-auth-library-oauth2-http:1.15.0")
|
||||
|
||||
// JSON & Networking (Consolidated to stable versions)
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
|
||||
// Testing
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.ext.junit)
|
||||
androidTestImplementation(libs.espresso.core)
|
||||
}
|
||||
|
||||
implementation(libs.appcompat)
|
||||
implementation(libs.material)
|
||||
implementation(libs.activity)
|
||||
implementation(libs.constraintlayout)
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.ext.junit)
|
||||
androidTestImplementation(libs.espresso.core)
|
||||
}
|
||||
BIN
Generator/app/release/app-release.apk
Normal file
BIN
Generator/app/release/app-release.apk
Normal file
Binary file not shown.
BIN
Generator/app/release/baselineProfiles/0/app-release.dm
Normal file
BIN
Generator/app/release/baselineProfiles/0/app-release.dm
Normal file
Binary file not shown.
BIN
Generator/app/release/baselineProfiles/1/app-release.dm
Normal file
BIN
Generator/app/release/baselineProfiles/1/app-release.dm
Normal file
Binary file not shown.
37
Generator/app/release/output-metadata.json
Normal file
37
Generator/app/release/output-metadata.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.example.generator",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 5,
|
||||
"versionName": "2.3",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/app-release.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/app-release.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 23
|
||||
}
|
||||
@@ -8,8 +8,9 @@
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:roundIcon="@drawable/ic_launcher_background"
|
||||
android:supportsRtl="true"
|
||||
android:largeHeap="true"
|
||||
android:theme="@style/Theme.Generator">
|
||||
<activity
|
||||
android:name=".makeActivity"
|
||||
|
||||
23
Generator/app/src/main/java/com/example/generator/Data.java
Normal file
23
Generator/app/src/main/java/com/example/generator/Data.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.example.generator;
|
||||
|
||||
public class Data {
|
||||
private String base64;
|
||||
private int numPos;
|
||||
|
||||
|
||||
public String getBase64() {
|
||||
return base64;
|
||||
}
|
||||
|
||||
public void setBase64(String base64) {
|
||||
this.base64 = base64;
|
||||
}
|
||||
public void setNumPos(int numPos) {
|
||||
this.numPos = Math.max(0, numPos);
|
||||
}
|
||||
public String getNumPos() {
|
||||
return String.valueOf(numPos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -23,13 +23,14 @@ import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.Objects;
|
||||
|
||||
public class makeActivity extends AppCompatActivity {
|
||||
|
||||
public static Data Data = new Data();
|
||||
private ImageView imageView;
|
||||
private int numPos = -1;
|
||||
private EditText numPosEdit;
|
||||
private String Base64img;
|
||||
private String Base64img = "";
|
||||
private final ActivityResultLauncher<PickVisualMediaRequest> pickMedia =
|
||||
registerForActivityResult(new ActivityResultContracts.PickVisualMedia(), uri -> {
|
||||
if (uri != null) {
|
||||
@@ -54,11 +55,13 @@ public class makeActivity extends AppCompatActivity {
|
||||
return insets;
|
||||
});
|
||||
|
||||
|
||||
|
||||
imageView = findViewById(R.id.imageView);
|
||||
Button nextButton = (Button) findViewById(R.id.button_next);
|
||||
Button backButton = (Button) findViewById(R.id.button_back);
|
||||
Button chooseButton = (Button) findViewById(R.id.button_image);
|
||||
EditText numPosEdit = findViewById(R.id.numPos);
|
||||
numPosEdit = findViewById(R.id.numPos);
|
||||
|
||||
backButton.setOnClickListener((v) -> {
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
@@ -66,12 +69,18 @@ public class makeActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
nextButton.setOnClickListener((v) -> {
|
||||
numPos = Integer.parseInt(numPosEdit.getText().toString().trim());
|
||||
if (numPos == -1) {
|
||||
if (numPosEdit.getText().toString().trim().isEmpty()) {
|
||||
Toast.makeText(this, "choose a number", Toast.LENGTH_SHORT).show();
|
||||
} else if (Base64img == ""); {
|
||||
} else
|
||||
numPos = Integer.parseInt(numPosEdit.getText().toString().trim());
|
||||
if (Objects.equals(Base64img, "")) {
|
||||
Toast.makeText(this, "choose a image", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("test", Base64img);
|
||||
} else {
|
||||
Data.setNumPos(numPos);
|
||||
Data.setBase64(Base64img);
|
||||
Log.d("Pos", Data.getNumPos());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -82,7 +91,6 @@ public class makeActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
private String convertUriToBase64(Uri uri) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user