Tried both of the following methods so that ppl can click a link in my app and be taken to the app store to review/rate:
Rate our App
and when this linked is tapped on, nothing happens and i get the following console message:
Failed to load webpage with error: The URL can’t be shown
Also tried a window.open:
$(document).hammer().on('tap', self.frameSelector + ' .rate-us-action', function(){
window.open('itms-apps://itunes.apple.com/app/id111111111');
});
and when tapping attempting this method nothing happens and i get the following console message:
handle url: itms-apps://itunes.apple.com/app/id1111111
How do i get my phonegap app to properly open a link to the appstore???
Try this format for <> has to be replaced with the appropriate info:
http://itunes.apple.com/app/<APP_NAME>/id<APP_ID>?mt=8
I've used the following link format for Cordova/PhoneGap apps since Cordova 2.2 & iOS 5:
itms-apps://itunes.com/apps/appname
Simply replace appname with your app's name.
Rate our App
You can also open the App Store and display a page of apps by your company with the same format:
itms-apps://itunes.com/apps/companyname
In a link:
More Apps By Us
This works today on iOS 8.1.1 without the Cordova inappbrowser plugin.
Related
I want to get contact list from Android(If user open website in android). I was searching on it little bit. I found two question in stackoverflow similar to this.
Obtain Contacts Permission before Navigating (Cordova)
Listing phone contacts using javascript
Cordova
Here what I tried.
function onSuccess(contacts) {
alert('Found ' + contacts.length + ' contacts.');
};
function onError(contactError) {
alert('onError!');
};
// find all contacts with 'Bob' in any name field
var options = new ContactFindOptions();
options.filter = "Bob";
options.multiple = true;
options.desiredFields = [navigator.contacts.fieldType.id];
options.hasPhoneNumber = true;
var fields = [navigator.contacts.fieldType.displayName, navigator.contacts.fieldType.name];
navigator.contacts.find(fields, onSuccess, onError, options);
I didn't get any error or alert message in android. When I visit the webpage in PC I got an error
Uncaught ReferenceError: ContactFindOptions is not defined
at contacts.php:17
I think I am having error cause, there's no contact function in PC.
I am so beginner in JS. I think Cordova must be installed in PC, I am not sure of the information also. If I have to than how can I install Cordova? I am using Debian Based Linux Distro. So, I tried
sudo apt-get install cordova
But,
E: Unable to locate package cordova
Are you building a mobile app with Cordova or are you just running your code in a website on Android?
If it’s just a website: you simply can’t do what you want since the browser doesn’t provide an interface to the contact list.
Unlike a Cordova app, which has access to the system APIs, among them the contact list API, JavaScript Code executed in a mobile browser, cannot access such APIs. The browser JS API simply provides no way.
JavaScript code run inside a Cordova/Capacitor mobile app however can Cordova APIs which bridge the mobile’s native API to JavaScript.
I have recently implemented Facebook Login using a plugin called react-facebook-login.
It works perfectly in a browser running on localhost. However when I build to device using cordova, I get the following error:
Application Error
net::ERR_FILE_NOT_FOUND
(file://www.facebook.com/dialog/oauth?client_id=***...
I assume the issue is the file:// before the facebook url which comes from Cordova I believe.
The Component looks like this:
<FacebookLogin
appId="my-app-id"
autoLoad={false}
fields="first_name,last_name,email,picture,birthday,location{location{country, country_code, city, region}},gender"
scope="public_profile, email, user_birthday, user_location"
callback={LoginWithFacebook}
/>
Do I need to set a redirect uri? seems to be set to file:///android/.../index.html at the minute.
You'll need to modify the plugin to use https: here
window.location.href = `https://www.facebook.com/dialog/oauth${getParamsFromObject(params)}`;
I would like to open a packaged chrome application automatically when the browser starts.
I have tried: chrome-extension://app id/
But it doesn't work. I get chrome-extension://invalid/ error page.
Use the chrome.runtime.onStartup event, "Fired when a profile that has this extension installed first starts up".
chrome.runtime.onStartup.addListener(function() {
chrome.app.window.create("main.html")
})
https://developer.chrome.com/extensions/runtime#event-onStartup
My Environment
Android Studio 1.0.1
cordova-4.1.0
I'm trying to access my website at http://example.com/index.php from the line super.loadUrl(Config.getStartUrl());
As the application runs on My physical device (Moto g2, Android 5) splash screen to MainActivity extends CordovaActivity works fine but on MainActivity it shows a alert with a title: Application Error and body: There was a network error. (http://example.com/index.php)
I have set the needed permission for Internet Access AndroidManifest.xml
Recently i have updated cordova from 2.9 to 4.1.; Log cat doesn't show's any record related to my application while running application. Also i tried to replace "http://example.com/index.php" with the "file:///android_asset/www/example.html" which worked fine, so i made a change in it and redirected to "http://example.com/index.php" form onLoad or by giving link it from example.html page but it fails to redirect.
anybody has a solution or a trick to solve it?
Add www before example. like this http://www.example.com/index.php it should work.
If still it is not working try debugging using chrome. This link might help you
http://www.html5rocks.com/en/tutorials/developertools/mobile/
I have an application which is using MSXML2.DomDocument.4.0 component.
I am using below code in javascript to initialize this component in my web application.
DefaultPage.aspx is like:
var objXml = new ActiveXObject("MSXML2.DomDocument.4.0");
My web application is pointing to TestApp virtual directory, and below is my complete URL
http://localhost/TestApp/DefaultPage.aspx
When I browse the above URL from IIS 7.5, using content View -> Browse
Msxml is loading properly.
But if open some IE Browser instance and paste the above URL, it is throwing below error.
Error: Automation server can't create object
Please suggest.
Its look like that , if we run IE in Administrator mode, working fine.