GithubHelp home page GithubHelp logo

Comments (12)

andreban avatar andreban commented on July 17, 2024 1

There's a Chrome issue open to improve the process of changing the status bar color, without having to copy LauncherActivity here

from svgomg-twa.

andreban avatar andreban commented on July 17, 2024

Would you mind posting the question on StackOverflow: https://stackoverflow.com/questions/tagged/trusted-web-activity/

It makes it easier for other developers with the same issue to find the solution, and for other developers to help with answers too.

from svgomg-twa.

SvenBudak avatar SvenBudak commented on July 17, 2024

Oh i did: https://stackoverflow.com/questions/54659396/android-studio-change-statusbarcolor-of-webview

But it seems that not many peoples have knowledge about TWA stuff yet. Maybe to new thing? :) but i understand that this is the wrong place for questions.

from svgomg-twa.

andreban avatar andreban commented on July 17, 2024

Answered the question on StackOverflow. Closing the issue here.

from svgomg-twa.

a-haan avatar a-haan commented on July 17, 2024

Hi @BamiGorengo would you mind sharing a Gist of the changes you made to LauncherActivity.java - I've followed the stack question but still having issues such as:

Cannot resolve method 'showNoPackageToast(

Cannot resolve method 'promptForChromeUpdateIfNeeded

Cannot resolve method 'warmupIsRequired

launchAsTrustedWebActivity() in TrustedWebUtils cannot be applied to:
Expected Parameters:
Actual Arguments:

context:
Context
LauncherActivity.this  
session:
android...customtabs.CustomTabsSession
intent  (android...customtabs.CustomTabsIntent)
intent:
android...customtabs.CustomTabsIntent
url  (android.net.Uri)
uri:
Uri

from svgomg-twa.

SvenBudak avatar SvenBudak commented on July 17, 2024

@a-haan I will write a article about this when im back home in 3 days. meanwhile you can take a look on my article where i explain some stuff: https://link.medium.com/9vVurMuhoU

there is also a link to stack overflow where you can read all you need to do the thing with the statusBar.

from svgomg-twa.

a-haan avatar a-haan commented on July 17, 2024

@BamiGorengo Thank you, interesting read! I've got mostly everything setup except for the status color bar, so looking forward to your guide 👍

from svgomg-twa.

SvenBudak avatar SvenBudak commented on July 17, 2024

@andreban good news! thanks for this!

Can you maybe share us also a description how to add a splash /loading screen that waits that the chrome instance is finish loaded before it fades out? I want to write an extended tutorial about this, but i have 0 idea how to start this.

from svgomg-twa.

andreban avatar andreban commented on July 17, 2024

@BamiGorengo this sample from CustomTabs helps with that. We're looking into how to make this easier using LauncherActivity too, so it may be worth waiting a bit too.

from svgomg-twa.

a-haan avatar a-haan commented on July 17, 2024

@BamiGorengo @andreban I've got a feeling the instructions you provided in the Stack question didn't work because my project was built by PWA2APK originally, I will build again from scratch and see if that works okay. I get odd issues atm that appear on my app such as a crash on startup if my default browser is Samsung or Firefox. Yet @BamiGorengo App doesn't have the same issues...

from svgomg-twa.

SvenBudak avatar SvenBudak commented on July 17, 2024

@andreban hmmm i cant find any code snippet there that seems to do any splash screen stuff... it make not maybe more sense to use the web manifest to automate the statusBar color and Splash screen? that make for me most sense...

from svgomg-twa.

a-haan avatar a-haan commented on July 17, 2024

@BamiGorengo @andreban rebuilt now all working as expected including the toolbar colour, no more crashes as you'd expect!

I can seem to find a similar way to change the navbar colour to dark instead of light mode though, which is a shame because my PWA is in darkmode

from svgomg-twa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.