How to use android native code in phonegap? - android

I am developing an android application using phonegap and i came across some things which are quite easy to implement in android native code when compare to phonegap. So i want to know is there any way in which i can make use of android code by not changing my phonegap cross platform?

Similar question: How can I call native functions in Phonegap through Javascript?
You can write phonegap plugin
http://docs.phonegap.com/en/2.0.0/guide_plugin-development_index.md.html

Related

Can we convert existing android project to ios using cordova or phonegap?

I need help with some information which I couldn't find anywhere online. is it possible to convert my existing android app to ios using PhoneGap/Cordova? if it is yes, could u guys send me any link to do it. if its no, can I know why? please...
No, you can not convert it. Code base and frameworks are to different. For making cross platform app you can use Flutter, Xamarin or others...
Only if your android app is already a web application. Cordova and phonegap are a set of libraries for extending mobile web applications with native functionalities.
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development. If your current Android application is a Native application; you cant convert application to iOS.
For more details : https://cordova.apache.org/docs/en/latest/guide/overview/

Is it possible to embed android source code (native app) into phonegap app?

Is it possible to embed android source code (native app) on phonegap app?
in this case, I want to embed a part from the source code.
If it's possible, is the a tutorial about it?
I know that android use java and phonegap based on html5, and javascript.
or maybe Is it possible if i reverse the condition, embed phonegap into native app?
It's possible to use native code of choosen platform via plugins. Also in case of building native app you can create a WebView and work with web technology inside it.
If you want to build your own plugin, start with something simple: https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/

Converting iOS app to Android

I am developing an iOS application on swift and I was wondering is it possible to convert the code to run on android devices or I have to develop a new application. I have experience only with writing application on swift and I do not know how to create an android application. If it is possible to convert it it will be great.
If you do not want to write different code for ios and android. Check if Hybrid app fits your requirements. Check out Apache Cordova (Adobe phonegap). You will be coding your application as a web app using HTML Css Js. Please be aware of its own pro's and con's of going with hybrid app.
If you are looking for truly native alternatives, Check out Xamarin which gives you native application's UI, Performance and access to low level API's. You need to code your app in C#
You cannot directly convert swift code to make it work on Android.

Cordova app with angularjs

I am trying to make android mobile app using cordova. I have created an application in MEAN.js framework and it is working properly and now i am trying to convert this application into an android mobile application so i tried a lot but could not find a proper solution. Please help me to find the way for creating android mobile app using cordova.
Thankyou.
Cordova is just a layer which converts HTML5 to native mobile app code. The thing to understand is that, although Cordova is extremely strong, it's quite low level. I would recommend you try to use Ionic. It's a framework which allows you to write HTML5 code (which then gets converted to native) but it also provides a layer of Angular. So, basically porting what you have in MEAN to Ionic should be straightforward

Is it possible to develop Hybrid mobile applications using Java + (Cordova/Titanium)

I am hoping to develop a cross-platform image manipulation application for Android and iOS. I was thinking of using a development framework such as titanium mobile or Cordova but i was unable to find any image manipulation / processing library for them
I just want to know the possibility of developing the core image manipulation part using Java/ObjectiveC for the specific platforms and develop a common crossplatform front end using Titanium/Cordova
Is it possible to develop Hybrid Mobile applications using development frameworks such as titanium or cordova(phoneGap) while still having a part of code written in Java
Yes. its possible. if you are going the PhoneGap route, you need to create a PhoneGap plugin for this: http://cordova.apache.org/docs/en/2.4.0/guide_plugin-development_index.md.html
Once you create the plugin, you can invoke your native methods using Javascript.
Creating plugin for Android: http://cordova.apache.org/docs/en/2.4.0/guide_plugin-development_android_index.md.html#Developing%20a%20Plugin%20on%20Android
Creating Plugin for iOS: http://cordova.apache.org/docs/en/2.4.0/guide_plugin-development_ios_index.md.html#Developing%20a%20Plugin%20on%20iOS
Both PhoneGap and Titanium let you do this. The title of this question seems to imply you want to do JAVA development for iOS, which isn't possible (at least not with Titanium or PhoneGap).
Titanium has a development guide on how to extend the platform:
http://docs.appcelerator.com/titanium/3.0/#!/guide/Extending_Titanium_Mobile
It links to articles particular to iOS and Android.

Categories

Resources