Requirements:
-
Device should be a rooted (simulator’s are rooted by default)
-
adbd should be started as root. (Rub command:
adb root)
Now, send local push message using command:
| import React, { Component } from 'react'; | |
| import { WebView, BackHandler } from 'react-native'; | |
| export default class WebViewMoviezSpace extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.WEBVIEW_REF = React.createRef(); | |
| } | |
| componentDidMount() { |
Requirements:
Device should be a rooted (simulator’s are rooted by default)
adbd should be started as root. (Rub command: adb root )
Now, send local push message using command:
| /** | |
| * Created by Guy Blank on 3/9/17. | |
| * | |
| * This is a sample provides an API to send & receive messages to and from the React-Native WebView (using postMessage/onMessage WebView API). | |
| * A sample project that uses the bridge is available here https://github.com/blankg/rn-webview-bridge-sample | |
| * | |
| * webViewBridge.send('functionToInvoke', {mydata: 'test'}, function(){console.log('success')},function(){console.log('error')}); | |
| * | |
| * The API is designed to be similar to the Cordova exec API so migration to it should be almost seamless. | |
| * The API also provides solution to a React-Native WebView bug in iOS which causes sending consecutive postMessage calls to override each other. |
| Follow the WORKAROUND: | |
| 1. Add a comand to /etc/rc.local, add the following line above "exit 0": | |
| setpci -s 00:1c.2 0x50.B=0x41 | |
| 2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet): | |
| setpci -s 00:1c.2 0x50.B=0x41 | |
| 3. Add the following to /etc/modprobe.d/sdhci.conf: | |
| options sdhci debug_quirks2=4 | |
| 4. Re-generate initrd: | |
| sudo update-initramfs -u -k all | |
| 5. Reboot or reload sdhci module: |
In Google Developer Console inside your app project, on the Credentials section, you must create a new "Service Account" "Client ID", if you have not already. And download the p12 file. You need the service account key file, generated in the Google APIs Console into the same directory and rename it to key.p12.
On Google Play Developer Console you have to give permissions to "YOUR_SERVICE_ACCOUNT_EMAIL@developer.gserviceaccount.com" for uploading apks.
Download Google APIs Client Library for Python (google-api-python-client): https://code.google.com/p/google-api-python-client/ or use pip:
$ pip install google-api-python-client| # Make sure you grab the latest version | |
| curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
| # Unzip | |
| unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
| # Move protoc to /usr/local/bin/ | |
| sudo mv protoc3/bin/* /usr/local/bin/ | |
| # Move protoc3/include to /usr/local/include/ |
| #!/bin/bash | |
| # | |
| # rotate_desktop.sh | |
| # | |
| # Rotates modern Linux desktop screen and input devices to match. Handy for | |
| # convertible notebooks. Call this script from panel launchers, keyboard | |
| # shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). | |
| # | |
| # Using transformation matrix bits taken from: | |
| # https://wiki.ubuntu.com/X/InputCoordinateTransformation |
| curl -XDELETE 'localhost:9200/isbn/' | |
| curl -XPUT 'localhost:9200/isbn/' -d ' | |
| { | |
| "mappings" : { | |
| "_default_" : { | |
| "_source" : { | |
| "enabled" : true | |
| }, | |
| "_all" : { |