Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit fec4786

Browse files
committed
Finished new article
1 parent 5b4c699 commit fec4786

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

_drafts/2019-05-10-intersection-observer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export { lazyLoadImages }
128128

129129
There's still one thing that I didn't discuss yet. How can we support this type of lazy loading for the browser that doesn't still have implemented the `IntersectionObserver` API? The answer is the [Interserction Observer Polyfill](https://github.com/w3c/IntersectionObserver/tree/master/polyfill). I installed as a dependency of my project.
130130

131-
```
131+
```shell
132132
npm install --save intersection-observer
133133
```
134134

_drafts/2019-06-15-google-play-store-publish-pwa.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: post
33
title: "Publish your Progressive Web App to the Google Play Store"
44
description: "You can now publish your PWA to the Google Play Store using Trusted Web Activities"
55
date: 2019-06-15
6-
image: XXXX
6+
image: /assets/images/posts/pwa-google-play-store.jpg
77
tags: [android, pwa, java, mobile application development, web development, javascript]
88
comments: true
99
seo:
@@ -57,12 +57,12 @@ The declaration of the TWA inside the Android app manifest must include some imp
5757

5858
{% include blog-lazy-image.html description="pwa app twa declaration" src="/assets/images/posts/pwa-app-04-twa-activity-declaration.png" %}
5959

60-
Now I need to establish the link between our PWA website and our PWA app. This is a two way operation because I need to:
60+
Now I had to establish the link between our PWA website and our PWA app. This is a two way operation because I had to:
6161

6262
* establish an association from app to the website
6363
* establish an association from the website to the app
6464

65-
This associations will remove automatically the url address bar from the TWA activity. In this way the Android app will full screen as a standard one (and as a PWA in standalone mode :smirk:).
65+
This associations removes automatically the url address bar from the TWA activity. In this way the Android app will be full screen as a standard one (and as a PWA in standalone mode :smirk:).
6666
Let's start from the first association, from the app to the web site. To do this I created a new string resource inside the `strings.xml` file. This new string resouce contains the Digital AssetLink statement that you can see below.
6767

6868
```xml
@@ -81,7 +81,7 @@ Let's start from the first association, from the app to the web site. To do this
8181

8282
{% include blog-lazy-image.html description="pwa app Digital AssetLink statement" src="/assets/images/posts/pwa-app-05-associate-app-to-web-1.png" %}
8383

84-
I can link this string resource statement inside the Android app manifest by adding a new `meta-data` tag as child of the `application` tag (NOT inside the TWA declaration).
84+
Then I linked this string resource statement inside the Android app manifest by adding a new `meta-data` tag as a child of the `application` tag (NOT inside the TWA declaration).
8585

8686
{% include blog-lazy-image.html description="pwa app Digital AssetLink statement manifest" src="/assets/images/posts/pwa-app-05-associate-app-to-web-2.png" %}
8787

@@ -94,14 +94,27 @@ It is possible to test that the association from app to the website has been com
9494
adb shell "echo '_ --disable-digital-asset-link-verification-for-url=\"https://www.fabrizioduroni.it\"' > /data/local/tmp/chrome-command-line"
9595
```
9696

97-
After this setup if I run the app from Android Studio the address bar is gone :relieved:.
98-
Now I need to finish the development by establishing an association from the website to the app. ..........
97+
After this debug setup the app is launched withoutthe address bar :relieved:.
98+
Now I need to finish the development by establishing an association from the website to the app. To do that I needed 2 information about my app:
9999

100+
* the package name
101+
* SHA-256 Fingerprint
100102

103+
The first one was easy to get. I just needed to open the Android manifest file and get it. The second piece of information I needed is inside the keystore that contains the release signing key used to publish the app on the Google Play store. So the first operation I did was to generate a new release signing key. You can find the [standard procedure to get one in this page](https://developer.android.com/studio/publish/app-signing#generate-key). The key created was contained inside a keystore file. So in order to be able to extract the SHA-256 fingerprint from the keystore that contains my release signing key I used [keytool](https://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html 'keytool'). You can find the exact command I used below. The value for the SHA-256 fingerprint is printed under the Certificate fingerprints section.
101104

102105
```shell
103106
keytool -list -v -keystore <your keystore jks file> -alias <your alias> -storepass <your store psw> -keypass <your key psw>
104107
```
105108

109+
With both pieces of information at hand I was able to generate a web `assetlink.json` statement using the [assetlinks generator](https://developers.google.com/digital-asset-links/tools/generator). The `assetlink.json` generated must be served from the PWA domain from the URL `<your PWA domain>/.well-known/assetlinks.json`.
106110

107111
{% include blog-lazy-image.html description="pwa app Digital AssetLink generator" src="/assets/images/posts/pwa-app-07-assetlink-generator.png" %}
112+
113+
After publishing the `assetlink.json` to my PWA domain my app was ready to be published to the store. So I followed the standard procedure [to upload an app to the Google Play Store](https://developer.android.com/studio/publish/upload-bundle).
114+
If the two ways association fails, it is possible to check for error messages using the the Android Debug Bridge, by launching from the terminal the following command with the test device connected (or the emulator running).
115+
116+
```shell
117+
adb logcat | grep -e OriginVerifier -e digital_asset_links
118+
```
119+
120+
Now my blog PWA is published to Google Play store. Go and download it immediately :cupid: !!!!

_drafts/2018-10-28-clean-code-functions.md renamed to _drafts/2019-07-28-clean-code-functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
layout: post
33
title: "Clean Code: functions"
44
description: "In this post I will talk about clean code and functions."
5-
date: 2018-10-28
6-
image: /assets/images/posts/XXXXXXXX
5+
date: 2019-07-28
6+
image: /assets/images/posts/uncle-bob-defender-of-clean-code.jpg
77
tags: [clean code]
88
comments: true
99
seo:
@@ -14,7 +14,7 @@ seo:
1414

1515
---
1616

17-
In a previous post I talked about [clean code](/2018/04/25/clean-code-objects-data-structures-law-demeter.html) and how much it is important to me.
17+
In a previous post I talked about [clean code](/2018/04/25/clean-code-objects-data-structures-law-demeter.html) and how much it is important to me.
1818
In this new post I will talk about another topic of the uncle bob clean code book: functions.
1919
How can we have write a good function/method? This is the list of the features that a function
2020
must have to be considered "good":
89.7 KB
Loading

0 commit comments

Comments
 (0)