Apache Cordova Tutorial Convert Web App to Mobile App

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Learn to use Apache Cordova to convert web applications to mobile apps.

Комментарии • 85

  • @AdamKhoury
    @AdamKhoury  Год назад +10

    Boy oh boy... some of the comments... let me help some of you understand a few things:
    1. Cordova's blog shows they are still adding things to it and deprecating old things that should fall away from it. Last update Nov. 2022.
    2. Adobe, Google, IBM, Intel, Microsoft, Mozilla, BlackBerry, Etc, Etc, Etc... contribute to Apache Cordova.
    3. I produced a Java/Eclipse Android developer series of videos 11 years ago(Android Native Language).
    4. I mentioned in the video that this topic is finished, so chill out and let people experiment who choose to.
    5. Just because you chose another tool(abstraction) previously and love it, so what, go make videos about those tools.
    6. If you don't want to use it, that's fine, nobody wants you to.
    7. Put all of the IDEs and SDKs down, try to get your winky wet more.

  • @cirusMEDIA
    @cirusMEDIA Год назад +10

    Dear Adam, as one of your core viewers (who prefers to learn the core language over random short lived frameworks) I fully understand your frustration with these comments. These days, everyone is calling themselves a developer... but the truth is, they can hardly code. CORDOVA is still alive and well! In my experience, 99% of the people advocating for fancy frameworks never learnt the base language that these frameworks are built on top of thus, those people become totally useless when a new required feature/workflow is not covered by the framework.

    • @AdamKhoury
      @AdamKhoury  Год назад +6

      I agree. Let me add that the only reason the thousands of Frameworks get so popular and required for team projects is that newcomer business/software starters loosely begin their projects on the back of one(or 7) of the frameworks because they have no time to learn stuff in depth, so when they hire assistance they say... "This position we are hiring for requires CakePHP and jQuery knowledge". They are so ignorant they don't even know to ask for a PHP or JavaScript fluent developer. That's is how all 4,000,000 frameworks got popular, through fast paced ignorance. People who know nothing start with them, then rarely grow in knowledge, slave to the features of the next Jenga block they stack on their bloated, wobbly, rickety tower of a project. There is one framework that I will promote, but it's none of the frameworks that are general-use that everyone uses, it performs a specific singular type of work... three.js. The thousands of frameworks that are general-use abstraction layers... are useless garbage that will be obsolete in 3 - 5 years.

    • @TechKerala
      @TechKerala Год назад

      I wouldn't say I like jQuery, and I removed it from my projects 10 Years ago. The motivation behind that was one of Adam's videos.
      - If you want to build a large application, you must have 100+ developers working for you.
      - You must need a standard way of handling data, events, state etc.
      - You can like or dislike frameworks, but they solve a problem.
      - Maybe we don't encounter those problems in our projects.
      - Or we don't like the way it works.
      - Still, the last thing you need to do is build Another JavaScript framework!
      In the CORDOVA case, they lost focus or were slow at some point.
      Other projects like iONIC use CORDOVA for most of the stuff & staying in business. Why? Because I think they support CORDOVA issues that are never resolved by CORDOVA or supported features that will never fit with the CORDOVA roadmap.

    • @AdamKhoury
      @AdamKhoury  Год назад +5

      @@TechKerala Let me address these 1 by 1...
      - If you want to build a large application, you must have 100+ developers working for you.
      ( FALSE, I develop very large projects 100% alone for clients... design and programming complete. Also I know 2 and 3 man teams doing massively scaled projects that get high volume traffic. The reason a large company may require 100+ developers is if they all equally are untalented and un-innovative. )
      - You must need a standard way of handling data, events, state etc.
      (The core language already does that in the most standard way, thousands of frameworks confuses that and muddies waters).
      - You can like or dislike frameworks, but they solve a problem.
      (Problem is solved by writing the core language and not going outside it. The solution you speak of is the framework author knowing the core language better than the end-user devs. )
      - Maybe we don't encounter those problems in our projects.
      ( Okay )
      - Or we don't like the way it works.
      ( the fix or new change is also the core language, developed by someone smarter than the grabber )
      - Still, the last thing you need to do is build Another JavaScript framework!
      ( I promise I won't, and I have more skill than most to build and market one online )
      In the CORDOVA case, they lost focus or were slow at some point.
      ( That is your opinion, show evidence )
      Other projects like iONIC use CORDOVA for most of the stuff & staying in business. Why? Because I think they support CORDOVA issues that are never resolved by CORDOVA or supported features that will never fit with the CORDOVA roadmap.
      ( Adobe, BlackBerry, Google, IBM, Intel, Microsoft, Mozilla, Etc.., Etc... contribute to Apache Cordova. Ionic is simply the jQuery of Cordova... built upon it's back and the authors are not even clever enough to avoid a JS framework to do it, they use Angular. Not even motivated enough to write their own JavaScript. Grabbers. )
      ( Frameworks are grabbed where the developer skill ends. I recommend only one Framework... three.js... because it actually does things that are highly complex. If we look at the most popular 100 frameworks, I still can't find things they offer, that I can't already do. That means the Frameworks are obsolete when the dev has knowledge higher than his peers. Meaning others need to hit the books and learn better to avoid redundant general-use bloated garbage. )

    • @JediWebSurf
      @JediWebSurf Год назад +1

      @@AdamKhoury blackberry is still alive! Wtf.

    • @KennTollens
      @KennTollens 5 месяцев назад

      @@AdamKhoury I like your thinking. Build it with the core language. It was so frustrating having to learn the latest and greatest way to do the same thing, but in a totally complicated, easiest ever they think framework.

  • @ranjanadissanayaka5390
    @ranjanadissanayaka5390 4 дня назад +1

    wow..thanks so much Sir. You have opened an entire new domain for me learn. 😀

  • @NoahNobody
    @NoahNobody Год назад +5

    I remember making a cordova app many years ago. Good to see it is still alive and kicking.

    • @AdamKhoury
      @AdamKhoury  Год назад

      Yeah buddy... last update was 15 Nov 2022 according to their blog. 2022 they added all kinds of stuff.

  • @CodeFrog
    @CodeFrog Год назад +4

    Yes, this is what i want... Now days developer underestimate the power of Cordova..
    I am using cordova since many years now.. and it can do what other fancy development platforms can do like React, flutter etc..
    I am also planning to make some advance real world app with cordova using native features like camera, location etc. access with advance UI designs ...
    Thanks for inspiring me :)

  • @Ghost-bi7jf
    @Ghost-bi7jf Год назад +10

    This is awesome! I really wish you could do a series of video like designing an app using cordova, I'm trying to design an app using HTML/CSS/Java script but I'm having a hard time to setup the platform since there's only few tutorial about the cordova.
    Thank so much Adam!

    • @naninunna8082
      @naninunna8082 14 дней назад

      hi there, what happened , you made app?

  • @piotrj3093
    @piotrj3093 8 месяцев назад +1

    the best Cordova tutorial, definitly

  • @justy9810
    @justy9810 Год назад +1

    thanks man you saved my life. i couldn't create the apk correctly!!!!

  • @blipintime1543
    @blipintime1543 Год назад +2

    Simple video that zip my time to quick start on Cordova. Coming from React JS project porting for mobile. Thanks a ton.

  • @shareefalshareef7149
    @shareefalshareef7149 4 месяца назад

    thanks a lot ,, I have searched about this subject one month and finallly found the answer here
    thank youuuuuuu

  • @SunilKumar-jz9jr
    @SunilKumar-jz9jr Год назад +1

    you are my guru. I have learned coding only because of you.....

  • @dojentertainmenteducation5897
    @dojentertainmenteducation5897 Год назад +2

    Thanks. This was really helpful.

  • @The_Nameless_Traveler
    @The_Nameless_Traveler Месяц назад

    Thank you for the video! This has me excited to try making my own apps! :)

  • @nmarks
    @nmarks Год назад +2

    Thank you very much for this 👍

  • @loremibsom
    @loremibsom Год назад

    Good to see you again Adam !

  • @NoahNobody
    @NoahNobody Год назад +2

    It would be cool to know how to use the various mobile API calls like push notifications, and stay alive (run as a background process).

  • @benstuijts5620
    @benstuijts5620 Год назад +2

    How is the support / performance for the canvas element? Which platform (cordova, flutter or react Native) is the best to use?

    • @AdamKhoury
      @AdamKhoury  Год назад

      Personally I don't know. I've never used any of them... Cordova I just played with for a few days so far. Hopefully another viewer or reader can answer... one sec... let me ask Google... seems like Cordova has canvas support, how well I have no idea. But people are talking about using Canvas in Cordova products and individual issues they are facing.

    • @AdamKhoury
      @AdamKhoury  Год назад +2

      My advice is to not rely on the answers of others to choose which tools to use. Everyone is married to something, and most times people will suggest that you marry what they married. My advice, play with all 3 and never get married.

  • @moayadmyro2091
    @moayadmyro2091 6 месяцев назад +1

    But it’s no longer supported both from Adobe and Microsoft?

  • @KennTollens
    @KennTollens 5 месяцев назад

    This is perfect thank you.

  • @wilawara
    @wilawara 11 месяцев назад

    Nice explanation thanks, it would be great to have a new tutorial about running it in avd emulator or plugged in device because since I updated from an old version of Cordova, JDK Android platform and Gradle I could not make the emulation run 😅

  • @serhiyi7526
    @serhiyi7526 Год назад +2

    I don't want to be rude, but studying Cordova in 2023 is not one of the best decisions. The demand for developers who own this technology is very low (or close to zero).
    The criteria for choosing Cordova are also not clear: Top3 (although I have not heard of Cordova compared to other mobile frameworks since 2017-2018), layers (although Cordova itself uses webview, which is slow for large apps), language (it is not a problem for a developer to always learn something new. Although neither react or flutter isn`t new). This is a personal opinion and I will be glad to whom it helps.
    PS: For native js mobile framework is NativeScript.

    • @AdamKhoury
      @AdamKhoury  Год назад +3

      Not rude to say. I say learn Java and C to go directly at these environments. 11 years ago I did a Java and Eclipse IDE android dev series. If no time for that people can pick one of the alternative abstractions. My audience is mostly web developers already familiar with JS, HTML, CSS, Etc... so I thought this would excite them. I am not taking this topic very far. Good input thanks for interacting. We can see by the comments, everyone has differing opinions and I am being asked why not use all kinds of other things. I honestly don't care what folks use, whatever makes them happy. I have no attachment to this tool, I just started playing with it. Want NativeScript tutorials from this channel?

    • @serhiyi7526
      @serhiyi7526 Год назад

      @@AdamKhoury I cited NativeScirpt as an example of one of the frameworks. In general, I have enough capabilities of flutter and reactnative (react). Here it depends on your preferences. If such lessons come out, I will gladly watch them

    • @AdamKhoury
      @AdamKhoury  Год назад +2

      @@serhiyi7526 Right on... I think this topic will see many a differing opinions and tool recommendations by my audience. I think it may be best for me to not read and reply to the comments under this video. I'll let you guys battle it out for tool supremacy. I think people already chose tools before seeing this and they won't be swayed. Ionic, even though built using Cordova as its core and Angular as its abstraction layer, is massively popular. Back in the day I used to get scolded on the comments for using JavaScript or PHP in their raw form without abstraction frameworks. If I used something else, people would say not to use that also.

    • @JediWebSurf
      @JediWebSurf Год назад +2

      @@AdamKhoury I actually need this tool NOW to make my app asap. Because I need to push an app out now for my purposes. I don't have time to learn java. so thanks for the video.

    • @AdamKhoury
      @AdamKhoury  Год назад +3

      ​@@JediWebSurf No problem sir. Don't marry it, but you can fool around with it ;). No harm in experimenting to see the results. I am confident that it will be useful to me, as long as I don't expect exact equality with native Java/Android Studio.

  • @Ghost-bi7jf
    @Ghost-bi7jf Год назад +1

    Hi Adam can you help me out, I'm kind of new to cordova, I'm trying to play a video using the html5 video tag with a video stored on my project local assets, i tried to run it on android emulator and my own android phone, but it seems the seek bar doesn't work on cordova. I've been searching for a solution on while now, but i cant find any..
    Thank you in advanced.

  • @TechKerala
    @TechKerala Год назад +1

    Is Cordova dead? This is what I thought in early 2020. Then I used iOnic to deploy my app. They mostly use Apache Cordova. iONIC brings some improvements on top of Apache Cordova.
    Is Apache Cordova in active development? I don't know the difference between iONIC and Apache Cordova.

    • @AdamKhoury
      @AdamKhoury  Год назад +2

      Look at their blog on their site, looks alive to me. People talk a lot of junk online.
      cordova.apache.org/blog/
      2020 bye-bye to phonegap...
      cordova.apache.org/announcements/2020/08/14/goodbye-phonegap.html
      2020 they said goodbye to phonegap. If Cordova were dead, how did you just watch me do what I did?
      Ionic is a framework that I would not recommend unless you don't have skill to make simple things happen without it. Use it or don't, that's up to you. Upon looking at it and what it offers, I don't require it.

    • @TechKerala
      @TechKerala Год назад +2

      @@AdamKhoury Honestly, I thought Cordova is left in the dust when Adobe dropped phonegap.
      And iOnic and capacitorjs taking the leftover, updating & supporting the Cordova ecosystem moving forward.
      10 Years ago, one of your videos (PHP FileUpload with XMLHttpRequest?) give me enough courage to remove jquery, chart js etc from my project. and it reduced my js bundle size from several MB to just 7kb Gzip.
      Great motivation for me to go vanilla js.

    • @AdamKhoury
      @AdamKhoury  Год назад +1

      @@TechKerala Awesome! Nice bloat cutdown on your JS. What I think happened is that Microsoft discontinued Cordova in the App Center. So if one types into Google search "is apache cordova dead"... one will see many articles from many sites saying such. I also see in the results people who are promoting or working for certain frameworks, saying that it's not any good and dead. They claim it's dead, then directly after promote a framework that uses it at the core.

    • @AdamKhoury
      @AdamKhoury  Год назад +1

      You said "I don't know the difference between iONIC and Apache Cordova." You know how jQuery, React or Angular are abstraction layers above the already easy beautiful JavaScript? Ionic is an abstraction layer above Cordova using Angular and Cordova. It is basically equivalent to using jQuery to program the already easy JavaScript language.

  • @DiyintheGhetto
    @DiyintheGhetto Год назад +1

    Hello, If I wanted to have one of my mobile friendly websites to be viewed in a cordova app. Can I do that?

    • @AdamKhoury
      @AdamKhoury  Год назад +1

      Hi there. I think you would have to create a SPA(single page app) type of website and set it up in the "www" folder index(.html/.js/.css). I don't think the structure of any existing websites would be suitable for Cordova build process. Look into PWA(progressive web app) which is one step closer to what you want, but not a native app.

    • @DiyintheGhetto
      @DiyintheGhetto Год назад +1

      @@AdamKhoury thank you. I will give it a try as soon as I can.

  • @oneness2728
    @oneness2728 11 месяцев назад

    i have a question, should i download android studio app or command-line tool? If command-line tool, how can i set it up please?

  • @obolaji
    @obolaji 2 месяца назад

    I'm trying to use Cordova in termux but I'm stuck at where to add platforms, however it failed to add platforms. Please can you provide us with the essential Files in the platform and other folder as a zip folder... Like each folder each zip... Thanks 🙏🏾

  • @pablodavila4157
    @pablodavila4157 4 месяца назад

    can you make a video with the installation and configuration?

  • @ShafiMahammad_123
    @ShafiMahammad_123 4 месяца назад

    Hi
    I have installed Xcode 15.1 and cordova-ios 7.1.0 and after adding the cordova stripe plugin getting the following error.
    Tried uninstalling pods and installed firebase still not working. Please help me here.
    Showing Recent Issues
    Assertion failed: (aliasSectionNum == sectionNum && "alias and its target must be located in the same section"), function assignAliasAtomOffsetInSection, file Layout.cpp, line 3324.
    Linker command failed with exit code 1 (use -v to see invocation)

  • @kapp2026
    @kapp2026 6 месяцев назад

    Thanks i whach this in 2024

  • @bestcodetz5726
    @bestcodetz5726 Год назад

    adam please help on configuration a have strugled about 3 weeks to configure my environment to start building apps using apache cordova

  • @mustaphadogara-mw8rq
    @mustaphadogara-mw8rq Год назад

    But why is play store not collecting android11 app and Cordova is not beyond that, play store required android 13

  • @PanosAnas7
    @PanosAnas7 11 месяцев назад

    Hi Adam, very nice video. Is it doable to convert a php App to mobile App, where somehow a DB connection is required? OK, i understand i could do that with a fetch and an api/server call (when the mobile is online) but could, this "approach" with api call, be converted ? Thank you

  • @sentient1705
    @sentient1705 Год назад +1

    He's using a laptop to make this video with.

  • @opeyemiwasiu7366
    @opeyemiwasiu7366 4 месяца назад

    Cordova couldn't support API 33, I got stuck when submitting the app

  • @QioAsi
    @QioAsi 2 месяца назад

    Unfortunately this tutorial is outdated because they changed the whole installation instructions in the prerequisites are required to makes it a lot more complicated. Please play trial and error trying to patch together and all those from various obsoletes tutorials. In Ubuntu and Windows 11. The irony is that this is supposed to be easy but so far the installation process is so complicated and lengthy it may just be easier to install Android studio and start brushing up on Java. I appreciate your hard work but in order for it to be useful to a lot of people who have never developed things or have like a fresh computer without any specific development tools like compilers the tutorials simply does not cover all the things in addition they updated the insulation instructions gradle by itself is headache to install. The main issue is that their prerequisites have prerequisites installing the correct was for the prerequisites it's not so simple. Also they don't really tell you which version of the Android emulator you should download on the newest version I think it's version 11 only because I tried version 14 which was automatically selected and that did not work.

  • @RamonChiNangWong078
    @RamonChiNangWong078 Год назад

    Ok, I'm not blaming you, but maybe to the devs of Cordova, like a Futurama characters
    I'm working on a week on it now and I still can't get it working.
    My issues.
    1. it was the Android Command line SDK not working, according to Stackoverflow, it's path related changes done by Google.
    2. Cordova doesn't read that "specific" directory set by the Android devs, I fixed that by creating a symbolic link to it
    And by now, according to Cordova, the requirements for Android is all set and ready to build.
    3. Cordova doesn't recognize android target 30, it needs 30.0.3, downgrading it to 30.0.0? requires me to fix my JAVA_HOME?
    4. Cordova doesn't support Gradle 8.0 it needs Gradle 8.0.1, OK
    and all of this doesn't build.

    • @AdamKhoury
      @AdamKhoury  Год назад +2

      I understand, it took me a couple of days to get it all set up right and work out the kinks. It's not very user-friendly. Don't feel bad, you are not alone in that struggle. Luckily there are some alternatives that may make life easier for devs that have trouble with Cordova in its unabstracted form. Cordova shows some third party frameworks in their dev guide, that are built on top of it. If all else fails, give one of those a try. There are also other tools that are probably much easier out of the box. One would think they would make it easier to use, but maybe that is not their goal. It's funny how difficult it is to set up.

    • @RamonChiNangWong078
      @RamonChiNangWong078 Год назад +1

      @@AdamKhoury Ah finally got it compiled.
      Seems like Cordova looks at another /usr/lib/ instead at ANDROID_SDK_ROOT
      also an know issues with buildtools version since it needs "30.0.3" not less and not higher.
      But thanks for your effort!

  • @96Slyde
    @96Slyde Год назад

    Hi Adam, thanks for the amazing tutorial!
    I'm having a problem, i followed all the steps and configured all the environment variables, but when i run the command "cordova build android" i get the following error messages "BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_ ' Unsupported class file major version 64" and "Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.".
    Could you please help me with this? Thank you!!!

    • @AdamKhoury
      @AdamKhoury  Год назад

      Hello, I took your text in quotes and put it into search engine and saw others have had that issue and them discussing it on forums and such. The best I can do is advise you do that also so you can see what caused it and if there are any solutions found in the forum threads. There are probably hundreds of different issues that could arise. Issues I had were different and I had to go on Google search to play detective to sort them. Hope you can fix it, I have no idea off the top of my head what that BUG exception means. It took me hours to get Cordova working... it's not for the impatient. They did not make it user friendly... maybe the 3rd party tools built on Cordova are more user friendly and quick to set up?

  • @metamask0x
    @metamask0x 10 месяцев назад

    Is there android app to website converter ?

  • @ttbnoah
    @ttbnoah 7 месяцев назад +1

    if it wasnt for favours theyll never call you

  • @shshe6515
    @shshe6515 Год назад

    Can I use gradle 8.1.1 ?

  • @zitunes
    @zitunes Год назад

    What about cordova file transfare

  • @canicemichael7010
    @canicemichael7010 6 месяцев назад

    Save here

  • @seiranavetisyan5146
    @seiranavetisyan5146 Год назад

    Hi bro why you don't show installation

    • @seiranavetisyan5146
      @seiranavetisyan5146 Год назад

      I have got errors after cordova build and I think it's happen, because I download wrong version may be java version or android

  • @edwinlemeilleur
    @edwinlemeilleur Год назад

    Why use Cordova over React Native, Flutter, or Ionic? And can those apps really do everything you can do with Kotlin and Swift?

    • @AdamKhoury
      @AdamKhoury  Год назад +3

      Ionic and some other tools are built using JS frameworks and Apache Cordova. Ionic is the jQuery of Cordova. I gave my reason why at 0:35 in the video when I mention those very tools. They all add a different proprietary abstraction layer that one must spend considerable time learning. I feel more at home in Cordova allowing me to use real JavaScript, HTML and CSS without abstraction. Kotlin is a general-use framework for Java, so I would recommend just learning Java(its easy enough) instead of dedicating time learning hundreds of abstractions of beautiful programming languages that don't need abstracting. But to each his own, I won't yell at anyone.

    • @JediWebSurf
      @JediWebSurf Год назад +1

      @@AdamKhoury thanks for the insight and for teaching me this.

  • @petropzqi
    @petropzqi Год назад

    Is this still a thing? I would go with PWA

    • @AdamKhoury
      @AdamKhoury  Год назад +2

      Didn't you read the comments under my last video. You are going to get scolded by the PWA police saying that it is not even close to a real app. I have plans to teach PWA this year. I'll first cover SPA(single page app) website development, then cover PWA development using the SPA created previously. I like the PWA concept and we are going to teach it on my channel. I'm going to cover PWAs at a much more detailed level than this.

    • @petropzqi
      @petropzqi Год назад +1

      Thats wonderful news, can't wait for it

    • @AdamKhoury
      @AdamKhoury  Год назад +3

      @@petropzqi Yeah to hell with both Google and Apple store crap. Maybe we can diminish their value by creating some really useful in-demand PWAs that the stores can't have. Like a PWA that shows real-time location of all the nerdy virgins developing for Google and Apple stores... lol just kidding

    • @cirusMEDIA
      @cirusMEDIA Год назад +1

      I planned to go all in with PWA's ...and then Apple intentionally hindered that future; because their appstore would no longer be the only option to install applications on the iphone. Apart from Apple tho, PWA's are amazing on Android and Windows platforms! *Just don't push a broken web worker to your live site because those are a pain to remove from client devices.

    • @AdamKhoury
      @AdamKhoury  Год назад

      @@cirusMEDIA Right on!

  • @wsteelenyc
    @wsteelenyc 2 месяца назад

    The title isn't really accurate. Your tuturial doesn't explain converting an existing web app to a mobile app. I would hav titled this more accurately, "How to build your first Apache Cordova App".

  • @nexuzinnovation-com
    @nexuzinnovation-com 9 месяцев назад

    hi, thanks Adam, may be the next video on iOS deploy ?