(base64)
| 1450 | } |
| 1451 | |
| 1452 | static fromBase64String(base64) { |
| 1453 | if (typeof base64 === 'string') { |
| 1454 | let b64 = base64; |
| 1455 | if (base64.startsWith('data:')) { |
| 1456 | b64 = base64.split(',')[1]; |
| 1457 | } |
| 1458 | const data = new java.lang.String(b64).getBytes('UTF-8'); |
| 1459 | const encoded = android.util.Base64.encode(data, android.util.Base64.NO_WRAP); |
| 1460 | const bytes = new Bytes(); |
| 1461 | bytes._native = com.google.firebase.firestore.Blob.fromBytes(encoded); |
| 1462 | return bytes; |
| 1463 | } |
| 1464 | return null; |
| 1465 | } |
| 1466 | |
| 1467 | static fromUint8Array(array) { |
| 1468 | if (!(array instanceof Uint8Array)) { |
nothing calls this directly
no outgoing calls
no test coverage detected