android-js / androidjs Goto Github PK
View Code? Open in Web Editor NEWPlatform to build android app using node js
License: MIT License
Platform to build android app using node js
License: MIT License
cool@zenbook:~/Documents/Projects/cool Parole$ npm i chardet
> [email protected] postinstall /home/cool/Documents/Projects/cool Parole/node_modules/nodemon
> node bin/postinstall || exit 0
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
added 314 packages from 190 contributors and audited 2508 packages in 5.683s
found 0 vulnerabilities
cool@zenbook:~/Documents/Projects/cool Parole$ androidjs b
Testing 'Theme Update' ...
webview: cool
building
updating... [object Object]
{
fullScreen: true,
colorAccent: '@color/colorAccent',
colorPrimary: '@color/colorPrimary',
colorPrimaryDark: '@color/colorPrimaryDark'
}
[
{ _: '@color/colorAccent', '$': { name: 'colorAccent' } },
{ _: '@color/colorPrimary', '$': { name: 'colorPrimary' } },
{ _: '@color/colorPrimaryDark', '$': { name: 'colorPrimaryDark' } },
{ _: true, '$': { name: 'android:windowNoTitle' } },
{ _: true, '$': { name: 'android:windowFullscreen' } },
{ _: 'false', '$': { name: 'android:windowActionBar' } }
]
Done!
checking Core
using core /home/cool/.androidjs/androidjs-sdk
removing /home/cool/.androidjs/androidjs-sdk/assets/myapp/*
copying Assets
copying from /home/cool/Documents/Projects/cool Parole
to: /home/cool/.androidjs/androidjs-sdk/assets/myapp
[ '/home/cool/Documents/Projects/cool Parole/dist' ]
(node:16701) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, scandir '/home/cool/Documents/Projects/cool Parole/node_modules/.bin/atob'
at Object.readdirSync (fs.js:865:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:69:18)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
(node:16701) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:16701) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
㋛ using androidjs-sdk {"version":"2.0.0"}
cool@zenbook:~/Documents/Projects/cool Parole$
How can I solve this problem?
Is it possible to assign widgets too?
Hello, I try to make the examples work but impossible!
I have this recurring error:
atmo@atmo:~/Bureau/sample-app/helloworld$ androidjs b -f
Testing 'Theme Update' ...
webview: myapp
building
updating... [object Object]
{
fullScreen: true,
colorAccent: '@color/colorAccent',
colorPrimary: '@color/colorPrimary',
colorPrimaryDark: '@color/colorPrimaryDark'
}
/usr/local/lib/node_modules/androidjs-builder/lib/update_theme.js:40
let thm = result.resources.style[6].item;
^
TypeError: Cannot read property 'resources' of undefined
at /usr/local/lib/node_modules/androidjs-builder/lib/update_theme.js:40:38
at Parser.<anonymous> (/usr/local/lib/node_modules/androidjs-builder/node_modules/xml2js/lib/parser.js:310:18)
at Parser.emit (events.js:210:5)
at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/androidjs-builder/node_modules/xml2js/lib/parser.js:329:16)
at Parser.parseString (/usr/local/lib/node_modules/androidjs-builder/node_modules/xml2js/lib/parser.js:5:59)
at ReadFileContext.callback (/usr/local/lib/node_modules/androidjs-builder/lib/update_theme.js:36:24)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13)
I feel like he's trying to load an xml file that doesn't exist
Hey @Chhekur!
Nice project, it's a very easy and nice way to make android apps. I don't really have a bug but a question.
I got a test app to work just fine, however the notification bar of my phone colors blue. Is there a way to change that color?
here's a screenshot: https://imgur.com/PrJKbwV
Thanks in advance.
Ethan.
Describe the bug
It requests a Java JRE version > 1.8.0
To Reproduce
Steps to reproduce the behavior:
Making the command androidjs --help
Expected behavior
Any error
Desktop (please complete the following information):
Additional context
I have already installed the latest java version in C:\Program Files\Java\jre1.8.0_241
But in the androidjs --help
i have this:
androidjs-builder requires JRE version > 1.8.0
which can be found here https://filehippo.com/download_jre_64/
But i already have latest jre version for java (i have both 64 and 32 bit 1.8.0_241)
Describe the bug
When following the "Quick Start", for the sample-app "chat-app", I get "ERROR: failed to build.apk", followed by "stderr:" and a bunch of other stuff.
To Reproduce
git clone https://github.com/android-js/sample-app
cd chat-app
npm install
androidjs b -f
Expected behavior
I expected to find an apk in the ./dist folder, but there wasn't even a .dist folder
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
The project.json file:
{
"name": "myapp",
"private": true,
"package-name": "chatapp",
"app-name": "Chat App",
"icon": "./assets/icon/app3.png",
"project-type": "webview",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "node main.js",
"build": "androidjs build"
},
"permission": [
"android.permission.INTERNET"
],
"dist-path": "./dist",
"author": "",
"license": "ISC",
"dependencies": {
"androidjs": "^1.0.0",
"ip": "^1.1.5",
"left-pad": "^1.3.0",
"localtunnel": "^2.0.0",
"public-ip": "^3.0.0",
"socket.io": "^2.2.0"
}
}
Describe the bug
androidjs b fails. See details below.
To Reproduce
androidjs init
then
androidjs b
command log:
Testing 'Theme Update' ...
webview: test
building
updating... [object Object]
{ fullScreen: true,
colorAccent: '@color/colorAccent',
colorPrimary: '@color/colorPrimary',
colorPrimaryDark: '@color/colorPrimaryDark' }
/usr/lib/node_modules/androidjs-builder/lib/update_theme.js:40
let thm = result.resources.style[6].item;
^
TypeError: Cannot read property 'resources' of undefined
at /usr/lib/node_modules/androidjs-builder/lib/update_theme.js:40:38
at Parser.<anonymous> (/usr/lib/node_modules/androidjs-builder/node_modules/ xml2js/lib/parser.js:308:18)
at Parser.emit (events.js:198:13)
at Parser.exports.Parser.Parser.parseString (/usr/lib/node_modules/androidjs -builder/node_modules/xml2js/lib/parser.js:327:16)
at Parser.parseString (/usr/lib/node_modules/androidjs-builder/node_modules/ xml2js/lib/parser.js:5:59)
at ReadFileContext.callback (/usr/lib/node_modules/androidjs-builder/lib/upd ate_theme.js:36:24)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:237:13)
Desktop (please complete the following information):
androidjs init command fails.
To Reproduce
Type :
androidjs init
Error Log
_ _ _ _ _____
/\ | | (_) | | | |/ ____|
/ \ _ __ __| |_ __ ___ _ __| | | | (___
/ /\ \ | '_ \ / _` | '__/ _ \| |/ _` | _ | |\___ \
/ ____ \| | | | (_| | | | (_) | | (_| | | |__| |____) |
/_/ \_\_| |_|\__,_|_| \___/|_|\__,_| \____/|_____/
? Application name: test
? Application name: test
? Project type: (Use arrow keys)
? Project type: HTML/CSS
Testing 'Theme Update' ...
Creating Native app at C:\Users\bengaid\androidjs
Downloading Sample Project From:
https://raw.githubusercontent.com/android-js/sample-app/master/vue-js-example
invalid github url
Failed to connect to GitHub
Check Your InterNet Connection
(node:9748) UnhandledPromiseRejectionWarning: FetchError: request to https://api.github.com/repos/android-js/sample-app/git/trees/HEAD?recursive=1 failed, reason: connect ETIMEDOUT 140.82.118.5:443
at ClientRequest.<anonymous> (C:\Users\bengaid\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\node-fetch\index.js:133:11)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:66:8)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
(node:9748) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:9748) UnhandledPromiseRejectionWarning: FetchError: request to https://api.github.com/repos/android-js/sample-app/git/trees/HEAD?recursive=1 failed, reason: connect ETIMEDOUT 140.82.118.5:443
at ClientRequest.<anonymous> (C:\Users\bengaid\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\node-fetch\index.js:133:11)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:66:8)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
(node:9748) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Desktop
npm i request
> [email protected] postinstall /home/cool/Documents/Projects/cool Parole/node_modules/nodemon
> node bin/postinstall || exit 0
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
added 314 packages from 190 contributors and audited 2571 packages in 9.334s
found 0 vulnerabilities
cool@zenbook:~/Documents/Projects/cool Parole$ androidjs b
Testing 'Theme Update' ...
webview: cool
building
updating... [object Object]
{
fullScreen: true,
colorAccent: '@color/colorAccent',
colorPrimary: '@color/colorPrimary',
colorPrimaryDark: '@color/colorPrimaryDark'
}
[
{ _: '@color/colorAccent', '$': { name: 'colorAccent' } },
{ _: '@color/colorPrimary', '$': { name: 'colorPrimary' } },
{ _: '@color/colorPrimaryDark', '$': { name: 'colorPrimaryDark' } },
{ _: true, '$': { name: 'android:windowNoTitle' } },
{ _: true, '$': { name: 'android:windowFullscreen' } },
{ _: 'false', '$': { name: 'android:windowActionBar' } }
]
Done!
checking Core
using core /home/cool/.androidjs/androidjs-sdk
removing /home/cool/.androidjs/androidjs-sdk/assets/myapp/*
copying Assets
copying from /home/cool/Documents/Projects/cool Parole
to: /home/cool/.androidjs/androidjs-sdk/assets/myapp
[ '/home/cool/Documents/Projects/cool Parole/dist' ]
(node:24509) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, scandir '/home/cool/Documents/Projects/cool Parole/node_modules/.bin/atob'
at Object.readdirSync (fs.js:865:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:69:18)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
(node:24509) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:24509) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
㋛ using androidjs-sdk {"version":"2.0.0"}
After following all the instructions given successfully, I've created more than one simple UI .apk (size: 85MB), but it gets off or disappeared after sometimes frequently.
Hope you understand what I've asked and solve the issue.
Hi,
I dont know - but i looked and did not see. Is there any possibility to send SMS without user acceptation?
Or if dont - it will be sooo useful, add it please :)
Is your feature request related to a problem? Please describe.
I have tried AndroidJS, it's really very easy to make an Android application.
is it possible for this application to be made into a service? like synchronizing data between Android and the server in the background without the need to open the application at all.
I check main.js is very powerful to handle nodejs logic.
or any other suggestions?
Describe the solution you'd like
Android aplication can run in background for sync data between android and server.
Describe alternatives you've considered
I'm found this tutorial for services but in java
https://www.simplifiedcoding.net/android-service-example/
Additional context
I would like to remove StatusBar, like what we can do with this Theme:
@android:style/Theme.NoTitleBar.Fullscreen
Best Regards
in console window i am getting this error, What more settings is missing to fix this,
Is your feature request related to a problem? Please describe.
Templating systems implemented within the HTML require more code and clutters the file.
Describe the solution you'd like
Adding the possibility to render the HTML on the backend to later push it out to the browser window.
Additional context
I'm someone who likes to use Handlebars when developing with Electron or Express servers.
I also know many people who prefer to use template systems with their websites.
Is it possible to use iframe in html page to load external url.
If i use app.loadURL() in index.html it's not navigating to the url
Is it possible to prevent web-view to refresh when screen rotates?
When it will be available (contacts api)
Hey so.. when i try to build the app with androidjs b or androidjs b -f which is The Story app
it says
copying user app done.
User data copied
skipped to copy core module !
Core Modules Copied !
reading C:\Users\mm\Desktop\eead\dist\app-debug\AndroidManifest.xml
package name com.androidjs.mypkg
{ '$': { 'android:name': 'android.permission.INTERNET' } }
{
'$': { 'android:name': 'android.permission.WRITE_EXTERNAL_STORAGE' }
}
{ '$': { 'android:name': 'android.permission.READ_EXTERNAL_STORAGE' } }
Done!
AndroidManifest updated!
changing app name C:\Users\mm\Desktop\eead\dist\app-debug\res\values\strings.xml
{ _: 'myapp', '$': { name: 'app_name' } }
App Name updated!
Icon updated!
Building...
(node:7584) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [ReadStream]. Use emitter.setMaxListeners() to increase limit
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn java',
path: 'java',
spawnargs: [
'-jar',
'C:\Users\mm\AppData\Roaming\npm\node_modules\androidjs-builder\bin\build_tools\apktool.jar',
'b',
'C:\Users\mm\Desktop\eead\dist\app-debug',
'-o',
'C:\Users\mm\Desktop\eead\dist\app.apk'
]
}
any help will be appreciated
hi,
Could you also elaborate or let users know how this is different from other libraries/framework out there? When should users use this etc. in the readme?
Is your feature request related to a problem? Please describe.
How can i change my app id like com.company.appname
Describe the solution you'd like
Able to change app id from package.json
How can I prevent androidJs to pack .git Folder alongside by other contents in APK file?
Is it possible to use Emulator or connected Android by USB ( ADB ) for debugging with Androidjs?
Sorry, am new to this.
Currently trying to get notification to work following the documentation Notification API but no notification is behind shown
<script>
window.onload = function() {
app.notification.initBig("Update", ["Well well well", "hello there"]);
}
</script>
Please do advise on what I am missing.
Thanks in advance.
A simple function for starting node services that will work even when app is closed would be cool
It could use the syntax of workers
to communicate between the main process and services.
It's really needed, as some apps require notifications which can't be done without a service.
As the title suggests, a feature to reload the web-view(url) & "back-end"(main.js) files during development for debugging purposes
npm i request
> [email protected] postinstall /home/cool/Documents/Projects/cool Parole/node_modules/nodemon
> node bin/postinstall || exit 0
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
added 314 packages from 190 contributors and audited 2571 packages in 9.334s
found 0 vulnerabilities
cool@zenbook:~/Documents/Projects/cool Parole$ androidjs b
Testing 'Theme Update' ...
webview: cool
building
updating... [object Object]
{
fullScreen: true,
colorAccent: '@color/colorAccent',
colorPrimary: '@color/colorPrimary',
colorPrimaryDark: '@color/colorPrimaryDark'
}
[
{ _: '@color/colorAccent', '$': { name: 'colorAccent' } },
{ _: '@color/colorPrimary', '$': { name: 'colorPrimary' } },
{ _: '@color/colorPrimaryDark', '$': { name: 'colorPrimaryDark' } },
{ _: true, '$': { name: 'android:windowNoTitle' } },
{ _: true, '$': { name: 'android:windowFullscreen' } },
{ _: 'false', '$': { name: 'android:windowActionBar' } }
]
Done!
checking Core
using core /home/cool/.androidjs/androidjs-sdk
removing /home/cool/.androidjs/androidjs-sdk/assets/myapp/*
copying Assets
copying from /home/cool/Documents/Projects/cool Parole
to: /home/cool/.androidjs/androidjs-sdk/assets/myapp
[ '/home/cool/Documents/Projects/cool Parole/dist' ]
(node:24509) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, scandir '/home/cool/Documents/Projects/cool Parole/node_modules/.bin/atob'
at Object.readdirSync (fs.js:865:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:69:18)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
at listDirectorySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:70:3)
at copydirSync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:44:7)
at copyFromArraySync (/home/cool/.nvm/versions/node/v12.10.0/lib/node_modules/androidjs-builder/node_modules/copy-dir/libs/copydirSync.js:76:3)
(node:24509) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:24509) [DEP0018] DeprecationWarning:
Could the "request Package" be used by AndroidJS
Hi everyone!
I can't find a solution for this Geolocation error when app is running on the phone (with location activated of course). The app never asks me the geolocation permission.
Here are the permissions I put in package.json:
"permission": [
"android.permission.INTERNET",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.ACCESS_COARSE_LOCATION"
],
And this is the code in index.html for the geolocation (using [email protected]):
L.control.locate({position: 'topright'}).addTo(mymap);
On the laptop in local mode, the html is OK and the geolocation works perfectly after asking me the geolocation permission.
Someone knows how to fix it please? Is androidjs allows the geolocation or it is not possible yet?
Describe the bug
I've a basic app with a front.send and a fron.on on the index.html file, and in the index.js i useses cheerio to take an html page part, and then i push it with back.send into a back.on.
The app not crash, but it not return nothing. THe mothods are correctly and the nodejs method with cheerio works perfectly (i tried with an http server).
Expected behavior
an html page passed via back.send
Hello,
I downloaded the sample apps from https://github.com/android-js/sample-app
When I try to build story-app, I get the following error:
webview: myapp
building
checking Core
https://github.com/android-js/androidjs-sdk/archive/master.zip
/usr/local/lib/node_modules/androidjs-builder/node_modules/progress/lib/node-progress.js:55
if ('number' != typeof options.total) throw new Error('total required');
^
Error: total required
at new ProgressBar (/usr/local/lib/node_modules/androidjs-builder/node_modules/progress/lib/node-progress.js:55:49)
at Request. (/usr/local/lib/node_modules/androidjs-builder/lib/native_app.js:125:27)
at Request.emit (events.js:182:13)
at reportState (/usr/local/lib/node_modules/androidjs-builder/node_modules/request-progress/index.js:83:21)
at call (/usr/local/lib/node_modules/androidjs-builder/node_modules/throttleit/index.js:28:16)
at Object.throttled [as reportState] (/usr/local/lib/node_modules/androidjs-builder/node_modules/throttleit/index.js:20:26)
at onData (/usr/local/lib/node_modules/androidjs-builder/node_modules/request-progress/index.js:44:36)
at IncomingMessage.emit (events.js:187:15)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
Any idea ? Thanks in advance
JFB
As seen here: https://developer.android.com/training/app-links
This would then open a dialog when the user goes to a certain website to ask whether they would like to open it in the app
Describe the bug
A clear and concise description of what the bug is.
androidjs b -f
webview: myapp
building
checking Core
https://github.com/android-js/androidjs-sdk/archive/master.zip
/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/progress/lib/node-progress.js:55
if ('number' != typeof options.total) throw new Error('total required');
^
Error: total required
at new ProgressBar (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/progress/lib/node-progress.js:55:49)
at Request. (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/lib/native_app.js:125:27)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at reportState (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/request-progress/index.js:83:21)
at call (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/throttleit/index.js:28:16)
at Object.throttled [as reportState] (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/throttleit/index.js:20:26)
at onData (/home/spowage/.nvm/versions/node/v8.11.4/lib/node_modules/androidjs-builder/node_modules/request-progress/index.js:44:36)
at emitOne (events.js:121:20)
at IncomingMessage.emit (events.js:211:7)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Androidjs init fails to create a project. It stops to a permission error when renaming vue-js-example, and is unable to handle the error.
Tried this with two different Win10 machines, both administrator and regular CMD, updated node, updated npm, updated all global packages, cleared npm caches, tried to set very permissive folder permissions on windows, disabled windows defender, disabled dropbox, tried this outside dropbox folder, and many other things I can't remember anymore.
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
C:\Users\[redacted]\platform\androidjs>androidjs init
_ _ _ _ _____
/\ | | (_) | | | |/ ____|
/ \ _ __ __| |_ __ ___ _ __| | | | (___
/ /\ \ | '_ \ / _` | '__/ _ \| |/ _` | _ | |\___ \
/ ____ \| | | | (_| | | | (_) | | (_| | | |__| |____) |
/_/ \_\_| |_|\__,_|_| \___/|_|\__,_| \____/|_____/
? Application name: mswing
? Project type: HTML/CSS
Testing 'Theme Update' ...
Creating Native app at C:\Users\[redacted]\platform\androidjs
Downloading Sample Project From:
https://raw.githubusercontent.com/android-js/sample-app/master/vue-js-example
Downloading ... ⠐ [ 'vue-js-example/.gitignore',
'vue-js-example/README.md',
'vue-js-example/assets/androidjs.js',
'vue-js-example/assets/bootstrap.min.css',
'vue-js-example/assets/bootstrap.min.js',
'vue-js-example/assets/icon/courses-icon-10.png',
'vue-js-example/assets/icon/ic_launcher.png',
'vue-js-example/assets/icon/icon.png',
'vue-js-example/assets/jquery-3.3.1.slim.min.js',
'vue-js-example/assets/popper.min.js',
'vue-js-example/assets/script.js',
'vue-js-example/main.js',
'vue-js-example/node_modules/Buffer/README.md',
'vue-js-example/node_modules/Buffer/index.js',
'vue-js-example/node_modules/Buffer/package.json',
'vue-js-example/node_modules/accepts/HISTORY.md',
[removed many lines for brevity]
'vue-js-example/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml',
'vue-js-example/node_modules/blob/.idea/modules.xml',
'vue-js-example/node_modules/blob/.idea/vcs.xml',
'vue-js-example/node_modules/blob/.idea/workspace.xml',
... 303 more items,
truncated: false ]
1/403 ✔ vue-js-example/README.md
2/403 ✔ vue-js-example/.gitignore
3/403 ✔ vue-js-example/node_modules/androidjs/docs/ipc.md
4/403 ✔ vue-js-example/node_modules/androidjs/example/index.html
5/403 ✔ vue-js-example/node_modules/androidjs/docs/packaging_app.md
6/403 ✔ vue-js-example/node_modules/arraybuffer.slice/.npmignore
7/403 ✔ vue-js-example/node_modules/androidjs/lib/back.js
[removed many lines for brevity]
400/403 ✔ vue-js-example/node_modules/socket.io-client/dist/socket.io.slim.dev.js.map
401/403 ✔ vue-js-example/node_modules/socket.io-client/dist/socket.io.dev.js.map
402/403 ✔ vue-js-example/node_modules/socket.io-client/dist/socket.io.slim.js.map
403/403 ✔ vue-js-example/node_modules/socket.io-client/dist/socket.io.js.map
example downloaded
fs.js:115
throw err;
^
Error: EPERM: operation not permitted, rename 'C:\Users\[redacted]\platform\androidjs\vue-js-example' -> 'C:\Users\[redacted]\platform\androidjs\mswing'
at Object.renameSync (fs.js:594:3)
at copy.fromGithub.to (C:\Users\[redacted]\AppData\Roaming\npm\node_modules\androidjs-builder\lib\native_app.js:45:20)
at Request.request [as _callback] (C:\Users\[redacted]\AppData\Roaming\npm\node_modules\androidjs-builder\lib\copy.js:115:44)
at Request.self.callback (C:\Users\[redacted]\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\request\request.js:185:22)
at Request.emit (events.js:189:13)
at Request.<anonymous> (C:\Users\[redacted]\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\request\request.js:1161:10)
at Request.emit (events.js:194:15)
at IncomingMessage.<anonymous> (C:\Users\[redacted]\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
So is this possible to add Admob sdk to this great framework ? Sorry if I choose wrong rep for issue.
/usr/local/lib/node_modules/androidjs-builder/node_modules/jsonfile/index.js:70
throw err
after this command:
androidjs init
According to the api document, there seems to be no function to obtain an external storage path like Environment.getExternalStorageDirectory().
I want to support external storage in my app.
Is there any api or other way I didn't find?
<input type="file">
does not work - nothing happens by click on 'Choose File'
I enabled the READ_EXTERNAL_STORAGE
permission
or is there a native file select api?
ERROR in ./node_modules/engine.io/lib/server.js
Module not found: Error: Can't resolve 'uws' in './node_modules/engine.io/lib'
@ ./node_modules/engine.io/lib/server.js 105:17-31
@ ./node_modules/engine.io/lib/engine.io.js
@ ./node_modules/socket.io/lib/index.js
@ ./node_modules/androidjs/lib/back.js
@ ./node_modules/androidjs/index.js
Seems engine.io
is missing the uws
dependency - ./node_modules/uws
does not exists
if I include uws
as a dependency self, I get the same error, ./node_modules/uws
exists, but it has only a package.json
and README.md
, but no js code
Look at https://www.npmjs.com/package/uws, the dependency is depcreated
I want to run a code (included in main.js (back) ) in order to write on a file which is located inside the "assets" Folder by using:
fs.writeFileSync ( filePath , newData , 'utf8' );
but I can not do that ( either the path is not correct or I am dealing with a permission issue ).
How can I do that? what would be the filePath ?
(in PC it works Fine, but in Android that code makes crash)
I tried androidjs b -f
, but I got this error...
stderr: provided apk path or file '...path-to-project\dist\app.apk' does not exist
Can't find in the documentation about hiding the top bar when the app has launched. I'm talking about the bar where you can see your app in.
I just followed the instructions on the website (install, then run 'androidjs init')
I tried many times in a vps and Termux, and the same error occurs for both. Check a screenshot of the complete error:
Is your feature request related to a problem? Please describe.
I need to start a worker file but WebView blocks it from Same-Origin policy but you can unlock it using a setting.
Describe the solution you'd like
A section in package.json like :
"webview-settings": {"sample-setting": true}
Describe alternatives you've considered
None
Additional context
https://stackoverflow.com/questions/32020039/using-a-web-worker-in-a-local-file-webview
does this framework support Single Page Application such as React or Vue?
I am building a project from Attendance Tracking. To track the attendance, we use NFC Card. Can you add NFC API Support?
we need access to give them data sensor from phone
I noticed that even a very basic App will lead to an at-least 52MB APK file.
Is it really necessary that, the built apk file so much huge be?
Is it possible to diminish the SIZE?
Describe the bug
i just unistalled the old version and installed the latest one. when i tried to generate the project with the command androidjs g, it does nothing and outputs g in console.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should generate a sample project
Desktop (please complete the following information):
when the app tries to connect the socket to main.back the error net:ERR_CONNECTION_REFUSED.
because of this it;s not able to access the node functions.
How to fix this issue.
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.