google / android-emulator-webrtc Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
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;
I got error like this. How can I figured out ?
** And also i find this example
Hi,
We're looking for the possibility to rotate the emulator, I found some rotation related code in the protobufs (https://android.googlesource.com/platform/prebuilts/android-emulator/+/master/linux-x86_64/lib/emulator_controller.proto#785), but I'm not sure how to add it.
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);
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?
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.