Wed, 09 Dec 2020 08:33:37 GMT
Join the conversation at slack.cordova.io
Tue, 08 Dec 2020 10:57:54 GMT
@slackbot says
This message was deleted.
Tue, 08 Dec 2020 12:29:42 GMT
@blleaman says
I need help getting started. Is there a dedicated channel I should be using for assistance? I‘m a lifelong developer, but have never ventured into mobile app development before. I thought cordova would be the simplest way to dip my toes in, but I’m having trouble right out of the gate. I‘ve installed cordova, but trying to create a project I’m getting a javascript syntax error: cordova create myProject /.nvm/versions/node/v9.8.0/lib/node_modules/cordova/node_modules/fs-extra/lib/mkdirs/make-dir.js:85 } catch { ^
SyntaxError: Unexpected token { at new Script (vm.js:51:7) at createScript (vm.js:136:10) at Object.runInThisContext (vm.js:197:10) at Module._compile (module.js:613:28) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) at Function.Module._load (module.js:493:3) at Module.require (module.js:593:17) at require (internal/module.js:11:18)
Tue, 08 Dec 2020 12:31:15 GMT
@norman137 says
node 9 is not supported
Tue, 08 Dec 2020 12:31:45 GMT
@norman137 says
You need node v10.10 at minimum, but I'd recommended Node 12. Always use the latest patch available of a given major version.
Tue, 08 Dec 2020 12:33:43 GMT
@norman137 says
In general I always recommend using an even version of Node as those are their LTS releases.
Tue, 08 Dec 2020 12:34:01 GMT
@norman137 says
Ie: 10, 12, 14, etc
Tue, 08 Dec 2020 12:34:23 GMT
@blleaman says
Thanks!
Tue, 08 Dec 2020 17:52:52 GMT
@jrondon says
Help! Source path does not exist: res/icon/ios/icon.png
Tue, 08 Dec 2020 17:53:30 GMT
@jrondon says
Help!
instalar ionic???? force```
Tue, 08 Dec 2020 19:21:45 GMT
@info460 says
Hi, is there any Cordova Discord? I am beginner and looking for more resources on Cordova development. Thanks
Tue, 08 Dec 2020 19:36:28 GMT
@abul.asar22 says
Hello everyone I cannot open my android app on chrome browser. I can see following warning
โ Remote browser is newer than client browser. Try `inspect fallback` if inspection fails.
I can seeinspect fallback
and on even trying that i cant open the app. Has anyone see this thing before . How this can be fixed ?
Tue, 08 Dec 2020 21:35:19 GMT
@norman137 says
Does anybody know how long npm will lock you out after too many incorrect pw/otp attempts?
Tue, 08 Dec 2020 22:39:25 GMT
@info460 says
Hi everyone, sorry for greenhorn question. I am playing with cordova-plugin-geolocation which is already imported into project called Test I am supposed to enter
[geolocationError], [geolocationOptions]);``` G map script ```<script src="<https://maps.googleapis.com/maps/api/js?key=Your_API_Key>"></script>``` and actual code ```var Latitude = undefined; var Longitude = undefined; // Get geo coordinates function getMapLocation() { ...``` Can somebody tell me where I should include this codes as I am super confused because the plugin created another www folder in location Test\plugins\cordova-plugin-geolocation\www\ and there are multiple geolocation.js files in plugin folder or any resource where I can read more about how to work with plugins in general? thank you very much
Tue, 08 Dec 2020 22:47:10 GMT
@norman137 says
Each plugin has their own
www
folder, they contain the javascript side to use the plugins. This is something you shouldn't be modifying.Inside your own
www
folder (located at<project-root>/www/
you can use the plugin APIs after thedeviceready
event is fired.// Plugins are ready to be used now navigator.geolocation.getCurrentPosition( function onSuccess(position) { // Do something with position console.log('Position received', position); }, function onError(error) { console.error('Position Error :(', error); }, { enableHighAccuracy: true //You also probably want this to be enabled } ); });```
Tue, 08 Dec 2020 23:16:29 GMT
@info460 says
Thank you Norman for clarification on plugin www folder, the hierarchy looks more clear now.
Wed, 09 Dec 2020 01:44:16 GMT
@info460 says
your code is working, its receiving coordinates but cant find out how to make it working it original cordova code to show coordinates on the map https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/index.html#see-where-you-are-on-a-map <script src="https://maps.googleapis.com/maps/api/js?key=AIza ... > I included in index.html I tryied so many combinations byt the map is not appearing. Did I miss something obvious? thank you
Wed, 09 Dec 2020 01:48:11 GMT
@norman137 says
The js version of google maps is intended to be ran from a website (hosted by a server with a domain) which doesn‘t fit what cordova is (since the “webapp” on cordova is domain-less). If you want to display google maps, you’re better off using a plugin that provides you an interface to the native mobile sdk for google maps.
Wed, 09 Dec 2020 01:49:33 GMT
@norman137 says
https://github.com/mapsplugin/cordova-plugin-googlemaps is what I use in my apps -- in the google console, you will need to supply the app ids as well as your keystore signatures.
Wed, 09 Dec 2020 02:09:13 GMT
@info460 says
its somehow megabroken now I imported the plugin, add API key and run
Wed, 09 Dec 2020 02:25:30 GMT
@norman137 says
hmm
Wed, 09 Dec 2020 02:25:39 GMT
@norman137 says
Well it seems like it's complaining about a duplicated something
Wed, 09 Dec 2020 02:26:07 GMT
@info460 says
trying building new project to test if it helps
Wed, 09 Dec 2020 02:26:16 GMT
@norman137 says
You can have a look inside
<cordova-project>/platforms/android/app/src/main/AndroidManifest.xml
(I think I have the path correct...) to see if there are any duplicated tags
Wed, 09 Dec 2020 02:26:18 GMT
@info460 says
same error
Wed, 09 Dec 2020 02:26:56 GMT
@norman137 says
It looks like it has 2
<uses-feature>
tags that probably has the same attributes.
Wed, 09 Dec 2020 02:27:20 GMT
@info460 says
Wed, 09 Dec 2020 02:28:01 GMT
@norman137 says
well, I don‘t see any duplicates to me, so that’s extra weird.
Wed, 09 Dec 2020 02:29:43 GMT
@norman137 says
ok so
Wed, 09 Dec 2020 02:30:22 GMT
@norman137 says
I think it's complaining that
android.hardware.location
&android.hardware.location.gps
becauseandroid.hardware.location
includesandroid.hardware.location.gps
Wed, 09 Dec 2020 02:31:04 GMT
@info460 says
maybe this
Wed, 09 Dec 2020 02:31:54 GMT
@norman137 says
I think the latest release of the geolocation plugin made it incompatible with another plugin, since we actually recently added a variable to mark GPS is required / not required
Wed, 09 Dec 2020 02:32:28 GMT
@norman137 says
Try... uninstalling the cordova-plugin-geolocation and installing an older version by doing...
cordova plugin add cordova-plugin-geolocation@4.0.2```
Wed, 09 Dec 2020 02:33:17 GMT
@norman137 says
you may also need to recreate the android platform as well...
cordova platform add android```
Wed, 09 Dec 2020 02:36:43 GMT
@info460 says
did all that but still some wrong versions error (its different error than at beginning so at least some progress)
Wed, 09 Dec 2020 02:38:05 GMT
@info460 says
this is really complicated and complex stuff this android development, never imagined this
Wed, 09 Dec 2020 02:43:30 GMT
@info460 says
so looks like this plugin is compatible only with Android 5.1+ so opened Android Studio unmarkd Android 4.4 and instaling 5.1
Wed, 09 Dec 2020 02:45:29 GMT
@norman137 says
yah, the latest version of
cordova-android
only supports 5.1+
Wed, 09 Dec 2020 02:46:21 GMT
@info460 says
I am sorry, I didnt know that
Wed, 09 Dec 2020 02:49:29 GMT
@norman137 says
No worries
Wed, 09 Dec 2020 02:49:29 GMT
@erisu says
The google map plugin wonโt work with the latest Cordova-Android as it sets the min Sdk to 19 while the platform lib is still set to 22.
Wed, 09 Dec 2020 02:50:18 GMT
@norman137 says
well that's annoying
Wed, 09 Dec 2020 02:50:36 GMT
@erisu says
I think there was a commit merged into master that allows the flag to also change Cordova android lib version
Wed, 09 Dec 2020 02:50:48 GMT
@erisu says
So a later release might fix it
Wed, 09 Dec 2020 02:50:58 GMT
@norman137 says
I may need that commit before I update my app then ๐
Wed, 09 Dec 2020 02:51:16 GMT
@norman137 says
Think my app that uses gmaps is still on cordova-android@8
Wed, 09 Dec 2020 02:51:26 GMT
@norman137 says
So I wouldn't have hit that problem
Wed, 09 Dec 2020 02:51:54 GMT
@erisu says
Problem though is that It seems plugins will be able to control your min sdk now :)
Wed, 09 Dec 2020 02:52:36 GMT
@norman137 says
Yah, plugins shouldn't be able to control your min sdk ๐
Wed, 09 Dec 2020 02:53:28 GMT
@norman137 says
they also set
compileSdkVersion 26
Wed, 09 Dec 2020 02:53:56 GMT
@info460 says
I start to understand why averyone with older android device cand download stuff on them from Play (before I was thinking that its the issue only of Apple people)
Wed, 09 Dec 2020 02:54:32 GMT
@norman137 says
I don't see where they set a min sdk tho
Wed, 09 Dec 2020 02:55:53 GMT
@erisu says
https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/plugin.xml#L149
Wed, 09 Dec 2020 02:56:11 GMT
@norman137 says
ohhh I was looking in the gradle files..
Wed, 09 Dec 2020 02:56:48 GMT
@norman137 says
Yah that‘s stupid -- I use that plugin because it’s really the only option available... that is for both ios and android anyway
Wed, 09 Dec 2020 02:56:58 GMT
@norman137 says
But that plugin makes me wanna build my own gmaps plugin lol
Wed, 09 Dec 2020 02:57:10 GMT
@norman137 says
I just don't have a mac to test ios.
Wed, 09 Dec 2020 02:57:18 GMT
@norman137 says
Pretty much the only thing holding me back
Wed, 09 Dec 2020 02:59:40 GMT
@erisu says
Maybe it is OK if plugins can set the min, but the PR that allowed this flag to also modify the lib version will be needed. I wonder though what happens if plugins picked something really low like 12 ๐ and then compiles is like 30โฆ Especially for the future release of the platform which will become AndroidX I thinkโฆ
Wed, 09 Dec 2020 03:00:52 GMT
@norman137 says
I assume they did this to assuming this will set the min sdk for the plugin or something
Wed, 09 Dec 2020 03:02:09 GMT
@norman137 says
So the question is
Wed, 09 Dec 2020 03:02:21 GMT
@norman137 says
if I also have
<android-minSdkVersion
defined in myconfig.xml
Wed, 09 Dec 2020 03:02:28 GMT
@norman137 says
Does it use mine or does it use the plugin?
Wed, 09 Dec 2020 03:03:18 GMT
@norman137 says
If it honours my
config.xml
over the plugin then one workaround I guess is just to have<preference name="android-minSdkVersion" value="21" />
in yourconfig.xml
Wed, 09 Dec 2020 03:05:10 GMT
@norman137 says
I think it does work like that because I think I have my min sdk set to
16
... even though it's not officially supported by cordova.
Wed, 09 Dec 2020 03:11:43 GMT
@info460 says
so at the end it build without error but the plugin does nothing ))))
Wed, 09 Dec 2020 03:13:33 GMT
@info460 says
Wed, 09 Dec 2020 03:14:12 GMT
@norman137 says
At least there's progress
Wed, 09 Dec 2020 03:15:09 GMT
@norman137 says
Next task: Learn how to use the remote debugger ๐
If you open up Chrome on your desktop, it should detect your emulator device and the fact it's running an app with an webview and you should be able to remove debug your app via the chrome web inspector.
Wed, 09 Dec 2020 03:15:13 GMT
@info460 says
)))
Wed, 09 Dec 2020 03:15:28 GMT
@norman137 says
You may get more insight on what's happening from there
Wed, 09 Dec 2020 03:16:06 GMT
@info460 says
I will be 92 before I will make this working (and you are helping me )
Wed, 09 Dec 2020 03:17:23 GMT
@norman137 says
I have white hairs and I'm not even 30 yet, can you guess why?
Wed, 09 Dec 2020 03:19:10 GMT
@info460 says
they told me that computers will help me to achieve things faster
Wed, 09 Dec 2020 03:26:44 GMT
@info460 says
I suppose this is where I will be looking now for some entertainment
Wed, 09 Dec 2020 03:27:34 GMT
@norman137 says
Yah so my guess is you're not waiting for the
deviceready
event
Wed, 09 Dec 2020 03:27:46 GMT
@norman137 says
My support is about to end, computer shutting down for the night -- good night
Wed, 09 Dec 2020 03:28:54 GMT
@info460 says
thank you againg Norman, it was great fun (and in few hours in work even more) take care
Tue, 08 Dec 2020 10:19:49 GMT
@lkvh says
What is the point of cordova-plugin-camera DestinationType.DATA_URL if it does not return the filename or extension