Does anyone knows if I can have an deep link in my iOS app to wechat account? I have an developer account with wechat (Chinese acc) just want to check if there are ways to deep link wechat account in my iOS app. So is there a way to deep link in my iOS app to wechat account chat?
You can use the url schemes to open another iOS Apps from your iOS app.
Find below code to open the wechat app from your app when pressing button.
- (void)buttonPressed:(UIButton *)button
{
NSString *customURL = #"weixin://";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:#"URL error"
message:[NSString stringWithFormat:#"No custom URL defined for %#", customURL]
delegate:self cancelButtonTitle:#"Ok"
otherButtonTitles:nil];
[alert show];
}
}
refer Apple documentation
Another SO Answer.
Related
I am developing a Vue web app and using Web Speech API for voice recognition.
The recognition on the desktop Chrome browser is alright but the voice recognition on the Android Chrome browser is not up to the mark.
I am not sure if this is an issue of browser setting or the speech recognition API is not enough mature in the Android Chrome Browser.
Using the speech to text APIs like Google Cloud, AVS is an option but it has a cost impact. So wanted to check if good voice recognition is possible without using them. Any pointers to how can I increase the accuracy of voice recognition on Android chrome?
Screenshot from Chrome on my laptop:
Screenshot from Chrome on Android phone:
My code for using Web Speech API:
this.recognition = new webkitSpeechRecognition() || new SpeechRecognition();
this.recognition.interimResults = true;
this.recognition.lang = this.lang();
this.recognition.start()
this.recognition.onresult = (event) => {
for (let i = event.resultIndex; i < event.results.length; ++i) {
self.query = event.results[i][0].transcript
}
}
this.recognition.onend = () => {
this.recognition.stop()
this.micro = false
this.submit(this.query)
}
We are not able to redirect from one html page to itunes from InAppBrowser in ios cordova.
We are using following logic for redirection from html page to itunes :
1) window.open("itunes url","_system");
2) window.open("itunes url","_blank");
3) window.location = "itunes url";
We are able to navigate to play store in android using window.location.
Please suggest appropriate solution for this issue.
PS : The itunes url is having location of our app on app store.
I'm going to open google hangouts site in webview of my chrome packaged app as user signed in chrome.
I can get auth token that way:
chrome.identity.getAuthToken({ 'interactive': true }, function(token) {
console.log(token);
});
but in webview I can see sign in page instead of hangouts site. It seems that webview doesn't have access to auth token.
Here is code displaying webview:
<webview id="id1" partition="persist:googlepluswidgets" src="http://g.co/hangout" style="width:100%;height:100%;"></webview>
Any ideas to share auth token with webview and open site directly, without log in?
Is it at all possible to do it using auth token? If not, is there another method to authorize user while opening that site in webview?
I have a standalone frame-less Chrome app. I'm sending messages from another Chrome extension to it (Chrome app) which works. But I would like to be able (if it's possible) to launch the app using the extension. Because now I have to launch the app manually.
I've seen Google music "mini player" that you can launch from music.google.com. So I'm wondering if the same can be done using chrome extension.
I wouldn't need the Chrome extension if the Chrome app could read opened tabs or just URLs but since this is not possible one must use extension and message to app to achieve this.
just send msg to your app from extension when you want to open it (In my case, I'm opening app when injected element on page is clicked)
extension script:
var appID = "qwertzuiopasdghghjkhgjghj";
element.onclick = function () {
chrome.runtime.sendMessage(appID, {message: 'fireup'}, function(response){});
});
app background script:
chrome.runtime.onMessageExternal.addListener(function(request, sender, sendResponse) {
if (request.message == 'fireup') {
chrome.app.window.create("page.html",
{
//whatever
});
}
});
You can use chrome.management.launchApp method: https://developer.chrome.com/extensions/management#method-launchApp
To use it you need to add "management" permission to your extension manifest file
My team of developers has built a successful iOS universal app which synchronizes sophisticated HTML5 web apps to an iPhone / iPad. The apps are loaded into the UIWebView from the local file system. We recently added in-app email using MessageUI.framework.
Everything was going fine until our QA department identified a use case where the instantiation of the MailCompose class causes the UIWebView to throw a SECURITY_ERR: DOM Exception 18 error. This ONLY occurs on iOS 4.2.1. The app functions normally when built against SDK 4.1 and installed on a device running iOS 4.1. This FEELS like either an iOS 4.2 bug, or an HTML5 issue that has appeared in iOS 4.2.
I am looking for techniques to find the cause of the SECURITY_ERR: DOM Exception 18. I know that this error is a same-origin exception of some kind, but it doesn't make sense why it works on 4.1 but not 4.2. And why does the MailCompose class cause the issue?
Any help at all will be greatly appreciated!
may I ask how do you load your html source from the local FS ?
Also what does your MailCompose class do, to interact with the document loaded into the UIWebView ?
If you are reading the contents of an html file into a string and then load it into the UIWebView, then you have to change it, and load it using the file:// protocol.
Instead of loading the html source as a string :
NSString *html = [NSString stringWithContentsOfFile:[path stringByAppendingString:#"path to the html file"] encoding:NSUTF8StringEncoding error:NULL];
[webView loadHTMLString:html baseURL:baseURL];
Go ahead and load the actual html file via an NSURLRequest (file:// url)
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:[path stringByAppendingString:#"path and file name of the file"]];
NSURLRequest *request = [NSURLRequest requestWithURL:baseURL];
[webView loadRequest:request];
Doing so, enables access to window.localStorage, window.openDatabase and other objects.
Cheers