Development Moved to https://github.com/jasonelle/jasonelle/
jasonette / jasonette-android Goto Github PK
View Code? Open in Web Editor NEW๐ก Native App over HTTP, on Android
Home Page: https://www.jasonette.com
License: Other
๐ก Native App over HTTP, on Android
Home Page: https://www.jasonette.com
License: Other
Development Moved to https://github.com/jasonelle/jasonelle/
feel free to use this code from my project at will. also uses okhttp. it's useful to understand device information as well as doing possible work-arounds.
This exists on iOS but not on Android yet https://jasonette.github.io/documentation/actions/#utiladdressbook
iOS implementation here: https://github.com/Jasonette/JASONETTE-iOS/blob/develop/app/Jasonette/JasonUtilAction.m#L326
The reason it's huge is because of a library that's used to process the JSON template--the end result contains one binary for every possible Android device type.
Find another library that's much smaller and don't have this problem.
Implement so we can watch videos: https://jasonette.github.io/documentation/actions/#media
I've got the following code:
{
"type": "$network.request",
"options": {
"url": "http://www.example.com/{{$get.field}}"
}
}`
The problem is that if the field has spaces (or other characters that need escaping) then the request seems to hang. I think $network.request should always do URL encoding.
Implement slider component https://jasonette.github.io/documentation/components/#slider
use this url (page One), then click on Jump, to take you to page Two, then rotate the device:
found out after prototyping search in ios that it's not in android.
Currently the $timer action is not included in the project. Need to implement.
Support Local JSON, which can be referred to using file://
notation, just like iOS.
Currently http://docs.jasonette.com/advanced/#2-jasonette-non-jasonette this is only supported on iOS.
All we need to do is write some logic for href
that creates an intent just like we do for iOS here https://github.com/Jasonette/JASONETTE-iOS/blob/develop/app/Jasonette/Jason.m#L2687
Is this feasible on Android? https://jasonette.github.io/documentation/document/#search
Documentation: http://docs.jasonette.com/document/#headoffline
iOS implementation: https://github.com/Jasonette/JASONETTE-iOS/blob/master/app/Jasonette/Jason.m#L982
Implement $audio action so we can listen to sound
i noticed that the space component, when not indicating height, appears to not show up, i.e. has zero pixels. this makes things look a little different from ios.
when adding some height, it does render some space.
I had before liberally used space
in iOS without height when i needed to separate groups of items or something. For consistency, I would recommend either defaulting to the same as iOS when there is no height (preferably), or change the default in iOS to behave the same.
(i did not try horizontal spacing)
Please document what font choices are available natively to both iOS and Android.
I'm willing to help doc. Just tell me where to find the details in the code or online or wherever.
Taking the "iOS Dev Weekly" example where the master.json
view transitions to the detail.json
view
In master.json
, the parameter issue
is set:
https://github.com/gliechtenstein/iosdevweekly.json/blob/master/master.json#L41
Then in detail.json
, $params.issue
parameter is used for a network request:
https://github.com/gliechtenstein/iosdevweekly.json/blob/master/detail.json#L40
The first transition from master to detail works correctly, but when you go back to the master view and then go to a different detail view, the $params.issue
is still set to the old value - it's not reset - its value is not being overwritten.
I've tried playing around with $cache.reset
, $set
and $get
actions without success
I think the issue may lie around this area: https://github.com/Jasonette/JASONETTE-Android/blob/develop/app/src/main/java/com/jasonette/seed/Core/JasonModel.java#L41
This is not a problem for the iOS project, only Android
Awesome project BTW! ๐
For some reason the app hangs when rotating.
Thought this was fixed with bd67a71 but started seeing this again recently.
Hi, I just added support to status bar color on my local project.
Only 3 lines of code on Android, but it needs an update on JSON file too.
How can I help you to release officially?
when adding "secure": "true"
to a text field, it appears that it loses some or all of the style.
will add some sample code later, but it's easy to reproduce. make both fields with a bold font and make one "secure".
i can provide a url in private to diagnose this
Documentation https://jasonette.github.io/documentation/actions/#utilshare
iOS Implementation here: https://github.com/Jasonette/JASONETTE-iOS/blob/develop/app/Jasonette/JasonUtilAction.m#L136
Implement map component https://jasonette.github.io/documentation/components/#map
The iOS version supports URL scheme. Need to investigate how it can be ported to Android
Here's the relevant issue thread: Jasonette/JASONETTE-iOS#10
and here's the commit Jasonette/JASONETTE-iOS@b359ab6
Currently corner_radius
only works for images.
Turns out adding corner radius is not as simple as it is on iOS.
Maybe there's a way?
Implement html
component so we can display the html result parsed from $convert.rss, etc.
As seen on iOS https://github.com/Jasonette/JASONETTE-iOS/blob/a0cbde00bebc53f18ca1b0fdaf9a8c6222610d5e/app/Jasonette/Jason.m#L1288
Currently the only component that supports corner_radius
is image
.
Android only started providing a native way of implementing corner radius since Android L, https://developer.android.com/reference/android/view/View.html#setClipToOutline(boolean) and I don't think we can just raise the minsdk just because of this.
I don't think this is a hugely serious problem for now since most of the cases where we need corner_radius are for images. But it still sucks that this can't be easily ported over from iOS. For example label type layers can have corner radius, and it works on iOS but not on Android.
If anyone has a good solution please feel free to contribute or share ideas.
users in android are reporting that the value of a text field is not kept.
so, when they go to open a review to edit it, it's empty. works in ios.
will come up with sample code soon.
For JASONETTE-iOS we have come up with a way to build extensions using CocoaPods. It's still work in progress but it's a good start.
Basically the approach is to separate the modules/extensions as much as possible from the core engine so that anyone can publish an extension, and then anyone can pull them into their projects using CocoaPods (a dependency manager).
For the Android version I've tried my best to separate the modules using Intent so far, but it's still not there yet. I would appreciate any feedback.
Anyway I'm thinking we can achieve the same using gradle (or maybe there's a better option I'm not aware of?) I purposely didn't flesh out completely how the extensions are implemented on the Android side yet because I would like to get some feedback.
Please share your thoughts and ideas. Thanks!
On iOS you can attach the opacity
attribute to any component's style
and it would make it translucent. But this has not been implemented on Android.
I haven't dug deeply into this issue so not sure how complicated it would be to add a generic opacity-altering feature for all JasonComponent
based classes.
Hi!
Android studio says:
E/EGL_emulation: tid 3643: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb027a1c0, error=EGL_BAD_MATCH
D/Error: org.json.JSONException: Expected literal value at character 2072 of
Don't work on Android but work on iOS
Apparently, there is an offline feature on iOS which can cache the whole json file so you can still open the app when offline. It would be nice for that feature to be cross platform.
Example: https://jasonbase.com/things/PVq
Should look like this (under Jason/iOS), if we go by iOS being the golden reference:
http://dl.dropbox.com/u/364883/Screenshots/nzdy.png
I've been thinking abi about json builder for jasonette.
The idea is basically using blockly custom blocks to generate the json.
Just throwing this out here in case anyone has a better idea or maybe working on it or something similar and maybe get some feedback before i start (in like 2 weeks)
your example instagram for android keep crashed when multiple click on bottom menu
We just added AdMob support for iOS Jasonette/JASONETTE-iOS#79
Let's do the same for Android, implementing the same syntax.
The Jasonpedia CSV example doesn't work on Android. All that happens is on application load, a toast message appears stating:
Not implemented
$convert.csv is not implemented yet.
on iOS, each section item is separated by a silver-colored border, and you can turn it off or change its color by specifying the border
attribute on $jason.body.style
. On Android, that hasn't been implemented, making all items unclickable.
{
"$jason": {
"body": {
"style": {
"border": "none"
}
}
}
}
Documentation here: https://jasonette.github.io/documentation/document/#border
There's an undocumented $oauth action on iOS. https://github.com/Jasonette/JASONETTE-iOS/blob/develop/app/Jasonette/JasonOauthAction.m
The reason it's undocumented was because I wasn't sure how long it would take to build the Android version so wanted to get rid of complexity back when i was about to release the iOS version as open source.
The decision was to exclude oauth from the documentation so it's not supported officially, until I release the initial version of Android.
But now that we have both iOS and Android out there, it would be great if we can implement $oauth on Android as well and also document this.
it appears that a device rotation leads to $show
being called, which in one of my cases it leads to a network call and a render.
this is different in Android than iOS, which does not call $show
on rotation.
however, I am not sure if this is inherent to Android, or an accidental addition or bug.
not a high priority issue.
Just realized, the current $util.alert only implements the basic format with title and description. Need to implement the form
attribute so that it can be used as an input
https://jasonette.github.io/documentation/actions/#utilalert
Let's support push notification for Android, with the same syntax as : Jasonette/JASONETTE-iOS#7 (comment)
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.