Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Which phones support Android Polyfill? #54

@hpssjellis

Description

@hpssjellis

@reillyeon

Can we just list the phones that support Android Polyfill

I have it working on a Google Pixel V2. So I am going to guess that it works on all Pixel phones.

I think I had it working on a Samsung Galaxy S19, but it does not presently work on my Galaxy S4, S8 or my latest S22 Ultra. I am going to assume polyfill does not work on the Samsung brand.

Has anyone tried Polyfill with any of these brands?

Samsung     : doesn't work
Google Pixel  2 and 3:  Works, Not for my Pixel 6
OnePlus
Xiaomi   Works (user reported Redmi K40)
Oppo
Vivo
Motorola
LG
Sony
Nokia

If anyone wants to test their phone my WebSerial and Android Polyfill webpage is here The Arduino sketch for it is here but I will inline it below:


/*
 * webSerial for testing javascript connection with an arduino
 * 
 * 
 * Android https://hpssjellis.github.io/web-serial-polyfill/index.html
 * Laptops Desktops  https://hpssjellis.github.io/my-examples-of-arduino-webUSB-webSerial/public/index.html
 * IOS     not really sure
 * 
 */



#include <Arduino.h> // Only needed for https://platformio.org/

String readString;

int myDelay = 5000;   // non-block delay in milliseconds
unsigned long myStart; 
int serialMessage = 1;
int myCount=48;      //48 = ascii 0,    58 ascii 9

void setup() {
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);   // onboard LED, HIGH = off
  
  myStart = millis();   // set delay
  randomSeed(analogRead(A0));  // AO pin on XIAO does not have to be connected to anything

}

void loop() {

  if ( (millis() - myStart ) >= myDelay) {       
     myStart = millis();      //  reset the delay time
     myCount++;
     if (myCount >= 58){ // 48 = ascii 0,    58 ascii 9
       myCount = 48;
     }       
     //char myChar = (char)myCount;      
     byte myChar = (byte)myCount;    
     Serial.write(myChar);  
   }

  

  while (Serial.available()) {
    delay(3);  
    char c = Serial.read();
    readString += c; 
  }

  if (readString.length() > 0) {
    readString.trim();  // get rid of last weird character
    Serial.println(readString);

    if (readString == "a"){
      digitalWrite(LED_BUILTIN, LOW); //onboard LED LOW = on
      Serial.println("LED ON");
    }
    if (readString == "b"){
      digitalWrite(LED_BUILTIN, HIGH);
      Serial.println("LED OFF");
    }
    readString="";
  } 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions