Git Product home page Git Product logo

android-emulator-webrtc's Issues

TypeError: _this.auth.authHeader is not a function

Hello my friends. I try to implement this code but it does not work.

import React, { useState } from 'react';
import { Emulator } from "android-emulator-webrtc/emulator";

function App() {
  const [authHeader, ] = useState({authorized: "hCGK/6BaMH+8cas1"});
  return (
	<div>
   <Emulator uri="http://localhost:5554"  auth={authHeader}  />;
	</div>
  );
}

export default App;

image

I got error like this. How can I figured out ?

** And also i find this example

Caplocks Issue

When we tested the emulator, sometimes the caps lock key doesn't work and all letters typed in the emulator are uppercase. And it doesn't switch to lower case when press the caps lock key either in the keypad in emulator nor on the real keyboard.

Touch events crashes Goldfish/Emulator

Hey, I am currently trying to add touch event handling following an old issue: google/android-emulator-container-scripts#113

However it seems to be broken in the latest stable and canary version (30.0.12 & 30.0.25) of Goldfish/QEMU as I get a crash as soon as I send even a simple touch event hooked in via onTouchStart for example:

        const protoTouch = new Proto.Touch();
        protoTouch.setX(50);
        protoTouch.setY(50);
        protoTouch.setIdentifier(0);
        protoTouch.setPressure(10);
        protoTouch.setTouchMajor(24);
        protoTouch.setTouchMinor(24);

        const requestTouchEvent = new Proto.TouchEvent();
        requestTouchEvent.setTouchesList([protoTouch]);
        const { jsep } = this.props;
        jsep.send('touch', requestTouchEvent);

How do you specify your own hardware config?

I have an emulator that doesn't use 1920x1080p as its screen dimensions, which seems to be the default for this package. The following code in event_handler.js suggests that you should be able to specify your own dimensions (presumably via a config.ini file)

getScreenSize() {
      this.status.updateStatus(state => {
        this.setState({
          deviceWidth: parseInt(state.hardwareConfig["hw.lcd.width"]) || 1080,
          deviceHeight: parseInt(state.hardwareConfig["hw.lcd.height"]) || 1920
        });
      });
    }

However, I can't for the love of god figure out how to set the value of state.hardwareConfig. I also tried setting the height and view props of <Emulator />, but that didn't seem to do anything?

Support for paste keyevent input

We're trying to add some functionality to support pasting into the emulator. We can get and set the clipboard via the existing gRPC APIs, but I can't figure out how to get the device to actually paste the clipboard content. With adb, this works with adb shell input keyevent 279, but using the sendKey(KeyboardEvent) api, neither key: "Paste" or keycode: 279 work. (https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#editing_keys)

Is there some way we can force the device to paste (and cut and copy) via the existing gRPC interface?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.