Is there a way to use jinja2 in an android hybrid app? - jinja2

I have a mobile android hybrid app that mimics a webapp.
In the webapp I use flask and jinja2 to create the HTML pages.
In the mobile android app I have an non-template html file that loads the javascript files from the local mobile device, so it can work offline.
There is no webserver or flask in the android app, so the html pages with jinja2 do not present correctly.
Is there a way to use jinja2 in an android hybrid app?
If not, what is the best way to adjust the jinja2 html files.
Should I rewrite an equivalent non-template html file?
Or is there another templating language that can be used?
Thanks

I solved the problem by having a second version of the html file (e.g. extended_app.html) which combines the templated html file (extended.html) and the base html (base.html) embedded within it explicitly, thus avoiding the need to have jinja2 when working in the mobile app.

Related

How can I code an iOS app while on my iPhone without a pc

Is it possible for me to develop and iOS app on my phone? I wanna either code an app off my iPhone 5 or just make my website into an app. Is there somewhere I can go to do this or is it not possible?
You can only programming on Xcode. And if you want to make your website into an app, you can use WKWebView. You can build a wkwebview with a url, then your app would just like a browser. And you can what you want in the website.
It is not possible to make an app from your iPhone 5. You can only create iPhone apps with a native programming language using Xcode. But, you can convert your website to an app using an application like PhoneGap, or you could use a JavaScript library like Electron.js.

Downloading Angular or ReactJS web pages

I need to write a parser which will collect data from a website which was developed using ReactJS. The problem is when open source code (Ctrl+U) I don't see anything in the code but if I inspect an element a can see full webpage in for instance google inspector (Ctrl+Shift+I)
Do you how can can download html code from the inspector?
I can not speak for React, but with angular if you locally host the site (ng serve) you will not be able to ctrl+u. However, if it's hosted somewhere you can ie: https://angular.io/

How to compile a webapp to an hybrid one/jpk for my mobile phone without framework?

I have to build a hybride app, out of my webapp. It´s not allowed to use a middleware framework like phonegap which just builds it. In my app I want to show that HTML5 already allows to use a lot of functions of the mobile phone like the geolocation, instead of frameworks which can do the same, so I cannot use the framework for building my app. Which program should I use, VS? And how can I build my application(jpk) without a framework like that to test it on my mobile phone?
You should create a simple application with a webview and run your webapp inside this webview.
The problem is: hybrid frameworks like Cordova or Phonegap arent supose to just implement mobile features like camera or gps, they are useful writing once and run everywhere without complaining about iOs and Android code or even for fallbacks. Probably in the future youre not even going to install applications in your phone to use all mobile features using only browser features.
Here are some helpful links:
https://developer.android.com/guide/webapps/webview.html
https://developers.google.com/web/fundamentals/getting-started/codelabs/your-first-pwapp/
https://developer.mozilla.org/en-US/Apps/Progressive

HTML5 invoke native app (ios and android)

I have 2 mobile apps. One develop using HTML5 and another using native code. Is it possible to using the mobile apps (HTML5) to invoke another mobile apps (native code)? Any one can provide an example or link ?
Use a URI Scheme. For example, this opens the iBooks Application.
Link
Here is a list for native apps
able to solve the encountered problem. it need to change the plist file and android manifest.xml to make it work.

HTML Style Tag in Android

As I have referred some articles and sites, I found that we can also create HTML file and then we can display HTML file using Android WebView..
I have referred at:
Android WebView (WebKit) Tutorial
Understanding User Interface in Android - Part 4: Even More Views
So my question is that:
Is Android provides STYLE/CSS tag to define styles, if yes then there is any way to write STYLE/CSS tag in Android?
Thanx - Paresh
Of course. The Android Web View is a full fledged browser, and supports everything the built in "Browser" application supports (CSS, JavaScript). Newer versions of Android (2.2) have the V8 runtime and do great on the Acid tests.
You would use CSS as you do in any other web page.