Android - sgml/signature GitHub Wiki

+metacritic +android site:en.wikipedia.org +ios -film -office -playstation -ds -psp -vita -3ds -xbox -windows -dreamcast

Code

// MainActivity.kt
package com.example.sshpushdemo

import android.net.Uri
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.jcraft.jsch.ChannelExec
import com.jcraft.jsch.JSch
import com.jcraft.jsch.Session
import java.io.BufferedReader
import java.io.InputStreamReader

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        // Set the layout for the activity.
        setContentView(R.layout.activity_main)

        // Default Git repository path used if no mailto event is detected.
        var gitRepoPath = "/remote/path/to/git/repo"

        // Check if the incoming intent contains a URI.
        intent.data?.let { uri ->
            // Check if the URI scheme is "mailto"
            if (uri.scheme.equals("mailto", ignoreCase = true)) {
                // **Important Limitation Note:**
                // The mailto protocol is designed to handle email addresses with optional parameters like subject and body.
                // Using it to pass a Git repository name is unconventional and has several limitations:
                //   - **Limited Structure:** A standard mailto URI is generally just an email address. It lacks the structure
                //     needed to specify file paths or repository details reliably.
                //   - **Encoding Issues:** Special characters and encoding in email addresses or extra parameters may be misinterpreted.
                //   - **Non-Standard Usage:** Relying on mailto in this way may lead to compatibility issues with components expecting standard mailto behavior.
                //   - **Ambiguity:** The scheme-specific part may contain additional unwanted query parameters (subject, cc, etc.),
                //     potentially complicating the extraction of a pure repo path.
                //
                // In this example, the scheme-specific part of the mailto URI is used as the repository name.
                gitRepoPath = uri.schemeSpecificPart
            }
        }

        // Log the chosen repository path for debugging purposes.
        println("Using Git repository path: $gitRepoPath")

        // Launch the SSH Git-push routine on a background thread.
        Thread {
            // Change these parameter values as needed.
            pushFileOverSSH(
                host = "your.remote.host",
                port = 22,
                username = "your_username",
                privateKeyPath = "/path/to/your/private_key",
                fileName = "target_file.txt",
                gitRepoPath = gitRepoPath
            )
        }.start()
    }
}

/**
 * Opens an SSH connection to a remote host, finds a given file within a Git repository,
 * and then executes Git commands ("git add", "git commit", and "git push") to push the file.
 *
 * @param host The remote SSH host.
 * @param port The SSH port (default is 22).
 * @param username The SSH username.
 * @param privateKeyPath The file system path to your SSH private key on Android.
 * @param fileName The name of the file to search for.
 * @param gitRepoPath The absolute path to the Git repository on the remote host,
 *                    or the repository name parsed from a "mailto:" URI.
 */
