GithubHelp home page GithubHelp logo

distributedcalc-demo's Introduction

Distributedcalc-demo

This is an app built using DevEco Studio.

build and install

To download the code, run the following command:

git clone https://github.com/openharmony-research/distributedcalc-demo.git

Open the project in DevEco Studio. Then, build the hap. If you build successfully, you will see: build

After a successful build, upload the entry-default-signed.hap to the server using command like scp.

Then start an OpenHarmony device using QEMU, connect to the device using the following command:

hdc tconn 192.168.137.2:5555

To install the app, use the following command:

hdc -t <ip> install xxx.hap

Video

match.mp4
music.mp4
calc.mp4

usage

To launch the demo app, use the command:

aa start -a MainAbility -b tutorial.samples.etsdistributedcalc

To experience the disrtibuted ability, you need to open 2 OpenHarmony device and pair them.

First you need 'touch' this button:

button

then choose the device

device

and the other device will requeset user's 'allow' to pair, after allowing you need to type the pin code in the primary device

pin1 pin2

After pairing, type in the following command in QEMU to confirm permissions

uinput -T -c 350 740

and then

uinput -T -c 420 80

choose the device to connect

uinput -T -c 250 450

connect

then you can type any number in the calc, and you will see the two device display same content. content

exit

If you want to exit, you need to change the pair option to local to exit the app on the second device

uinput -T -c 420 80
uinput -T -c 250 400

then the app on the second device will exit. Now you can type

aa force-stop tutorial.samples.etsdistributedcalc

to exit the app on the primary device.

distributedcalc-demo's People

Contributors

kevinw617 avatar mrzleo avatar

Watchers

Dong Du avatar  avatar

Forkers

kevinw617

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.