Ionic iframe issue when opening an external link - ionic-framework

I am trying to use an iframe inside my hybrid app. The iframe works perfectly, but it as some links inside that won't open when you click on them specifically when they are deployed to the iOS platform. It works in the browser view, but not in the iOS device. Is there a solution for this?

Put this in your confix.xml and try it.
<content src="index.html" />
<access origin="*" />

Related

Switch to a different activity from TWA

I've put together a PWA and wanted to convert it into an Android App.
I've done so and my Android app consists of Main Activity and TWA that I start from the Main Activity.
Is there a way to switch from inside the TWA to some other activity on some event in the PWA running in this TWA? Like button click. Preferably from the HTML/Javascript of the PWA itself.
The end goal is to ad ads to the app (I'm using some paid APIs in the PWA so I need to at least break even and cannot monetize it on the web development side since Google AdSense and likes need context rich web-apps like blogs) and I've figured out that Google AdMob don't show up in TWA, they require a native Android Activity.
This question is closely related but I don't know where to put this URI:
Launching another activity from a Trusted Web Activity (TWA)
Thank you!
Yes, it is possible to start a different Activity. You will need to define a custom schema and link to that schema from the PWA:
This is defined inside AndroidManifest.xml, where the Activity you want to open from the PWA is specified. In the example below, we want to open ReviewActivity from the PWA, so we define:
<activity android:name=".ReviewActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="doom-fire" android:host="review" />
</intent-filter>
</activity>
Then, in the web application, whenever you link to doom-fire://review, ReviewActivity will be opened:
Rate app now!
I wrote a complete blogpost for the in-app review use-case that you may want to check out.

How to add a flash game to my facebook APP

I tried adding a flash game to my APP.
I looked on the (terrible) facebook developer website. All I found was this page:
http://www.google.be/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCcQFjAA&url=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Ffbml%2Fswf%2F&ei=e-CXT4SAMMfpOamGqb8G&usg=AFQjCNGCKaCIDbWs0PrItofyEIlR4MSasg
But it says this will be legacy code and I should use a new method... I have no clue what that method is or where I can find it.
I tried these lines:
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://mywebsite.com/game.swf" />
and
<fb:swf swfsrc='http://mywebsite.com/game.swf' imgsrc='http://www.myurl.com/myflash.jpg' width='400′ height='300′ />
both failed... I'm desperate here, please help!
Just create an iframe application. That means create a page for your flash game to run on its own and then just point the iframe app to that url
Do exacly as on http://ugamesfree.com
Create a canvas app on facebook.
But remember, you need to have a SSL certificate to use iframes and redirects.

iOS web apps in the switcher

I would like to write a web application that behaves identically to transmission's (the BitTorrent client) web interface.
If you exit the web app, and then access the application switcher, transmission's icon is there.
All of the typical meta tags for ios web apps are leaving me with safari's icon in the app switcher.
Any ideas on how to achieve this behavior?
If you take a look at the web app source code you can see what it's doing.
The magic sauce is
<meta name="apple-mobile-web-app-capable" content="yes" />
and
<link rel="apple-touch-icon" href="./images/webclip-icon.png"/ >
All of this is documented in the Safari Web Content Guide

Android web app screen css help

I have a mobile application that I am building, it is made to support Android, iPhone and probably Blackberry. Most of the CSS and formatting is coded on a 1024px. I have formatted the site using an iPhone because it was in hand. After trying the site on an Android, the site seems to load as if the phone believes it is a full screen. So I only see a part of the page.
I use this line to have the app load correctly on the iPhone:
<meta name="viewport" content="width=device-width, user-scalable=no" />
Are there any methods for Android? If I remove the user-scalable=no I can double tap the Android screen and it will be the correct size, but ideally that isn't how the site should load.

Is is possible to create an icon for web app?

I am new to web apps. I read just about everyting of Apple's website about creating web apps for iphone but could not find any info on how do you create an icon that would be placed on user's phone that would launch the app.
I mean, is it possible to have an icon added to the iphone/ipad for a web app that would launch your web app the same was it launches the regular app?
See the Apple documentation on web apps,
Basicaly use:
<link rel="apple-touch-icon" href="touch-icon-iphone.png" />
(put it in your <head>)
If you don't want the shiny effect added to your icon use:
<link rel="apple-touch-icon-precomposed" href="touch-icon-iphone.png" />