Phonegap - Add Java Library - java

I have a Phonegap app already created and deployed. I want to add an "external" Java library for handling mag-stripe data (mag data received from a mobile credit card swipe). How can I go about including this library so I may handle this data in my native app?

You have to develop a Cordova/Phonegap plugin that exposes a javascript API that interacts with the native library.
The documentation for creating a plugin is here:
Plugin Development Guide

Related

Is it possible to add Xamarin.forms code to an existing Native Android Studio Application as a library?

I have an existing Native Android Application - written in Java on Android Studio.
A client wanted to add some new features that were being developed by another team and a different company that they wanted to include in this Android App as well. The other team is completing the work as a Xamarin.Forms format as they are more comfortable writing in C#.
I have seen sources online for including native iOS and Android code in a Xamarin project. But haven't found any examples of integrating a Xamarin.Form into an existing Android application.
Was it possible to integrate Xamarin.forms into an Android Studio application? (Possibly as a library?)
Were there any good resources about the different options doing this?
There is currently no supported mechanism to create a library in C# using Xamarin.droid that can be called from java.

Can I use custom java class library with ionic framework?

I am working with a Mobile Application project on ionic framework 3.19.0 with VS Code for Android platform. Where I want to execute few activities like download a apk file from web, checksum validation etc using custom Java Library prepared by other team.
I have searched a bit but not yet getting any suitable guideline or tutorial regarding these issues.
Is it possible to integrate Java Library with ionic and use it's class /function etc or is there other way exist?
Can anybody help ?
Edit:
There are few built in plug-in available for application version check and update (App Update, App Version) activities . Check here
You'll need to develop a cordova plugin if you want to interact with a native android library, can't be done directly through ionic.
https://cordova.apache.org/docs/en/latest/guide/platforms/android/plugin.html

Create a group on openfire from an Android app

I developed a chat application (Android platform, native Android development) using asmack library. Also I have a task to create from the application group in openfire server. I don't know how to do it.
And also additional question: is it possible or not?
You could use the Openfire REST API plugin, which allow you to create new groups over REST/HTTP e.g. from your application.
Look here: https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html#create-a-group
However this question is old and already answered, I am adding for the peoples which are still looking for quick and easy solution.
I have written a client library and have used in one of my project. Library is available on github -https://github.com/xibsked/Openfire-Rest-Api-Client-Android

Java SIP Plugin for Cordova or Phonegap for Audio and Video streaming

I've been doing some research on Phonegap and Cordova, it seems there is no support for creating apps that have SIP and VOIP functionality since HTML5 and Javascript have little or no support for these protocols (webRTC and websockets are not yet supported on most mobile phone browsers). However I found out it is possible to create and use Plugins in order to use native functionality of the Operating Systems (iOS and Android in this case).
My question is that, if for example I write native JAVA codes for my Android-Phonegap application, will I be able to use it as a plugin to stream audio and video in my Android-Phonegap application? what are the limitations of using a plugin (with native functionality) in Phonegap or Cordova? Most of the plugin codes I checked online had a "Result" in the end, does this effect streaming of Audio and Video?
Thanks in advance.
A proof-of-concept Cordova app that uses SIP.js with the PhoneRTC plugin to make WebRTC calls over the internet.
https://github.com/joseph-onsip/sipjs-cordova
Video.... I could potentially see a problem... BUT! HTML5 already has support for that so its OK. If looking to do SIP Video calls, look below.
You have HTML5 SIP clients that have been made:
http://sipml5.org/
It is Open Source. I haven't used it, but I cannot imagine that the back-end of the codebase wouldn't be portable to mobile.
Emdedded SIP - I would take a good long look at the code used in LinPhone (http://www.linphone.org/eng/download/git.html) and CSipSimple (https://code.google.com/p/csipsimple/) for your Java plugin Side ( You will need to build the required C libraries and use them as well ).
Now, PhoneGap provides a great Audio/Video Capture plugin.
https://github.com/apache/cordova-plugin-media-capture/blob/dev/doc/index.md
What you can do is integrate the Stream with some of the returns and tie-ins on the Media Capture plugin.
So, you have two options.
Here you have a SIP plugin for Android devices. Hope it helps!
https://github.com/lglossman/SipManagerPlugin
Anything you need don't hesitate to contact me...

Dropbox Sync API or Core API for pure Java

I want to if we could use the android sdk, which dropbox provides for Sync API, in a pure java project? if yes, how? what are the changes I need to make to an existing Android project using sync API in order to convert it to java project which would be used in a web app. If this is not possible kindly let me know if it is possible with Core API. Thanks.
I'm not sure if you could make the Android Sync API work, but the Core API does have a Java SDK:
https://www.dropbox.com/developers/core/sdk
https://www.dropbox.com/static/developers/dropbox-java-sdk-1.5.3-docs/index.html

Categories