Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Some MIFARE Classic cards require encryption keys to read. You can obtain keys u
* **Android:** NFC-enabled device running Android 6.0 (API 23) or later
* **iOS:** iPhone 7 or later with iOS support for CoreNFC
* **macOS** (experimental): Mac with a PC/SC-compatible NFC smart card reader (e.g., ACR122U), a PN533-based USB NFC controller (e.g., SCL3711), or a Sony RC-S956 (PaSoRi) USB NFC reader
* **Web** (experimental): Any modern browser with WebAssembly support. Card data can be imported from JSON files exported by other platforms. NFC reading via WebUSB is planned but not yet implemented.
* **Web** (experimental): Any modern browser with WebAssembly support. Card data can be imported from JSON files exported by other platforms. Live NFC card reading is supported in Chrome/Edge/Opera via WebUSB with a PN533-based USB NFC reader (e.g., SCL3711).

## Building

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.codebutler.farebot.desktop
import com.codebutler.farebot.shared.platform.PlatformActions
import java.awt.Desktop
import java.awt.Toolkit
import java.awt.datatransfer.DataFlavor
import java.awt.datatransfer.StringSelection
import java.io.File
import java.net.URI
Expand All @@ -27,15 +26,6 @@ class DesktopPlatformActions : PlatformActions {
clipboard.setContents(StringSelection(text), null)
}

override fun getClipboardText(): String? {
val clipboard = Toolkit.getDefaultToolkit().systemClipboard
return try {
clipboard.getData(DataFlavor.stringFlavor) as? String
} catch (_: Exception) {
null
}
}

override fun shareText(text: String) {
copyToClipboard(text)
showToast("Copied to clipboard")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ class AndroidPlatformActions(
clipboard.setPrimaryClip(ClipData.newPlainText("FareBot", text))
}

override fun getClipboardText(): String? {
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
return clipboard.primaryClip
?.getItemAt(0)
?.text
?.toString()
}

override fun shareText(text: String) {
val intent =
Intent(Intent.ACTION_SEND).apply {
Expand Down
170 changes: 0 additions & 170 deletions app/src/commonMain/composeResources/files/samples/EZLink.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ interface PlatformActions {

fun copyToClipboard(text: String)

fun getClipboardText(): String?

fun shareText(text: String)

fun showToast(message: String)
Expand Down
Loading