JXCore not running on browser platform - node.js

I want a JXCore application that can run on android, ios and the browser platforms.
I have used the express sample project provided by JXCore and tested it on my android tablet without any problems. However when I run it on the browser platform, it doesn't seem to work. There are no errors but the output on the web page just says:
JXcore plugin: Device type is unkown. Defaulting to Android
Are there any additional configuration or plugins required for JXCore to run on the browser platform or is it not possible?

Cordova's "browser" platform just runs local nodejs server which hosts static files. Instead you can run nodejs server as hosted app and reach from browser.
You can see this jxcore cordova project which works without cordova too, just running jx www/jxcore/app.js command.

Related

Problem processing route in Ember.js app when building and running app in Android studio emulator

Trying to build and run an Ember app with Capacitor on virtual device in Android studio. Build and installation goes fine until the app is launched and stops when trying to process a spesific route. The problem only occurs when building from windows, no problem on Mac. The app is communicating with a jsonapi.
Error message in chrome device inspector: "Error while processing route [routename]"
I have tried with physical device connected getting the same message. Also tried with Genymotion plugin.
Capture of browser console:
chrome console error
And this is what logcat is giving:
logcat error
I also have some errors reported from the IDE (Android Studio) not related to running the Emulator but occurs when opening the IDE:
Android Studio errors. In case this has something to do with it.
Solution in this case:
Had to reinstall node js with another older version. Did an npm cache clean and built the app all over again. Also made sure to open the project with npx cap open android.

create a mobile app from my web site using reactjs (not native)

I need to develop a mobile application which will be same for my web site (already create with reactjs). I was researching on reactjs. Can I convert my reactjs code from web-site to reactjs for mobile application ?
need a solution please
Thanks
No bro, a PWA cannot be uploaded to the apple store, by the way you can bypass this problem using ionic capacitator!
Capacitor is a cross-platform app runtime that makes it easy to build
web apps that run natively on iOS, Android, Electron, and the web. We
call these apps “Native Progressive Web Apps” and they represent the
next evolution beyond Hybrid apps.
According with this tutorial written by Manish Mandal to do so u have to:
1 - First, go to the root of your existing react app and create a file capacitor.config.json and inside that put the below code
{
"appId": "io.ionic.yourapp",
"appName": "yourapp",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "build",
"cordova": {}
}
2 - Now create another file name ionic.config.json and inside that insert the below code.
{
"name": "yourapp",
"integrations": {
"capacitor": {}
},
"type": "react"
}
3 - Now we need to build our react project. To build your react app open your terminal to the root of the project and run the below-mentioned command
npm run build
Note: this will create the build folder in your root porject and the
name of the folder should match the webDir name inside
capacitor.config.json file
4 - Now we will install ionic globally in our machine. To install ionic globally in your machine open your terminal and run the below command.
npm install -g #ionic/cli
5 - Now install the capacitor core in our project.
npm install #capacitor/core --save
ANDROID
6 - After that, we will first create an android app with our existing react app. Open your terminal and type
ionic capacitor add android
This will create the android folder in your root project and install all the required dependencies.
7 - Now run the below command to open your android project in android studio.
npx cap open android
Wait some time and then it will ask you to update the Gradle. Just update the Gradle to the latest version and run the project in the emulator. You can also connect your mobile to run the project live on your mobile phone.
8 - Now open the build menu from the android studio and build your apk file.
IOS
9 - To create ios app run the below command
ionic capacitor add ios
This will install all the required dependencies and ios folder to your project.
10 - Now run the below command to open your ios project in Xcode.
npx cap open ios
11 - Now open the app in emulator or physical device and build the app.
More info about capacitator:
https://capacitorjs.com/
so you need to create progressive web app , all it takes a mainfest.json file in your meta tag WebApp Manifest
with some splash screens and icons chrome will make you install mobile app like on client devices. And try to implement a service worker to handle the offline mode Service Worker
This course from egghead is very good PWA
You could create an "app" that is really just a webview that shows your website but it won't really have the same experience as a native app.
As mentioned a PWA would be a good approach. This way you can keep all your ReactJS code and have an app-like experience.
Android even supports submitting PWAs to the store.
You can't perform code conversion from react-js to react native directly, even though there are many similarities between them. Web application built with React.js can be easily converted to a React Native mobile app, and some source code can be reused
if you want to develop a single app for both mobile and web either,
create a web app that mobile browser friendly
or
create PWA(Progressive Web app) using React, PWA can access Native Mobile api like GPS

How do i build a phonegap app for webapp?

I created a phonegap project in my machine and deployed it as a web app. when i browse it shows cordova is not defined. if i place the cordova.js inside the root folder then it throws some plugins are missin. anyone guide me how to host a webapp
using phonegap project.
Use this command to add the browser platform to your Cordova project,
cordova platform add browser
Now if you check inside your platforms directory there will be a new directory called browser.
Now run this, to get a browser compatible build.
cordova build android
Inside the "platforms > browser > www" directory you will find you web assets. You can host them on your server.

Tabris.js developer app not loading my app

When I try to access my app via the URL in the Tabris.js 2 Developer app, I briefly see the message below, and the app returns me back to the URL screen:
"Could not load boot.min.js or boot.js file from tabris module 'node_modules/tabris'"
I tried running the basic out-of-the-box tabris test app (using tabris init in an empty directory) and the same issue happened, so I am confident that this is not something to do with my app.
Some other details:
Using v2.0.0 of tabris.js, although this is happening with 2.0.0-rc2 as well
The last time this worked with the same code base for me was prior to my phone (a Nexus 5X) being upgraded to Android Oreo. I wonder if the Tabris.js 2 Developer app has any issues running in Oreo?
I know that the http-server is running correctly on my development machine, as I can navigate to http://[development-ip]:8080/package.json and get that file on my mobile device
I can confirm the issue with a project created with the CLI (version 2.0). The latest tabris dev app (2.1) does not work with tabris 2.0. You'd have to upgrade your projct to tabris 2.1:
npm install --save tabris#^2.1.0
The reason is that as of tabris 2.1 a bootstrapping file (boot.js) is now read from the tabris module. This file was included in the dev app before.
When you upgrade tabris-cli to the latest version, projects created with tabris init will not be affected by this problem.

PhoneGap 3.1 Local Build WP8

I'm trying to play with new phonegap-cli main focus is to setup wp8 platform
and when running command:
phonegap build wp8
It tries to use PhoneGap Build, which I presume happens because it hasn't found
my installed SDK in any path.
I tried to test my thesis and ran this command:
phonegap local build wp8
And it returns this error:
I have .NET Framework v4.0 installed, so this path exists:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
So the only thing I think happens is that phonegap can't find where SDK is installed,
so I have been searching through the documentation and I couldn't find anything regarding which Environment Variable PhoneGap checks.
So I would really appreciate any kind of help here.
Please make sure that you have added the framework path to the system PATH variable.
In my case it was the above reason and also related to Ant installed and configuration.
Alternatively you can use phonegap's online build service:
https://build.phonegap.com/
It works like a charm and is free for 1 private project.

Resources