Paypal api for hybrid mobile app - html

I am in big dilemma for last few days while studying paypal API for creating an HTML5 based hybrid app that needs to use paypal api for carrying out some transactions.
What I need is I want to use some Paypal API in HTML5 based mobile app, that will finally get bundled into some native app, say for example .apk files.
The problem is :
I have not found a single link that explains that if the paypal provides any api for hybrid app.
I have read their new buttons, name value api, etc. Will any of these will work in my current application when they get deployed as an .apk for android? The thing that makes me worry is that paypal needs redirectURL, so what it will do incase of single page app?
Any links or references are welcome!

I would highly suggest you try Cordova for your App. It does HTML5 in an app format and works very well.
I don't know that you would want to make API calls but your HTML buttons would definitely work. Paypal also has a plugin that would work as well (Cordova is also called Phonegap).

PhoneGap/Cordova will be my recommendation for any hybrid mobile apps.
PayPal has an official plugin for PhoneGap with Android SDK.
Refer https://github.com/paypal/PayPal-Android-SDK-PhoneGap

Related

Can I use Electron JS to convert my web app to DESKTOP app

I have a web app developed using..(PHP,MYSQL,HTML,CSS,JS,AJAX,Datatables, bootstrapjs)
Now, I want to make a desktop version of the same app, and I came across electronjs.
The problem is I dont know whether ELECTRONJS will support all my requirements.
A breif of my requirements:
My app is responsive using datatables.net library including EDITOR for displaying the data .
the datatable plugin requires ajax calls to some API (Which I developed with PHP and hosted on a server)..
but now I want to even do all the DB Operations with electronjs so that my app can work offline.
I am not sure if I can do that with electron
- calling an API (created by same app) from HTML/frontJS
- the API Returns Json data
- the Front JS displays that data on front.
Kindly let me know if this can be done with electronjs,
Well, basically yes. You can build a desktop app like this.
But you wont be able to run it offline if it depends on a server sided API. If you can rewrite your backend Code in JavaScript and use a SQLite DB instead of a MySQL you can run this as electron App.
Keep in mind that your business logic in the frontend can always be abused because it’s not hidden from the user.
FYI: Electron only runs a browser inside it’s own App container. So there is actually no crucial difference between Browser or electron App.

How to build a Today Widget / App Extension with Cordova?

An app I am working on needs a Today Extension / Widget. Are there any resources on how to build one into an Cordova app?
I found this, but it's not written very clearly and from what I understood seems to be a native app that only uses a HTML5 element in the app and widget to display some data :/
Yes you are right, today extension are a native thing. I recently also did a lot of research on how to integrate one into a cordova project dynamically and ended up creating my own cordova-plugin for that. You can find it here, maybe it will be useful for you too! Nevertheless you will have to implement the widget in Swift.
The plugin takes an already developed widget and integrates it in an cordova-ios project on every cordova platform add ios using a hook which parses and modifies the project.pbxproj via the help of cordova-node-xcode.

Firebase Email/Password authentication error TRANSPORT_UNAVAILABLE

I created a basic application using PhoneGap Build that I am trying to implement a simple Email/Password authentication scheme for with Firebase. The authentication works fine in Android, but when I run it on my Windows Phone 8.1 I get the "TRANSPORT_UNAVAILABLE" error returned.
I looked through a lot of stuff on the interwebz, but there really isn't much out there for this kind of thing. So far I have attempted to add the InAppBrowser plugin as suggested in a few places, but that didn't resolve the issue.
The Firebase documentation states "Redirects are not available in PhoneGap / Cordova, or local", but since it works on the same code on the Android I am wondering if that really is the issue.
My next step is going to be implementing the google authentication, but I would prefer to get this fixed instead of having to reengineer that entire portion of my application.
Help me Firebase Support... you're my only hope!

Upload Video to Facebook from AIR app

Developing an AIR based app that captures video. The user will then be able to upload to facebook if they so choose.
Right now I am confused about the requirements in uploading videos to facebook.
Even though this is technically NOT a facebook application, will I need to create a Facebook application ID?
Will I also need to make use of the facebook-actionscript SDK?
I've read elsewhere that the API needs to launch the Facebook login within a web view.
Or are there alternatives in my case?
Even though this is technically NOT a facebook application, will I need to create a Facebook application ID?
Yes.
Will I also need to make use of the facebook-actionscript SDK? Or are there alternatives in my case?
Talking to the API works over HTTP – so you can use any technique that allows you to make HTTP requests.
But using a framework/SDK that already has methods for usual FB API stuff will be much simpler, than handling all that HTTP stuff yourself.

PhoneGap index page

i know that the index.html page (the PhoneGap startup page) needs to reside on the device. but if we want to create an app who uses third party user authentication before proceeding to core application, so then what we have to do?
Thanks in advance
On android you can change the starting page in the main activity or you can make a redirect in index.html
Well, you don't say if you are platform specific..
And there are lots of third party auth options..
But I can offer two solutions (admittedly my own code etc),
both of them use PhoneGap for Android and PhoneGap Plugins. The key piece of code for me has been the onLocationChange callback feature of the ChildBrowser plugin. Your app can take the user to other sites for auth or whatever, but still get control back.
Tutorial on Using Twitter REST API (OAuth 1, ChildBrowser, jsOAuth plugin)
Free Android App + Source on github : AppLaud App (OpenID, ChildBrowser, custom server)
For authentication, you can have a form in your index.html (maybe under login div) to do a post to an actual webserver.
Then, fetch the data returned from the webserver to let your user access the functionality of your native phonegap application.
You can have the functionality disabled until you receive the successful login from the webserver. If you post via ajax, the webview won't even blink, but you will still get the successful login response from webserver and simply enable functionality on your app after this.
Let me know if this is confusing and I'll try to explain more clearly and
I hope this helps.