Giter Site home page Giter Site logo

native-messaging's Introduction

Native-Messaging

Chrome's native messaging example project for Java.

Project structure:

  • App - contains chrome's extension for native messaging example.
  • App_Native - contains native application (java project).
  • Host - native messaging host (+ registry file).
  • Web - contains a simple website which send and receives message from native app.

If you are using eclipse, use maven's eclipse plugin:

cmd: cd App_Native
cmd: mvn eclipse:eclipse

native-messaging's People

Contributors

vakho10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

native-messaging's Issues

Send messages with accented characters

Hi, vakho10. i am trying to send messages with accented characters like "á", "ç", "ô", etc, but it does not work. On the console of the chrome extention appear the following error:

(BLESSED_EXTENSION context for knldjmfmopnpolahpmmgbagdohdnhkik) undefined:1: Uncaught SyntaxError: Unexpected end of JSON input{SyntaxError: Unexpected end of JSON input
at Object.parse ()
at dispatchOnMessage (extensions::messaging:338:21)}

Do you have any idea of what could be the problem?

Messages without accented characters work fine.

I can't read message from start.cmd

use readMessage i got nothing.
check args i got --parent-widnow=xxxx,chrome-extentions://xxxxx

start.cmd like this

java -Xdebug -Xrunjdwp:transport=dt_socket,address=9998,server=y,suspend=n -jar "%~dp0/extentions-0.0.1-SNAPSHOT-jar-with-dependencies.jar" %*

the message send from page is "{"AuthKey":"niuniu","Pensize":2,"DrawType":0,"TrackColor":255,"EditBorderColor":16711680,"Transparent":240,"SetSaveName":"aaaa","SetMagnifierLogoText":"bbbb","SetWatermarkPictureType":3,"SetWatermarkPicturePath":"","SetWatermarkTextType":1,"MosaicType":1,"DefaultPath":"1.jpg","HideCurrentWindow":0,"AutoCaptureFlag":0,"x":0,"y":0,"Width":0,"Height":0}"

do you know what's the problem ?

in chrome_debug.log i found

[2132:2840:0518/105851:ERROR:native_message_process_host.cc(292)] Native Messaging host tried sending a message that is 1953720652 bytes long.

it's seem like chrome problem ? but i search from stackoverflow,there say it's java problem. sadness.

How to make app work

Hi, I'm fairly new to programming but I'm interested to see how this native messaging program works. I've opened the project in an IDE but some parts of the Java code don't really make sense.

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.