fun pushFileOverSSH(
    host: String,
    port: Int = 22,
    username: String,
    privateKeyPath: String,
    fileName: String,
    gitRepoPath: String
) {
    try {
        val jsch = JSch()
        // Add your SSH private key for authentication.
        jsch.addIdentity(privateKeyPath)

        // Open an SSH session with the provided host and credentials.
        val session: Session = jsch.getSession(username, host, port)
        // Disable strict host key checking for simplicity (not recommended for production).
        session.setConfig("StrictHostKeyChecking", "no")
        session.connect(30000) // Connection timeout set to 30 seconds

        // --- Step 1: Find the file in the repository ---
        // Use a 'find' command to search for the specified file at the root of the Git repository.
        val findCmd = "find $gitRepoPath -maxdepth 1 -type f -name '$fileName'"
        val findOutput = executeCommand(session, findCmd)
        println("Find command output: \n$findOutput")

        if (findOutput.isNotBlank()) {
            // --- Step 2: Execute Git commands to push the file ---
            // Navigate to the Git repository and perform git add, commit, and push operations.
            val gitCommands = """
                cd $gitRepoPath && 
                git add $fileName && 
                git commit -m 'Automated commit of $fileName' && 
                git push
            """.trimIndent()
            val gitOutput = executeCommand(session, gitCommands)
            println("Git commands output: \n$gitOutput")
        } else {
            println("File '$fileName' not found in repository path '$gitRepoPath'.")
        }

        // Disconnect the session once the commands have been executed.
        session.disconnect()
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

/**
 * Executes a command via an SSH exec channel and returns its output.
 *
 * @param session The connected SSH session.
 * @param command The command to execute.
 * @return The output of the command execution as a String.
 */
fun executeCommand(session: Session, command: String): String {
    val channel = session.openChannel("exec") as ChannelExec
    channel.setCommand(command)
    channel.inputStream = null
    val input = channel.inputStream
    channel.connect()

    // Read the output of the command.
    val reader = BufferedReader(InputStreamReader(input))
    val output = StringBuilder()
    reader.forEachLine { output.append(it).append("\n") }

    channel.disconnect()
    return output.toString().trim()
}

Fundamentals

T-Mobile

RCS

Workflow

  • Screen->Data Viewer->Button->Control->Next Screen
  • Screen->Screen->Data Viewer

Toolchain

Sample Projects

Products

Core APIs

Reference Apps

Free

909 Aesop's Fables Afroverbs Assembly 8086 Drum Machine JSRun JSLint JSON Visualizer Mini C# MuPDF Viewer Permissions Friendly Apps Regexpal Tao Te Ching+ Text Fairy Tower of Hanoi VuDroid bookymcbookface

On-Device Machine Learning / EdgeML

Permissions

Command Line Compilation

Virtualization

https://www.androidauthority.com/install-android-pc-668643/

https://visualgdb.com/tutorials/android/virtualbox/

https://linuxhint.com/install_android_virtualbox/

Async Co-Routines / Flows

https://code.cash.app/rx-to-coroutines-concepts-cold-flows

https://blog.jetbrains.com/kotlin/2021/05/kotlin-coroutines-1-5-0-released/

https://developer.android.com/codelabs/kotlin-coroutines

https://kotlinlang.org/docs/flow.html

Vanity Apps

https://www.pdftron.com/blog/mobile/how-to-build-a-pdf-viewer-react-native/

https://reactnativeexample.com/tag/calendars/

https://docs.expo.io/versions/latest/sdk/sms/

https://reactnativeexample.com/tag/calculator/

Keyboard/Developer Apps

https://android.stackexchange.com/questions/1054/is-there-a-way-to-use-userscripts-greasemonkey-scripts-on-the-android-browser

https://bergie.iki.fi/blog/working-on-android-2017/

https://www.quora.com/How-can-I-easily-create-an-Android-app-for-free-without-coding-and-Java-skills

https://hackernoon.com/code-a-react-website-on-your-android-smartphone-or-tablet-like-you-never-imagined-3e56c534f6e7

https://www.guidingtech.com/19202/hide-on-screen-keyboard-android-external/

https://www.androidauthority.com/best-video-editor-apps-android-716248/

Samsung

https://www.samsung.com/us/support/answer/ANS00043937/

https://www.samsung.com/us/support/answer/ANS00083982/

USB File Transfer

https://chromereleases.googleblog.com/2014/10/stable-channel-update-for-chrome-os.html

https://support.microsoft.com/en-us/help/4027134/windows-10-import-photos-and-videos-from-phone-to-pc

https://support.google.com/android/answer/9064445

http://eguides.sprint.com/support/eguides/samsunggalaxys8s8plus/content/samsung_galaxy_s8_s8_plus_ug/transfer_files_between_your_phone_and_a_computer.html

https://www.android.com/results/?q=transfer

Database CRUD Apps

https://play.google.com/store/apps/developer?id=Codecheck+AG

https://play.google.com/store/apps/developer?id=Avni&hl=en_US

Porting to Kotlin

Machinery Integration

john_deere_hardware:
  - name: "John Deere G5 Display"
    description: "Advanced displays using an Android-based operating system to provide a user-friendly interface for managing various farming operations, including precision guidance, data collection, and machine control."
    url: "https://www.deere.com/en/technology-products/precision-ag-technology/g5-displays/"
  
  - name: "John Deere StarFire™ 7000/7500 Receivers"
    description: "Receivers using Android-based systems to provide high-accuracy GPS guidance and positioning for agricultural equipment."
    url: "https://www.deere.com/en/technology-products/precision-ag-technology/guidance/starfire-7000-7500-receivers/"
  
  - name: "John Deere CommandCenter™"
    description: "System integrated into John Deere tractors and combines, using an Android-based interface to manage machine settings, monitor performance, and control various functions."
    url: "https://www.deere.com/en/technology-products/precision-ag-technology/displays/commandcenter/"
  
  - name: "John Deere Gen 4 CommandCenter™"
    description: "Display system using an Android-based OS to provide a seamless user experience for managing machine operations, precision agriculture tasks, and data collection."
    url: "https://www.deere.com/en/technology-products/precision-ag-technology/displays/gen-4-commandcenter/"

Reverse Engineering

https://reverseengineering.stackexchange.com/questions/12393/reverse-engineering-android-vendor-system-apps

https://reverseengineering.stackexchange.com/questions/15904/can-apk-files-have-protection-against-being-debugged/16002#16002

https://reverseengineering.stackexchange.com/questions/18851/does-android-apk-contain-game-mechanics/18852#18852

Editors

https://langserver.org/

https://medium.com/@agavatar/programming-with-kotlin-in-visual-studio-code-1d745d6b4ad1

https://visualstudiomagazine.com/Blogs/Data-Driver/2017/10/kotlin-visual-studio.aspx

Emulators

https://www.apkonline.net/filemanagerandroidonlineemulator.php?username=1746250

Code Review

https://medium.com/@adityanandardhane/github-copilot-for-android-developers-76f0df28b9f2

Theme Hospital APK

http://www.armedpineapple.co.uk/2012/02/running-theme-hospital-on-android-with-corsixth/

https://github.com/alanwoolley/CorsixTH-Android

Reviews

https://whatoplay.com/android/free/beat-em-up/

Terminology

Code

https://help.salesforce.com/articleView?id=000333297&type=1&mode=1

https://help.salesforce.com/articleView?id=000317627&type=1&mode=1

https://hackernoon.com/making-the-most-of-flutter-from-basics-to-customization-433171581d01?gi=6af18eb8bee7

https://www.tutorialspoint.com/android/android_resources.htm

https://code.tutsplus.com/tutorials/how-to-localize-an-android-application--cms-22154

https://www.c-sharpcorner.com/UploadFile/0e8478/supporting-different-languages-layouts-in-an-android-appli/

https://gurubox.org/2018/10/29/how-can-i-create-a-free-android-apps-without-coding-skills/

https://developer.android.com/reference/android/R.styleable#lfields

https://developer.chrome.com/multidevice/android/intents

https://developer.android.com/guide/components/intents-common

https://moz.com/blog/how-to-get-your-app-content-indexed-by-google

https://techcrunch.com/2016/03/05/mit-spin-out-thunkable-hopes-its-drag-and-drop-app-builder-can-be-a-money-spinner-too/

https://www.edsurge.com/news/2018-06-05-thunkable-launches-cross-platform-app-maker-that-lets-kids-drag-drop-and-build

https://www.wikihow.tech/Use-Google-Translate-Android-App-As-OCR

http://appinventor.mit.edu/explore/ai2/setup.html

http://www.android-ide.com/tutorial_androidapp.html

https://visualstudio.microsoft.com/vs/msft-android-emulator/

https://en.wikipedia.org/wiki/List_of_free_and_open-source_Android_applications

https://en.wikipedia.org/wiki/Carrier_IQ

http://barbra-coco.dyndns.org/student/Gradle%20in%20Action.pdf

http://www.vogella.com/tutorials/Gradle/article.html

https://medium.com/cirruslabs/mastering-gradle-caching-and-incremental-builds-37eb1af7fcde

https://leanpub.com/gradle-goodness-notebook/read

https://vertx.io/blog/tcp-client-using-eclipse-vert-x-kotlin-and-gradle-build/

http://www.alexmedearis.com/junit-mockito-powermock-eclipse/

https://www.gamespot.com/new-games/best-android-games/

https://www.androidpit.com/new-android-games

https://www.gamespace.com/category/all-games/android/

https://www.reddit.com/r/patientgamers/comments/4qjdcn/what_older_games_have_great_ports_on_mobile/

https://en.wikipedia.org/wiki/List_of_Android_games

https://www.malavida.com/en/soft/cuphead-mobile/android/

https://f-droid.org/en/packages/email.schaal.ocreader/

Android for MXML Devs

Adobe StyleManager to Android Theming

Adobe StyleManager Android Theming
Global style management Global Themes apply globally across the application
Component-level styling Local Styles can be applied to individual views
Inheritance of styles Parent theme inheritance enables themes to extend settings
Dynamic style application Runtime theming supports dynamic changes

Adobe Flex MXML to Android XML

Adobe Flex MXML Android XML
<s:Group> / <s:Panel> <LinearLayout> / <RelativeLayout>
<s:Label> <TextView>
<s:TextInput> <EditText>
<s:Button> <Button>
<s:Image> <ImageView>
fx:Script (event handling) onClick attribute
⚠️ **GitHub.com Fallback** ⚠️