Chrome App position, relative to browser window - google-chrome-app

Hi I'm trying to create chrome app that will track the browser window position,
(Sorry for the lame question, it's just so hard to find information with the words 'chrome' and 'app' on SE)
P.S I want to create chat app that will dock to the browser window instead of the screen

Unless I'm misunderstood, Chrome apps are written in Javascript.
Piggybacking off the answer from here:
X - window.screenX
Y - window.screenY
Keep in mind, implementations vary (non-issue for a chrome app). Beware of multi-monitor setups...

Related

Wear OS 2.0 - Is there any way to process html, web page, programmatically?

I can't seem to find ANY information on Android Wear OS and html. My end goal is just to show a simple web page with buttons for IOT control. I have all the backend already. I know I can use other views but my backend dynamically creates a page of buttons. I'm open to other ideas for dynamically building an interface. I know webview isn't supported. I found crosswalk-project but it's no longer maintained and seem too complex for my needs.
GeckoView might be a good starting point https://firefox-source-docs.mozilla.org/mobile/android/geckoview/consumer/geckoview-quick-start.html
https://searchfox.org/mozilla-central/source/mobile/android/geckoview_example
But it probably won't be a great experience.

How do I use Chrome's Developer Tools to catch the end destination for a click-event?

As a policy for security I want to stay logged-in by default to my social media networks, but I do not want external desktop links to open in my browser that is logged in. So my default browser-mode is --incognito. I have an issue with Chromium's Signal App crashing when my browser is set to default in incognito mode. This much I've figured out.
I want to have a bookmark that I can manually run in my logged in browser to run the Signal app.
The Chrome web store provides one such link. I can run signal by running Chromium outside of incognito mode and clicking in the webstore LAUCNH APP. I would like to use the Developer Tools to catch that even and know what the end-url is that triggers the Signal App.
How do I go about introspecting that?
I don't really understand the specifics of your use case, but going off of the title of your question, perhaps this will help:
Set an event listener breakpoint for Mouse > click.
Click on the element to trigger the listener(s).
Step through the code.

Progressive Web App, I am trying to maintain same screen when minimize or maximize in iphone

In Android, When I minimize and maximize, the app maintain the same screen what I saw previously.
In iPhone, When I minimize and maximize, The app not maintaining the same screen. reload from home screen.
Full screen implementation web app for IOS is quite different when compared to that of android. If you are running your web app in full screen mode in IOS, minimize the app and maximize again, IOS considers it as fresh start so all the session cookies(cookies having session as timeout) will be cleared on minimize. so if you have cookies related to session, they all will be cleared. However you can try implementing html caching(using cache.manifest) to cache the pages. I've not personally implemented this but it might help. All the best

Single web app for all device?

When i create web app for all mobile devices, what are all things need to follow,
Is it enough to create single html app for all device?
Or, create every single app for a device based on web browser?
Is there any Framework has overcome above mentioned issues?
Thanks in advance,
sri
No - different phone browser have different levels of HTML compliance. Compare iPhone/Android browser with, say, a 3 year old Nokia phone (that most corporate users probably have to use)
No - there are far too many browser/device/operator combinations for you to write individual web apps. This is known as the mobile web fragmentation problem.
Luckily yes - have a look at http://wurfl.sourceforge.net/ or http://deviceatlas.com/. These frameworks let you write one web app (within some limits). These frameworks will recognise the browser (through the User Agent) and output the most appropriate HTML for that device. They can also deal with issues like resizing images for lower end devices.
You need to be aware of the screen size as i think it's bad form to have to scroll left and right as well as up and down.
also, keep the page sizes small as your page may not be the only one open so you want to give users the ability to open more than a single page. also helps in speed and keeping the cost for the user down.
remember to have text size at a readable scale as mobiles are used not only stationary but also when in motion and being bumped around.

automatic zoom on iphone safari

Is there a way for Mobile Safari to recognize a site meant for mobile phones and automatically zoom in? How does that work on other phones and browsers?
I'd like to avoid looking at user_agent and sending a different page for each mobile browser.
See the configuring the viewport part of the Apple web-app developer guide.
I just noticed that if you have your body or main wrapper div height set to 100%, this can mess with how far out it zooms/renders on a mobile browser. Confirmed this in mobile safari and android's chrome browser. Once I set the #siteWrapper height from 100% to auto, it then rendered at a much better scale.
(height 100% on a main wrapper is often used with sticky footers.)
Sites can recognize a mobile browser and produce output accordingly, that's usually the desired way.
Safari will detect the width and zoom-to-fit, but beyond that...
You can avoid having different pages based on User Agent by using conditional CSS. Apple actually has some very good documentation on creating web pages that can support Safari on the iPhone along with desktop browsers.
I would recommend starting with reading iPhone Human Interface Guidelines for Web Applications. This will give you a good start in using conditional CSS to customize pages on the basis of device characteristics (such as screen size) rather than User Agent.