trusted-web-activity

Launching another activity from a Trusted Web Activity (TWA)

ⅰ亾dé卋堺 提交于 2021-02-11 12:42:48
问题 I have problems trying to launch another activity from the TWA via the intent URI. "intent://#Intent;scheme=subscriptionschemetwa;package=com.package.www.twa;end" The package name is unique in reality, of course. I've played around with them, added host, action, extras etc. to URI, but nothing had an effect. As I'm new to native development, I'd appreciate some help. The app itself is not publicly available on Google Play yet (only internally), it's signed and packaged with Bubblewrap, and

Hide div in a Custom Tab opened from a Trusted Web Activity

空扰寡人 提交于 2021-01-29 05:10:34
问题 I have an Android app which uses Trusted Web Activity with an external link. When clicking link it opens in an in-app browser (Custom Tabs). I want hide a div in that Custom Tabs page, but I want to show that div when the site opens in Chrome. Is it possible? The div is like below. <div id="something" class="something"><a class="btn btn-primary" href="somelink">text</a></div> 回答1: Assuming the developer controls both sites involved, if the Trusted Web Activity is opening https://siteA.com and

TWA - Digital Asset Link OK but address bar still visible

人盡茶涼 提交于 2020-08-08 06:44:10
问题 I developed a Progressive Web App and I want to publish it in the Play Store as a Trusted Web Activity. It's https://www.bagnoadriatico.it Following this guide https://developers.google.com/web/updates/2019/02/using-twa I downloaded the example from https://github.com/GoogleChromeLabs/svgomg-twa I changed the configuration with def twaManifest = [ applicationId: 'com.simovinci.bagnoadriatico', hostName: 'www.bagnoadriatico.it', // The domain being opened in the TWA. launchUrl: '/mobile', //

Cannot understand how to open a simple TWA inside an app (using AndroidX)

狂风中的少年 提交于 2019-12-18 09:52:20
问题 I am trying to open a TWA inside my app and have researched for 2 days. I've already managed to create a single TWA app, no fuss, just edit the manifest and a few things more. Now I need to have my own app - let's say the app has a splash screen activity at first which then opens the TWA inside the app. Can I launch a TWA inside my app through a simple splash screen activity, for example? I did try to use CustomTabs way, but it says it is deprecated and to use TrustedWebActivityIntentBuilder

Cannot understand how to open a simple TWA inside an app (using AndroidX)

拟墨画扇 提交于 2019-12-18 09:52:12
问题 I am trying to open a TWA inside my app and have researched for 2 days. I've already managed to create a single TWA app, no fuss, just edit the manifest and a few things more. Now I need to have my own app - let's say the app has a splash screen activity at first which then opens the TWA inside the app. Can I launch a TWA inside my app through a simple splash screen activity, for example? I did try to use CustomTabs way, but it says it is deprecated and to use TrustedWebActivityIntentBuilder

NullPointerException when using Trusted Web Activities on Android (multiple devices)

自闭症网瘾萝莉.ら 提交于 2019-12-11 12:46:48
问题 I'm using TrustedWebActivities and I'm getting an immediate app crash on Samsung S8, S9, and Pixel 2 devices with the below Exception. Some research suggests that this might happen on devices where there's an older version of Chrome installed which doesn't support TWA and the fall-back method fails. But I've confirmed that the Chrome version is 71 (also, this works on Samsung S7, Pixel 3). java.lang.NullPointerException: at android.support.customtabs.TrustedWebUtils.launchAsTrustedWebActivity

Lock orientation in TWA

吃可爱长大的小学妹 提交于 2019-12-11 06:49:48
问题 I followed this article to make a TWA from a PWA. Everything is fine and the app feels like the PWA, but what I can't achieve is to lock the orientation to landscape. The manifest of the PWA has this: "orientation": "landscape", "display" : "standalone" So if you add it to the homescreen from Google chorme it works as intended. I tried setting the android:screenOrientation="landscape" in the manifest file and like this starts the app on landscape but it doesn't lock it. Anyone has tried

How can I detect if my website is running inside a Trusted Web Actvity?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 02:02:29
问题 I'm opening my page inside a Trusted Web Activity and I want to detect when it's being opened inside it to customize behaviour and for analytics purposes. How can I detect that the page is being opened from the TWA? 回答1: There are three options that will help detecting if the page is being opened from inside a TWA: When opening the page, the Referral will be android-app://<twa.package.name> , where twa.package.name is the package name used on the Android side of the TWA. Adding an URL

Trusted Web Activity - Address bar not hide (Chrome for Android 72)

我们两清 提交于 2019-12-06 19:31:39
问题 I've followed this guide to learn how to use a Trusted Web Activity. All fine but the address bar still appear. At begin I think it was because when the app was looking for assetlinks.json the response was 404. Fixed it but no luck on removing the address bar. Am I missing something? Chrome Version: 72.0.3626.96 Android Version: 7.1.2 (LineageOS 14.1) assetlinks.json [{ "relation": ["delegate_permission/common.handle_all_urls"], "target" : { "namespace": "android_app", "package_name": "com

How to create Progressive web app apk/any type of file that can be distributed in a enterprise devices

北战南征 提交于 2019-11-27 15:20:22
问题 Understandably, Progressive web apps(PWA) are added to home screen after the user visits the web app in supported browser(chrome for now I guess) and clicks on "Add to Home Screen". This works fine for publicly available PWAs. Thinking of Enterprise android applications, which needs to be installed to thousands of devices via some app push tools like Airwatch, its practically not possible to have someone open the browser, put the URL and then add to home screen in all thousands of devices. Is