diff --git a/apk/src/de/alexmahr/app1/App1.java b/apk/src/de/alexmahr/app1/App1.java index 2d57167..617d116 100644 --- a/apk/src/de/alexmahr/app1/App1.java +++ b/apk/src/de/alexmahr/app1/App1.java @@ -8,49 +8,13 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.lang.Thread; import java.util.concurrent.TimeUnit; import android.text.method.ScrollingMovementMethod; -class Threads1 implements Runnable { - - public String result = "alex"; - - public void run(){ - try{ - result = result.concat("step 2\n"); - result = result.concat("SUPER\n"); - //URL url = new URL("https://alexmahr.de/word"); - //result = result.concat("step 3\n"); - //HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); - //result = result.concat("step 4\n"); - //BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); - //result = result.concat("step 5\n"); - //String inputLine; - //StringBuffer response = new StringBuffer(); - //result = result.concat("step 6\n"); - - //while ((inputLine = in.readLine()) != null) { - //result = result.concat("step 7\n"); - //response.append(inputLine); - //} - //result = result.concat("step 8\n"); - //in.close(); - //result = result.concat("step 9\n"); - //result = result.concat( "OK".concat(response.toString())); - //urlConnection.disconnect(); - } catch (Exception e){ -// throw new RuntimeException(e); - } - } -} public class App1 extends Activity { - @Override public void onCreate(Bundle savedInstanceState) { @@ -61,53 +25,8 @@ public class App1 extends Activity String result = "initial"; TextView tv = new TextView(this); tv.setMovementMethod(new ScrollingMovementMethod()); - Threads1 threads1 = new Threads1(); - Thread thread = new Thread(threads1); - thread.start(); - thread.join(); - - // Thread thread = new Thread(new Runnable() { - - // @Override - // public void run() { - // try { - // result = result.concat("step 2\n"); - // URL url = new URL("https://alexmahr.de/word"); - // result = result.concat("step 3\n"); - // HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); - // result = result.concat("step 4\n"); - // BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); - // result = result.concat("step 5\n"); - // String inputLine; - // StringBuffer response = new StringBuffer(); - // result = result.concat("step 6\n"); - - // while ((inputLine = in.readLine()) != null) { - // result = result.concat("step 7\n"); - // response.append(inputLine); - // } - // result = result.concat("step 8\n"); - // in.close(); - // result = result.concat("step 9\n"); - // result = result.concat( "OK".concat(response.toString())); - // urlConnection.disconnect(); - - - // } catch (Exception e) { - // e.printStackTrace(); - // } - // } - // }); - // thread.start(); - // thread.join(); tv.setText( result); setContentView(tv); - try{ - // TimeUnit.SECONDS.sleep(1); - } catch (Exception e){ -// throw new RuntimeException(e); - } - tv.setText(result.concat(threads1.result)); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/apk/src/de/alexmahr/app1/App1.kt b/apk/src/de/alexmahr/app1/App1.kt deleted file mode 100644 index 49a9b70..0000000 --- a/apk/src/de/alexmahr/app1/App1.kt +++ /dev/null @@ -1,47 +0,0 @@ -import android.os.Bundle -import android.view.Menu -import android.view.MenuItem -import android.widget.Toast -import androidx.appcompat.app.AppCompatActivity - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - // calling this activity's function to - // use ActionBar utility methods - val actionBar = supportActionBar - - // providing title for the ActionBar - actionBar!!.title = " GfG | Action Bar" - - // providing subtitle for the ActionBar - actionBar.subtitle = " Design a custom Action Bar" - - // adding icon in the ActionBar - actionBar.setIcon(R.drawable.app_logo) - - // methods to display the icon in the ActionBar - actionBar.setDisplayUseLogoEnabled(true) - actionBar.setDisplayShowHomeEnabled(true) - } - - // method to inflate the options menu when - // the user opens the menu for the first time - override fun onCreateOptionsMenu(menu: Menu): Boolean { - menuInflater.inflate(R.menu.main, menu) - return super.onCreateOptionsMenu(menu) - } - - // methods to control the operations that will - // happen when user clicks on the action buttons - override fun onOptionsItemSelected(item: MenuItem): Boolean { - when (item.itemId) { - R.id.search -> Toast.makeText(this, "Search Clicked", Toast.LENGTH_SHORT).show() - R.id.refresh -> Toast.makeText(this, "Refresh Clicked", Toast.LENGTH_SHORT).show() - R.id.copy -> Toast.makeText(this, "Copy Clicked", Toast.LENGTH_SHORT).show() - } - return super.onOptionsItemSelected(item) - } -} diff --git a/apk/src/de/alexmahr/app1/App1.kt.back b/apk/src/de/alexmahr/app1/App1.kt.back deleted file mode 100644 index a62120a..0000000 --- a/apk/src/de/alexmahr/app1/App1.kt.back +++ /dev/null @@ -1,93 +0,0 @@ -package de.alexmahr.app1; - -//#import android.support.v7.app.AppCompatActivity -import android.os.Bundle -import android.util.Log; -import android.widget.TextView; -import android.app.Activity; -//import java.io.BufferedReader; -//import java.io.IOException; -//import java.io.InputStreamReader; -//import java.io.OutputStream; -//import java.net.HttpURLConnection; -//import java.net.URL; -//import java.lang.Thread; -//import java.util.concurrent.TimeUnit; -//import android.text.method.ScrollingMovementMethod; - -public class App1 extends Activity{ -{ - override fun onCreate(savedInstanceState: Bundle?) { - - super.onCreate(savedInstanceState); - val tv = TextView(this); - tv.setText( "result"); - setContentView(tv); - - } -} -// @Override -// public void onCreate(Bundle savedInstanceState) -// { -// try -// { -// super.onCreate(savedInstanceState); -// //volatile String result = "initial"; -// String result = "initial"; -// TextView tv = new TextView(this); -// tv.setMovementMethod(new ScrollingMovementMethod()); -// Threads1 threads1 = new Threads1(); -// Thread thread = new Thread(threads1); -// thread.start(); -// thread.join(); -// -// // Thread thread = new Thread(new Runnable() { -// -// // @Override -// // public void run() { -// // try { -// // result = result.concat("step 2\n"); -// // URL url = new URL("https://alexmahr.de/word"); -// // result = result.concat("step 3\n"); -// // HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); -// // result = result.concat("step 4\n"); -// // BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); -// // result = result.concat("step 5\n"); -// // String inputLine; -// // StringBuffer response = new StringBuffer(); -// // result = result.concat("step 6\n"); -// -// // while ((inputLine = in.readLine()) != null) { -// // result = result.concat("step 7\n"); -// // response.append(inputLine); -// // } -// // result = result.concat("step 8\n"); -// // in.close(); -// // result = result.concat("step 9\n"); -// // result = result.concat( "OK".concat(response.toString())); -// // urlConnection.disconnect(); -// -// -// // } catch (Exception e) { -// // e.printStackTrace(); -// // } -// // } -// // }); -// // thread.start(); -// // thread.join(); -// tv.setText( result); -// setContentView(tv); -// try{ -// // TimeUnit.SECONDS.sleep(1); -// } catch (Exception e){ -//// throw new RuntimeException(e); -// } -// tv.setText(result.concat(threads1.result)); -// } catch (Exception e) { -// throw new RuntimeException(e); -// } -// -// } -// -// -//} diff --git a/apk/src/main b/apk/src/main deleted file mode 100755 index e854338..0000000 Binary files a/apk/src/main and /dev/null differ diff --git a/apk/src/main.c b/apk/src/main.c deleted file mode 100644 index 4ccc8aa..0000000 --- a/apk/src/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(){ - printf("hallo"); - return 0; -} diff --git a/git.commid.WIP.info.txt b/git.commid.WIP.info.txt deleted file mode 100644 index 892b53f..0000000 --- a/git.commid.WIP.info.txt +++ /dev/null @@ -1,32 +0,0 @@ -[alex@thinkbox android-app-docker]$ git status -On branch master -Changes to be committed: - (use "git restore --staged ..." to unstage) - renamed: apk/src/com/example/hellojni/HelloJNI.java -> apk/src/de/alexmahr/app1/HelloJNI.java - -Changes not staged for commit: - (use "git add/rm ..." to update what will be committed) - (use "git restore ..." to discard changes in working directory) - modified: apk/AndroidManifest.xml - modified: apk/Makefile - modified: apk/res/layout/main.xml - modified: apk/res/values/strings.xml - deleted: apk/src/com/example/hellojni/R.java - deleted: apk/src/de/alexmahr/app1/HelloJNI.java - -Untracked files: - (use "git add ..." to include in what will be committed) - apk/CMakeLists.txt - apk/build.prop - apk/jni/ - apk/kotlin-compiler-1.9.0.zip - apk/kotlin-native-linux-x86_64-1.9.0.tar.gz - apk/kotlinc/ - apk/src/de/alexmahr/app1/App1.java - apk/src/de/alexmahr/app1/App1.kt - apk/src/de/alexmahr/app1/App1.kt.back - apk/src/de/alexmahr/app1/R.java - apk/src/main - apk/src/main.c - docker-compose-build.log -