how to create custom cordova plugin using javascript - javascript

Is it possible creating cordova plugin using JavaScript and without Java code.
Plugin preferable for Android.
If yes, please tell me how?

Not possible, you should use Java code to create plugin and integrate it using javascript.
An example for creating cordova plugin in Java and calling it in javascript
http://devgirl.org/2013/07/17/tutorial-how-to-write-a-phonegap-plugin-for-android/

Related

how can i embed javascript developed by Create React App

I want to use javascript library on github in my project but I don't know how to do it.
the scripts are "https://github.com/ReyhaneMasumi/mapbox-gl-draw-scale-rotate-mode"
Is there any way to use this library on plain web app project?
You just should check installation and usage guide in README.md:
https://github.com/ReyhaneMasumi/mapbox-gl-draw-scale-rotate-mode#readme

Is it possible to plugin create cordova for ionic 3 with Epson ePOS SDK for iOS?

I never created a Cordova plugin, so I would like just know if it's possible to create Cordova plugin for ionic 3 (only ios) with this https://download.epson-biz.com/modules/pos/index.php?page=soft&scat=58 . And can you tell me please what file I need to use for creating a Cordova plugin (only for printing some text). I will put it in git after creating because I need it and show it to some people who need it. I just understand the JavaScript part of it but not objective-c... Thank you.
Really nice idea. You can start by using below link. Good luck!
iOS Plugin Development Guide
This section provides details for how to implement native plugin code
on the iOS platform. Before reading this, see [Plugin Development
Guide][plugin-dev] for an overview of the plugin's structure and its
common JavaScript interface. This section continues to demonstrate the
sample echo plugin that communicates from the Cordova webview to the
native platform and back.
An iOS plugin is implemented as an Objective-C class that extends the
CDVPlugin class. For JavaScript's exec method's service parameter to
map to an Objective-C class, each plugin class must be registered as a
tag in the named application directory's config.xml file.

How to integrate objective C or swift programming code into cordova ios app?

I have some objective C code. I need to integrate it into my cordova project.
How can I run that code in my Cordova IOS app?
Your question is a little vague. But to get you pointed in the right direction:
Open your project in finder and navigate to platforms>ios>[project-name]>Classes.
Here you will find AppDelegate and ViewController files. These are written in objective C. AppDelegate handles a lot of the central processes of your app.
If you want to add something specific in ObjectiveC you have to write a plugin. Here's the doc about it : https://cordova.apache.org/docs/en/5.4.0/guide/hybrid/plugins/index.html
Once you've integrated your new plugin into your cordova app, you just have to execute your native callback from the javascript code. It works the same way as an official plugin.
What exactly do you want to add in ObjectiveC, are you sure that you can't do it from the webView ? (I mean in JS and not as native code)

Build.Phonegap Facebook SDK

I am using the Build.Phonegap utility to zip up my HTML, CSS, & JS in order to create an app on my Android phone. I know my code is fully correct as it renders no problem in my browser, but when I zip it up the JS doesn't render at all. My question is:
Can Build.Phonegap render third party Javascript SDKs? i.e. Facebook
I am attempting to use the Facebook JS SDK and do not wish at all to use the Facebook.Connect plugin for Phonegap.
Please do not mix this up the Phonegap/Cordova platform.
Thanks!
I don't believe it can, no. That's the point of the plugins.
Why don't you use the plugin?

Is it possible to combine cordova and android ndk?

I want to implement a cordova packaged app in javascript and use c-code for some high performance operations.
Is it possible to write a cordova plugin which then calls into android-ndk using jni?
If yes: How should I set up such a project? Is there anything special I should be aware of before starting?
I have done it successfully on one of my project. Just make a plugin which map your javascript code to your java code. Then your java code will call a C code trough jni.

Categories

Resources