mikeflores2000
Posts: 0
Joined: Sun May 06, 2012 11:09 pm

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Well, I've always been able to either exit browser or return to my app.
-Good Luck.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Hi, yes you were right. Our developers already looking into this issue.

mikeflores2000
Posts: 0
Joined: Sun May 06, 2012 11:09 pm

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Hi Marina,

Any update from your developers?

Thanks,
Mike

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Hi Mike,

Sorry, no update. Developers are working on it, but no ETA yet.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Hi Mike,

After deep investigations we have found the following:

In your app you use a transformation for the label element where links (and whole messages) are displayed after searching. This transformation finds links in messages and changes them in way when parameter target="_blank" is added to the < a tag. It is supposed, that when this link is tapped it opens in Mobile Safari instead of UIWebView.

Attached project's assets can reveal that version of Cordova is 2.4.0 (appery lib 1.0). It seems that starting from Cordova 2.3 there is other mechanics to open links. Parameter "target" is not supported. But you still can open links not in WebView but either in Safari or InAppBrowser. To do this you should perform the following:

  1. Enable support of InAppBrowser: Open config.xml on the Editor's tab "Sources" and add the following line to the :
    code<plugin name="InAppBrowser" value="CDVInAppBrowser" &#47;>/code

  2. Update transformation for component with ID = messageLabel with the following text: codeHere should be the code you can see in the next comment&#46; GetSatisfaction doesn't display it correctly/code

  3. The code in point 2 opens links in the InAppBrowser. If it is necessary to open in Safari, then _blank should be replaced with _system.

  4. This solution is actual only for iOS. It wasn't tested on Android and WinPhone apps so I cannot guarantee it does not break other components.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

var inputText = value;

var replaceText, replacePattern1, replacePattern2, replacePattern3;

//URLs starting with a href="http://" rel="nofollow"http:///a, a href="https://" rel="nofollow"https:///a, or ftp://
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~|!:,.;]*[-A-Z0-9+&@#\/%=~|])/gim;
replacedText = inputText.replace(replacePattern1, '[url=http://#]$1[/url]');

//URLs starting with "www." (without // before it, or it'd re-link the ones done above).
replacePattern2 = /(^|[\/])(www\.[\S]+(\b|$))/gim;
replacedText = replacedText.replace(replacePattern2, '$1[url=http://#]$2[/url]');

//Change email addresses to mailto:: links.
replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
replacedText = replacedText.replace(replacePattern3, 'a href="mailto:$1" rel="nofollow"$1/a');

return replacedText;

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

The main problem was that the version of Cordova 2.4 works a bit differently than assumed in the code. Indeed, in version 1.6, for example, everything worked. Although you did not change the code, Appery.io lib renewed, Cordoba was updated to 2.4, and all stopped working.

mikeflores2000
Posts: 0
Joined: Sun May 06, 2012 11:09 pm

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

widget
plugin name="InAppBrowser" value="CDVInAppBrowser"
Did not work. Should this not point to Safari instead of InAppBrowser?

Also your code is missing _blank so how can I change to _system?
In addition it also did not fix problem:
var inputText = value;

var replaceText, replacePattern1, replacePattern2, replacePattern3;

//URLs starting with a href="http://" rel="nofollow"http:///a, a href="https://" rel="nofollow"https:///a, or ftp://
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~|!:,.;]*[-A-Z0-9+&@#\/%=~|])/gim;
replacedText = inputText.replace(replacePattern1, '$1');

//URLs starting with "www." (without // before it, or it'd re-link the ones done above).
replacePattern2 = /(^|[\/])(www\.[\S]+(\b|$))/gim;
replacedText = replacedText.replace(replacePattern2, '$1$2');

//Change email addresses to mailto:: links.
replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
replacedText = replacedText.replace(replacePattern3, '$1');

return replacedText;

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

Hello! We'll take a look again. Sorry for delay.

mikeflores2000
Posts: 0
Joined: Sun May 06, 2012 11:09 pm

Auto Rotate stopped working and app fails to return to main screen after hot link clicked

I will email support for the code due to format issues here.

Return to “Issues”