We're developing SCORM content for our client to put on their SuccessFactors LMS, and access through the SuccessFactors app on ipads.
Some of the course pages include links to pages on the internet and the clients intranet, but we're finding that these links will replace the course in the app's web view, and we aren't able to return to the course.
Has anyone found a way around this, so we can open the links in a new window and keep the learner in the course?
The Successfactors iOS app should work similarly to other iOS apps.The following code forces the iOS app to open a URL in the Safari browser. I believe it may also open in the default browser. Please try this code:
<div id="launchInBrowser" data-href="https://stackoverflow.com/posts/37790430">Stack Overflow</div>
and in the page's javascript:
document.getElementById("launchInBrowser").addEventListener("click", function(evt) {
var a = document.createElement('a');
a.setAttribute("href", this.getAttribute("data-href"));
a.setAttribute("target", "_blank");
var dispatch = document.createEvent("HTMLEvents");
dispatch.initEvent("click", true, true);
a.dispatchEvent(dispatch);}, false);
check here for more information:
Force link to open in mobile safari from a web app with javascript
Related
I created a asp.net mvc app with a Index.cshtml and a Index.Mobile.cshtml. The views are using the same controller and action. In development I get the mobile view on my phone and with desktop the desktop view. Everything works as expected.
After deploying the application to the production server everything works as expected on a smartphone, until I navigate from a desktop browser to the page. After I navigated from a desktop browser to the page I won't get the mobile view anymore on a mobile device.
I disabled and enabled cache settings but get either way i have this strange behavior. Am i missing something?
edited:
I got the following theme structure:
/Themes/DefaultTheme/Views/Cart/Index.Mobile.cshtml
/Themes/OceanasTheme/Views/Cart/Index.cshtml
In my custom razor view engine I modified the ViewLocationFormats, simplified:
var customViewLocationFormats = new List<string>();
customViewLocationFormats.Add("~/Themes/DefaultTheme/Views/{1}/{0}.cshtml");
customViewLocationFormats.Add("~/Themes/OceanasTheme/Views/{1}/{0}.cshtml");
//override default view location
ViewLocationFormats = customViewLocationFormats.ToArray();
When I copy the Index.Mobile.cshtml to the OceanasTheme folder the same problem appears, except I get the Mobile.сshtml from the OceanasTheme each time after I visited with desktop. (the desktop gets the Index.cshtml from the OceanasTheme).
Updated to MVC 5.2.7 and removed Microsoft.AspNet.Mvc.FixedDisplayModes package. But it still doesn't work.
RazorViewEngine is caching views with DefaultViewLocationCache. The .Mobile view location is stored in cache after first request with mobile. When requesting with a desktop browser the desktop variant is not found in the cache, so RazorViewEngine is gonna try to find the view on the disk. It will find the view in the different folder, and will store it in cache, But it also checks if the mobile exists in that folder. Because the .Mobile is not in this folder it will overwrite the cache with an empty path.
I fixed this issue by creating a custom implementation of IViewLocationCache.
Im trying to Code a Programm with a WebView with includes reCaptcha by Google. When i load the Web Page it says that my Browser doesnt Support reCaptcha. Is there anyway to fix this with a method or something?
Thanks!
Override user by overriding the User agent string using WebEngine.setUserAgent("use required / intended UA string");
There are a lot of issues with this:
In order to use a ReCaptcha, you need to have an HTTP/HTTPS environment, so you cannot serve the local file statically from WebView. This means that you'll have to either host your page online or on localhost and then open that within WebView.
As Priyanka mentioned, you can also override the user agent string as said, but the WebView browser still doesn't have all the JS libraries that you need (as of 2020, the "click all squares that have traffic lights" isn't functional).
I would probably recommend opening the auth page in the user's local browser and then using some kind of callback function.
Problem — when opening a Firebase Dynamic Link on Facebook Mobile, the Facebook Browser consumes the deep link and does not open the intended mobile app
Question — is there a good workaround in Firebase to help Facebook deliver on the promise of presenting my Dynamic Link as intended?
We are aware of http://applinks.org, and that Facebook is a contributor. Does Firebase have a way to configure their server using the AppLinks spec so that Facebook will pass through the Deep Link to our app instead of consuming it?
Background — I have created a Firebase Dynamic Link for an iOS and Android app.
The Dynamic link delivers everything I expect and is a fantastic experience.
When opened on iOS, it navigates to the App. If not installed, it goes
App Store
When opened on Android, it navigates to the App. If not installed, goes to Play Store
When opened on non-mobile, it navigates to our Website
On Facebook mobile, neither 1 nor 2 happens. The result is that it goes straight to the mobile web experience, thereby eliminating the promise of the Firebase Dynamic Link
To avoid this cases we made a webpage which redirects to firebase dynamic link.
With this solution we can:
Use our domain, not the firebase url.
Ensure that firebase links works in every cases, for example when it opens from a custom browser (fb, samsung).
The disadvantage of doing this is that you'll always need to pass through a web page with an redirect.
I recently had to integrate dynamic links to one of my clients apps, and I got lots of trouble because of deeplinks not working on facebook+android_app.
As I couldn't move to branch.io because of princing reasons, I had to work it out on a different way so followed #Rahul Shukla advise.
I ended with a very simple nodejs+express setup where I receive the dynamic link ID and return a HTML with all the meta-tags required by facebook applinks (android + iOS) and a redirect script (window.location = 'your_dynamic_link') for other clients to be used.
The best part is that now on facebook the app opens directly without the preview page in both platforms and the link works on all browsers via the script redirect.
Here is the gist
the solution I found was to redirect to the dynamic link from a webpage like this
window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";
this will open the link in your system default external browser and the deeplinks works perfectly.
to trigger this only on facebook in-app browser
if (ua.indexOf("FBAN") != -1 || ua.indexOf("FBAV") != -1) {window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";}
We were struggling with the similar issue and here's how we finally solved it:
Say this is the final firebase url you are going to share
https://xxxx.app.goo.gl/?apn=com.your.package&link=http://www.yourwebsite.com
Now in the index.html page of your website, add the following meta tags
<meta property="fb:app_id" content="your_fb_app_id" />
<meta property="al:android:package" content="com.your.package" />
<meta property="al:android:app_name" content="YourAwesomeApp" />
<meta property="al:android:url" content="somescheme://XYZ" /> <!-- identifiable by your app, your app must handle this data scheme inside your manifest's intent-filter tag --!>
<meta property="al:web:should_fallback" content="true" />
<meta property="al:web:url" content="http://www.yourwebsite.com/" />
Now the app launches on clicking on the facebook post shared using this link.
I've tried some ways but totally fail. When I use the dynamic link in Facebook post, it shows a dialog to ask me if I wanna open application (I did not install my application yet). Although I accept to open app, nothing happens, it does not open Apple Store as expected
I have to use link like below to force it open apple store app
https://myapp.app.goo.gl/?link=http://mylink.com&ifl=https://itunes.apple.com/us/app/apple-store/idxxxxxxxx%3Fmt%3D8%26ct%3Dutm_source
Deep link with facebook app not work in android because facebook uses InAppBrowser, If you want to make your deep link url workable in facebook. You can change facebook settings like:
In Facebook App: Goto Profile -> App Setting -> check Links open externally.
After changing the setting you will be open deeplinks from facebook app android
[Asp.net website, .net framework 4]
I noticed a strange thing in my web page address, With every new page requested the address of the page automatically attached with somthing like (#.UTedxFc5stU) at the end of the address after loading completed (maybe cause redirect too), this happend with only .net framework 4 applications,
and not happend with my other applications using 3.5 !.
this happend in firefox, chrome only, not with internet explorer.
this an example:
http://egypt.motorsyard.com/cars/used, open it in firefox and you will see somthing like this http://egypt.motorsyard.com/cars/used#.UTehGVc5stU
what is this, and how I stop it ?
Thanks for help.
Check your webconfig for url rewriting code.
i think this is URL redirecting issue.
Edit
If you have characters that look like #.TuomlFaZCSo in the URL those are address bar tracking codes. They provide a way to see how many people visit your site from users copying the URL from the address bar. If you have characters that include the name of a service, like #.TuomlFaZCSo.facebook then those are people returning from a link shared using that service.
To disable them using the client API, do this:
<script type="text/javascript">
var addthis_config = {
data_track_address_bar: false,
data_track_clickback: false
};
</script>
If you want to disable them using the Wordpress plugin look for their respective checkboxes on the Advanced tab of the AddThis plugin settings page.
im doing a project with windows mobile .net framework
and i need to track every page with google analytics
therefore i create a web browser on every page and hidden it
the web browser will include a local html page
the html page has embed google analytics
however if i use traditional method or async method to integrate GA, it will throw js error with unspecified error, but the html is working if i put it to webserver
therefore i build a GA tracking image url to log the pageview and visitor count, however i found that the cookie can not be save, those every page will generate a new visitor count
any advise
If I understand your question correctly, you are simply trying to add GA tracking to your
WP7 app. If that is the case, you do not have to use a web browser or a tracking image to accomplish this. There is a project over on GitHub that will allow you to do this right in your .xaml pages.
https://github.com/maartenba/GoogleAnalyticsTracker
Get the code, compile it and add a reference to the lib in your phone project, then in your xaml code behind:
Loaded += (s, e) => {
using (var tracker = new Tracker("UA-XXXXXXXX-X", "appname")) {
tracker.TrackPageView("MainPage", "Main");
}
};
Put your GA account info in there for the Tracker object
And presto, you have GA tracking.
HTH