I have an Angular Ionic app that uses geolocation / Google Maps. When it requests permissions for location, on web and Android it uses the url (so localhost:4200, for example) and on iOS it just reads as "://".
Where do I configure the requestor name for permissions? I want it to read
"App Name" Would Like To Use Your Current Location
So for clarity: I don't want the url on Android/Web, and I don't want the blank string on iOS. I want it to read as the app name.
Let me know if you need more details.
Related
How do I open the Huawei AppGallery that points to a specific app directly?
I know that is possibile to do it natively in Android, but I need to do it with plain Javascript for a Cordova application
You can refer to the following:
The typical link format of the application details page on Huawei AppGallery is: https://appgallery.cloud.huawei.com/appDetail?pkgName=**packagename**&channelId=**channelid**&referrer=**referrer**&detailType=0&calltype=AGDLINK
Parameter description:
Packagename: required, the package name to be popularized and applied, such as com.huawei.gamebox ..
Channelid: It is recommended to fill in. To improve the channel identification degree of data analysis, it is recommended to fill in the designated identification number for each channel. If it is not filled in, the system will automatically read the package name of the source media, but the package name cannot be obtained by jumping through the webpage or offline QR code.
Referrer: not required; if not, it will be blank by default. This parameter refers to the secondary channel number. When links are posted on multiple pages (scenes) of the same media, the specific location effect of the media can be identified by the secondary channel number.
DetailType=0&calltype=AGDLINK: basic parameter, which cannot be deleted.
for example: https://appgallery.cloud.huawei.com/appDetail?pkgName=com.huawei.gamebox&channelId=ceshi&referrer=01&detailType=0&calltype=AGDLINK
I think the shortest and easiest one would be running this simple link:
https://appgallery.cloud.huawei.com/ag/n/app/<YOUR_APP_ID>
No need Packagename, Channelid and stuffs like that and no need to config anything and the rest will handled by Huawei automatically.
How to get YOUR_APP_ID?
Go to Huawei App Gallery
Search for your app (e.g. WeChat)
Copy the ID in the end of the link (e.g. https://appgallery.huawei.com/#/app/C5683)
In this case the APP_ID for WeChat would be C5683
So the Huawei app link for WeChat would be https://appgallery.cloud.huawei.com/ag/n/app/C5683
Hope this helps! Enjoy~
I have the Medium app install on my iPhone.
When doing a search on Google Chrome app, when I clicks on a medium.com link in the search results, it open my Medium app.
How can this happen? How can Google Chrome can interpret https://medium.com to medium://?
So the feature in particular you are referring to is Universal Links and requires both server side and client side modifications.
On the server side / website you need to add an AASA (Apple App Site Association) file. This file is simply a JSON file that contains the specific applinks urls for the corresponding app identifier. A sample is shown below.
{
"applinks": {
"apps": [],
"details": [{
"appID": "ABCDEBBQ.com.medium.ios",
"paths": ["*"]
}]
}
}
If you note the paths key in the JSON above you will see that there is a star or wildcard symbol. This simply means open any URL on my websites’ domain. For example www.medium.com/topposts will open in the medium iOS app. It should be noted that you can explicitly define your paths to either include or exclude.
On the client side (Xcode) you’ve gotta setup the associated domains capability inside of your application and specify the applinks service for your domain in this case www.medium.com
Lastly you’ve gotta add the capability to your application identifier inside of the developer portal.
After all of this configuration is completed you should now have a ‘link’ between your website and application.
Apple handles all of this logic internally in iOS and since it’s closed source I cannot give you the exact implementation details but the just of it is that when you visit the domain (medium.com) on your iOS device it downloads the AASA file from the webserver (the AASA file must be hosted on a secure server and can only be downloaded over HTTPS) and the operating system then checks whether there is a corresponding application on the device that matches the appId specified in the AASA file. If both the paths and appIds match it then launches the medium iOS application on the phone.
That’s how it works. I hope that I’ve articulated it well enough.
I'm making a pair of website-based apps for both Android and iOS interfaces, and I'm struggling with a part of it. Perhaps you guys could help me out!
I'm using Android Studio and Xcode, and launching the website through WebKit and WK WebView respectively. It's super simple, just an app which calls a website into it directly. No external navigation, nothing but a full-page website. And this part is working great!
But I do have one problem! I don't want my users to get consistently logged out if they close the app, or after a few hours of not using it. I'd like it to stay logged in for them, or to automatically log-in when they use it.
The maker of the website has given me a way to do this through the URL.
Basically, my URL currently is set up like "https://URL.com/x/y/z" and it goes to the website, and that is great, but I need to set it up to be "https://url.com/x/y/z/[insert user's IMEI or UDID here]". That unique ID from their Android device will keep them logged in. I've tested it using my own device with my own IMEI and it works great, but obviously using one specific identifier for everyone will not work. I just need it to call the specific user's IMEI or UDID into the URL, to complete it.
How should I go about this?
I am assuming that you are talking about an Android app that visualizes a website in an activity. On Android, you can retrieve the device's IMEI OR MEID string by calling:
android.telephony.TelephonyManager.getDeviceId().
But be warned, this requires that you add a permission to your manifest:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
You should inform your users why you are requesting this permission.
For iOS/Xcode, you can get the device UUID via UIDevice:
// Swift 4
let uuid = UIDevice.current.identifierForVendor!.uuidString
If you are targeting iOS 11 or newer, Apple introduced Device Check to get a device specific token. I personally haven't used it, but it sounds like it's use case is similar to what you're looking for.
Update:
From your comment, here is how'd you include it in the url string.
let urlString = "url.com/x/y/z/" + uuid
I need to add a smart app banner for iOS and Android versions of a native app when users visit the client site on a variety of small screen devices. Using the meta tag method described here
for iOS devices, I'd like to also include the meta tag method for Android devices, if this exists. The code would also need to query if the user was viewing a particular page on this Wordpress site (query by page-ID) and what device they were actually viewing on.
I'm aware the meta tag for iOS needs to be in the format:
<meta name="apple-itunes-app" content="app-id=123467, affiliate-data=myAffiliateData, app-argument=myURL">
I've also read elsewhere the php query for the device is this:
<?php
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$droid = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
if ($iPod || $iPhone || $iPad){
//Display Smart App Banner prompt for iOS
} else if($droid){
// Display Smart App Banner Prompt for Android
}
But I'm not aware of the meta tag for Android, or how I'd combine them all together and check the page they are on (so banner doesn't display sitewide) and incorporate into Wordpress site.
Hopefully someone cn help me with some code to try in functions.php of child theme or via a meta tag plugin (or hook within Canvas theme).
I'm developing a cordova application that find a particular retailer on the map near to the user's current GPS coordinates. I used the navigator.geolocation.getCurrentPosition to get the user's current position and use the Google Maps API v3 javascript to do a text search to find the retailer on the map.
I have the standard and recommended settings in both Android and iOS config files, it works find on iOS but not on Android. I exported the APK file and installed on Moto G, the application name is listed in Settings -> Location -> Current Location Requests but the browser still throws Timeout error.
Any ideas what could be wrong and why unable to detect the current position?
EDIT: To add more info, sometime the application opens up and stays blank without any timeout alerts.
You must add the geolocation plugin to your project using the following command. This sets the appropriate permissions in your platform config.xml file to allow the APK to speak with the OS:
cordova plugin add org.apache.cordova.geolocation
More: http://docs.phonegap.com/en/3.2.0/cordova_geolocation_geolocation.md.html