Expose Android and iOS native code SDK to Javascript in Ionic - javascript

I actually found a third party plugin that I want to use on one of my project. The goal is to create an Ionic application for that to avoid wasting time coding in native for both Android and iOS.
The problem is that the plugin I found has only SDK for Android and iOS. After a discussion on their forum, a technical guy told me it was possible for me to use that on Ionic by creating a plugin to expose the code to the Javascript.
Do you know where I could start ?
Do you have any tips or advice on how I could do that ?
Thanks !

I actually found a third party plugin that I want to use on one of my project.
By plugin I understand you mean a Cordova plugin. A link would be nice.
a technical guy told me it was possible for me to use that on Ionic by creating a plugin to expose the code to the Javascript.
By creating a plugin to expose the code (of the Cordova plugin?) to javascript, I understand you want to make an Ionic wrapper for that Cordova plugin.
If so, first check that your plugin doesn't already have a Cordova wrapper in the list of those over at Ionic Native.
If not, then you can have a look at how all the other wrappers are already written and get started from there.
If you actually want to create your own cordova plugin, then here's a great tutorial by Ionic's CEO to help you out.

Related

Does Angular.js is must for building mobile app in Phonegap/ApacheCorova and Ionic framework?

I am pretty new by of developing apache cordova/phoneGap domain. After some search i came accross to know that I can use Simple jQuery and javascript while i develop app in Cordova. I don't know Angularjs at all, but by jQuery I can build the app.
Now, I am seeing that Ionic framework is giving a structure of the mobile app by just running some command to the CLI.Tht is pretty good because that UI structure has been build by default.
Now, my Question is that, Does Ionic framework only support Angular js? Or I can use Ionic framework but can be build the app with simple jQuery?
In other words, it is possible to use ionic framework without using Angular js?
Please let me understood...
I am using Ionic to build mobile apps and I don't think that Angular is must. Ionic is not just couple of Angular directives, it has tools built around it too. CSS and Javascript are separated, so in theory, you should be able to use something else in place of Angular and still be able to use Ionic tools. However, AFAIK, most people are using it with Angular,so, if you decide to go this route, you'll be all by your own.
Have a look at following thread, and they should give you fair amount of idea about this:
https://forum.ionicframework.com/t/does-anyone-use-ionic-without-angularjs/8485
https://github.com/driftyco/ionic/issues/325
-Thanks

Cordova App from scratch, decisions about ngCordova,Ionic and Typescript

I'm planning on making an multiplatform Cordova App (Android,iOS,Windows) and I found different ways to aproach this.
My plan is to develop an application with 4 or 5 functionalities related with the consumption of services (list,add and edit items) and allow offline use of the app.
The most important aspect is that it must be robust and stable above all else.
My solutions were:
Make a "pure" Cordova (Javascript, HTLM and CSS);
Use ngCordova (AngularJS, support for Cordova Plugins);
Use Ionic (AngularJS, mostly UI);
Use Typescript;
Use Typescript, ngCordova and Ionic (or a combination of the three together).
I know DefinitelyTyped supports Ionic and ngCordova (source on links)for the most part and that I can create a blank Cordova App in Typescript so that shouldn't be a problem.
The use of Typescript seems a foregone conclusion but I'm not totally sure about the use of ngCordova and Ionic, what is the standard for nowadays?
EDIT:
Decided to go with Typescript, Angular 2.0 and Ionic 2 but later gave up and developed in Xamarin
There are many standards, and which ones you use are really up to you depending on your needs and how much time you have to learn new technologies. I'll offer an opinion though: you should definitely use some type of an application framework vs. reinventing the wheel, and Ionic is a nice one that happens to be built on AngularJS. ngCordova allows you to access Cordova plugins as AngularJS components and takes about 5 minutes to learn, so if you go with Ionic I would use ngCordova as well. As an alternative, jQuery Mobile is a nice UI framework that, when paired with jQuery, can form a solid foundation for your app.
I will recommend Ionic because Ionic is build ontop of Cordova and makes UI Implementation easy (with predefined components).
You can also try React Native
https://facebook.github.io/react-native/docs/getting-started.html#content

adMod with phonegap cloud build

I have an HTML5&JavaScript application that I am building using PhoneGap's cloud build. I can't find a way to implement adMob into the app without using Java in some way.
I built the app using notpadd++, and and the PhoneGap cloud with github and i don't have a single line of Java. My research showed me that using AdSense on a mobile application is not allowed, so I'm in a bit of a pickle...
I'm on PhoneGap version 3.1.0.
There are some plugins that you can find through the docs at Phonegap Build but at present there is not an easy way to do this.
This is one of the things that many users have been asking for (including me). Please go to the PGB support community and add your voice to those who want this.

Do I need to learn Java to create an android app using phoneGap?

I am a web developer (PHP,javascript,html5) never created an android app with Java or any other language. My question is, do I need to learn Java to create apps for android and what should I know to create an awesome android app using phoneGap.
No unless you need at some step to code a native plugin.
But it would be useful for you to understand how phonegap works behind.
No. All you need to know are the basics of the language like including namespaces/imports, setting up some configuration files and some general familiarity with using IDEs.
You also won't need Java unless you are implementing some native functionality that is not provided by the PhoneGap API. For most simple apps a working knowledge of JavaScript, HTML and CSS will suffice.
you most probably won't need much of Java knowledge (if any), since PhoneGap applications are basically websites with (an optional) extra bit of JavaScript controlling the device
the only thing you might need Java for is when you upgrade your Cordova versions and you have some old plugins which need to update due to code deprecation

Use phonegap js to access native functionality without compiling an app?

Does anyone know if it is possible to use phonegap.js to access native functionality like the camera without compiling a mobile app? I would like to use it on a mobile-site and was curious if anyone knew of a way to do this?
If you take a look at the PhoneGap Docs for each OS it says you need to compile in order to work, so no, you cannot use it on a website to access native functionality. The camera cannot be accessed from a website, it needs to be a native app.
See this SO post for a possible workaround. I haven't tested it though. And yes, it still does require a native app to be built.
That isn't possible through any JavaScript interface.
PhoneGap is a JavaScript to native wrapper that maps JavaScript/HTML/css to the mobile platform's native SDK. Since PhoneGap is only a wrapper, a compilation step is required

Categories

Resources