Using Highcharts JS in native mobile application - android

so i started to look into building android application that would mirror some stuff i use on a webpage. Namely weather meteograms that are built with Highcharts.
Since i am using angular 2 i thought it would be logical to go angular 2 + nativeScript way. And i cant seem easilly find information about using Highcharts within native application.
Does anyone has examples or knows some page with information about this subject.
Worst case - what would be a good alternative to highcharts to use in mobile app built with angular2 and NativeScript?
Please dont suggest paid librarys/packages.

Add a WebView to the XML file and load a local HTML containing the charts.

There is a paid plugin for creating charts in nativeScript aclled telerik-ui-pro.
More about it here
Demonstration application can be found here

high charts uses the DOM to generate the charts, nativescript doesn't use the DOM for rendering so is a no go..
i was able to generate a bar chart (on android) by creating a small plugin out of this android library https://github.com/PhilJay/MPAndroidChart

Related

Is there a way to create iOS and Android libraries (maven and cocoapds) from one source code (eg. via Flutter)?

We are looking for a way to create a simple mobile SDK for both Android as well as iOS.
The SDK is super simple and will only make API calls and open page in WebView.
Is there a tool or language (eg. Flutter/React Native) where we would be able to create the small SDK and then export it for both Android and iOS and add in their respective repositories?
Or are we going to have to create 2 projects in for example Swift and Kotlin?
Looking for advices and best practices. Thank you.

using loadUrl()

It's been a few years since I've tried to create an Android application and since everything has moved away from Eclipse and now onto AS my old templates no longer work. I'm looking for tutorials that allow me to use my own custom html, css and Jquery, seeing as stuff like super.loadUrl("file:///android_asset/www/index.html"); don't seem to work anymore.
Are there any links or anything anyone can provide to get me started on creating non java dependant application?
If you want to make an app without using java you can start learning ionic framework https://ionicframework.com/
You can also go through Apache Cordova. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development and you can also go with Xamarin that uses C# for cross-platform development.
You can also go through this tutorial for better understanding and for start learning from fresh :
Ionic tutorial https://www.youtube.com/watch?v=0jamhGf-8ww&list=PLYxzS__5yYQljbuGjaeugpqs9U07gS5P5
Cordova Tutorial https://www.youtube.com/watch?v=kqWZuEpHoSw&list=PLReL099Y5nRd9BNsMZwXvTDeqnfRMiGJy
Hope this will be helpful!!

Phonegap with Android XML

I'm working on a android application
I would like to create a application for android using phone gap.
Is this possible? can I create a front end design in Android XML and back end controller functions in phonegap and make it an app in android studio ?
Any thoughts / experiences?
YOu can use cordova/phone gap to develop mobile apps. But these framework uses HTML5/css/JS technologies to do so. Sn android.xml would not work. You need to create your UI using HTML+CSS and code your business lodic in JS.

Does Android Studio supports AngularJS for Android UI design?

I have a question about Android Studio: Does AS supports AngularJS code while designing XML files, e.g. for small animations or effects?
SUMMARY : NO
There is no way you can write Angular JS code while developing Android Native app. You can use Angular in a WebView (using js/html so), that's all.
AngularJS is a completely different technology than what is used in native Android apps. Native Android apps use Java and/or C for their code, which is compiled when you build the app. AngularJS is a framework for web development, running specifically on Javascript (a completely different technology than Java).
You can build apps without using native Java or C code, but there are tradeoffs. As noted in other answers, you can display webpage views as apps (using technologies like Cordova]), or use frameworks like React Native to write code in Javascript that then gets compiled to a native app. You could use AngluarJS in the webview instance, since it just displays a webpage, however not in something like React Native. I highly encourage you to check both of these (and other options) out, but keep in mind that they have their own limitations and tradeoffs – no one way is the "right" way to build an app.
In summary: No, AngularJS is a web technology, not a native app technology.
new answer = Yes... Sort of, you can do it with:
https://www.nativescript.org/
It translates javascript, angular and typescript code into native components!
Apparantly it's possible to use nativescript in Android Studio with:
https://docs.nativescript.org/runtimes/android/getting-started/hello-world
Android Does not support AngularJs. but still if you want to use you can use it in webview.

Android charts: to use webview/JS or to go native

We are going to build a android library which will provide a API for developers to build applications which can embed certain charts easily (the charts would display specific contents particular to the API).
Since there are no charting libraries that are dominant in the market, what library would be ideal for this. Some of the chart types need to be developed for this that are currently not supported by any native libraries( like heatmaps). Keeping this in mind would you guys advice going in for a native lib or with webview embedded HTML/JS.
The problem with webview is that you cannot package assets(html/js) on a library project like resources. So its again a additional step for the developers using the library to copy the assets to the project.
Additional Info:
My API should allow the developer to easily embed a chart. Something like
<org.example.customPieChart
android:id="#+id=chart"
android:width="150dip"
android:height="150dip"
/>
And the API should take care of everything else. Only if the developer wants to change color, customize the stuff then possibly he will use the other parts of the API and do that.
I have used aChartEngine Library for the chart and its working fine. So I am suggesting you aChartEngine.

Categories

Resources