DropBox authenticate in cordova / phonegap (android) - oauth

Im trying to add dropbox support in my phonegap app, but i can't authenticate. (via dropbox-js/https://github.com/dropbox/dropbox-js)
I use:
client.authDriver(new Dropbox.Drivers.Cordova({rememberUser:true}));
The app opens a login/confirmation-dialog/ok but locks in the last step
in browser works fine with:
client.authDriver(new Dropbox.Drivers.Redirect({rememberUser:true}));
Is there any solution compiling with adobe phonegap build?

Related

Cordova iOS Universal links issue

I have cordova app which opens website (www.example.com) within webview. I have added cordova universal links plugin in my app https://www.npmjs.com/package/cordova-universal-links-plugin , followed the complete steps, added apple-app-site-association file at the root of my website www.example.com and it is showing json.
I have created universal link www.example.com/activemember, I added this as link in another website www.example2.com. when I open this www.example2.com in safari and clicks on link, it opens my app and takes me to active member screen within app.
Problem is that I am showing www.example2.com within an iframe of www.example.com which is being shown in webview in cordova app. when I click this link from within Iframe from app itself, it does not opens the specific screen within my app. instead, it opens www.example.com inside the iframe. appreciate if some one can help.
This project is deprecated, but there is a fork with some errors fixed:
https://www.npmjs.com/package/cordova-universal-links-plugin-fixed
As pointed out by #borgees, the linked project is abandoned.
If you are willing to switch from Cordova to Capacitor, Capacitor has support for deep links. This uses Ionic Plugin Deeplinks, which is actively maintained.
Another option for Cordova is the BranchIO Cordova Ionic Phonegap Branch Deep Linking Attribution plugin.

How do I launch an app inside of my flutter app?

I'm trying to build a flutter app that could launch all kinds of apps with a button. But I can't find a way to launch an app without using a browser or going through the google play store and the app store.
Is there a way to launch the app directly without using a browser or the play/app store?
You can try my plugin flutter_appavailability: A Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed apps.
Methods available:
checkAvailability(String uri)
getInstalledApps() (only for Android). Unfortunately, for iOS there is no way to get the list of installed apps!
isAppEnabled(String uri) (only for Android)
launchApp(String uri)
In the README.md file there is an example with screenshots

How to forcefully load desktop site in iFrame in Cordova App?

I want to forcefully load the Desktop View of any website in Cordova App for iPad. I am trying to loading in both iframe and InappBrowser.
By changing User Agent; I tried several methods to change User Agent but no luck. Any idea on this please? If we change user agent will the Apple reject the app while submitting for App Store?
I saw the option in Safari in iPad for 'request desktop site'. Can we do it programmatically in Cordova? or any option in iFrame for this?
Normally the website is redirecting from the Desktop url to mobile site url. So disable redirection is a solution? If so is there any option for that?
Change the iFrame size to pc desktop size and scale to reduce; I tried this but mostly not working.
or is there any other solution.
Thanks
It was working fine before version 4.0.0 of cordova-ios (Different from cordova version).
To be able to do that again a quick fix can be to remove the ios folder created by the new version and adding the old one:
cordova platform rm ios
cordova platform add ios#3
Hope it helps

Opening a local file with InAppBrowser under iOS doesn't work

I am developping a mobile application using Cordova. This application allows users to navigate in a kind of a file manager and allows them to download files. I use the plugin "FileTransfer" to download the file on the user's device and then call the InAppBrowser (version 0.5.2) plugin in order to open it.
While it works really great under Android, I can't say the same under iOS (tested under versions 7 and 8).
This is the line of code I use to open the downloaded file:
window.open(entry.toURL(), "_system");
Under Android, it proposes the user which application he wants to launch to open the file or launches automatically the default application based on the file extension. Under iOS, the file is downloaded and then nothing happens. I have found out I could use the integrated viewer of the InAppBrowser plugin when the user is under iOS. I do that in this way:
if (navigator.userAgent.match(/iPhone|iPod|iPad/))
window.open(entry.toURL(), "_blank");
else
window.open(entry.toURL(), "_system");
With these lines of codes, if the user is under iOS, the integrated viewer is launched and displays the file. The problem is for ZIP files or other files that can't be rendered in the viewer. This one says "Load Error".
I think that if "_system" worked, Safari would be launched and would propose the user how he wants to open the file.
Does anybody have an idea of how I can make "_system" worked in iOS? Is this eventually a known problem (I couldn't find anything related to my problem)?
If this can be relevant to my problem, I use Phonegap Build in order to generate the .ipa file.
On iOS when you use _system, it try to open the url you pass with safari.
As iOS have sandbox access limitations, safari can't open the url because it's inside your app sandbox.
You can try this plugin, it provides an "open with" dialog that will show you the apps that support the type of file you want to open if any available.
https://build.phonegap.com/plugins/1076

Download Standard-Install for BlackBerry from Phonegap

I'm building a BlackBerry App using jQuery Mobile + PhoneGap. After I zip my project files and upload it to phonegap I get a list of platforms.
The BlackBerry file is listed as OTA install.
How can I download the Standard install?
In order to download the standard install using the Phonegap website you must first provide PhoneGap with a signing key from BlackBerry.
Detailed instructions on getting the signing keys onto the PhoneGap website can be found in one of my previous questions. Where to get BlackBerry CSK File for PhoneGap?
After uploading the keys and rebuilding the button might still say OTA install but try clicking download because in my situation the download was Standard Install despite saying OTA install.

Resources