flipboard / goldengate Goto Github PK
View Code? Open in Web Editor NEWAn Android annotation processor for generating type safe javascript bindings (Bridges)
License: BSD 3-Clause "New" or "Revised" License
An Android annotation processor for generating type safe javascript bindings (Bridges)
License: BSD 3-Clause "New" or "Revised" License
how do i check on the latest version??
Description:
When callback annotate as @JavascriptCallback is called from javascript for long time, then the android callback is not called.
Reason:
Android callback registered to BridgeInterface its stored to HashMap as <callback_id. WeakReference<callback_wrapper>>. When js work time is device under memory pressure then GC remove reference to callback_wrapper.
Error:Execution failed for task ':OverDragLayout:androidJavadocs'.
Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/hesk/GitHub/HypebeastStore-Android-Native/hypebeaststore/OverDragLayout/build/tmp/androidJavadocs/javadoc.options'
This happens when it try to ship out the apk to the adb and eventually cause javadoc generation failed.
This is my compile list:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
/*compile('com.jeremyfeinstein.slidingmenu:library:1.3@aar') {
exclude module: 'support-v4'
}*/
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile project(':JazzListView')
compile('de.psdev.licensesdialog:licensesdialog:1.6.0') {
exclude module: 'support-v4'
}
compile 'com.squareup.picasso:picasso:2.4.0'
compile project(':L-dialogs')
compile 'com.afollestad:material-dialogs:0.6.3.0'
compile 'me.drakeet.materialdialog:library:1.2.2'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile project(':libHkmCheck')
compile 'com.nineoldandroids:library:2.4.0'
// compile 'com.daimajia.slider:library:1.1.2@aar'
compile 'com.android.support:appcompat-v7:21.0.3'
//exclude module: 'support-v4'
compile 'uk.co.chrisjenx:calligraphy:2.0.1'
//compile 'com.github.traex.expandablelayout:library:1.2.2'
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.lsjwzh:materialloadingprogressbar:0.2.0-RELEASE'
compile project(':jsoup-1.8.1')
compile 'au.com.gridstone:grex:1.1.0'
compile 'au.com.gridstone:grex-gson-converter:1.1.0'
compile 'org.lucasr.twowayview:twowayview:0.1.0'
compile 'com.etsy.android.grid:library:1.0.5'
// see changelog
compile 'com.nvanbenschoten.motion:library:1.0.2'
compile project(':WheelViewLib')
compile project(':daimajiaslider')
compile project(':OverDragLayout')
compile 'com.facebook.rebound:rebound:0.3.7'
//http://facebook.github.io/rebound/
//https://github.com/facebook/rebound/blob/master/rebound-android-example/src/main/java/com/facebook/rebound/example/MainActivity.java
compile project(':eexpandedview')
apt 'com.flipboard.goldengate:compiler:1.2.0'
compile 'com.flipboard.goldengate:api:1.2.0'
}
Hi,
is possible to call method with JS callback?
Example:
Library.prototype.fetch = function(url,cb,scope) {
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (request.readyState==4 && request.status==200) {
cb.call(scope,request.responseText);
}
}
request.open("GET",url,true);
request.send();
}
In JS call looks like this:
instanceOfLibrary.fetch('_URL_', function(data) {document.getElementById("output").innerHTML = "<h2>Fetched:</h2><pre>"+data+"</pre>";
If yes, could I ask how to define the callback in interface?
@Method("instanceOfLibrary.fetch")
void fetch(String url, ???? , Callback<String> callback);
Thank you in advance for any hint!
According to your sample code line 25, how does SampleBridge is referenced?
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.