Paolo Amoroso's Journal

Android

Large tablets and desktop screens are the best for reading PDF ebooks and files.

However, a medium-size Android tablet is the next best thing as tweaking the Google Play Books reading settings provides an acceptable experience. Under these conditions, Google Play Books works better with PDFs than Kindle for Android.

This setup is helping me read more PDF ebooks unlike with my previous tablet, a 7” Lenovo Tab E7. On its small screen, the text of nearly all PDF ebooks and files was too small no matter what reading options were set. Landscape mode didn't help much.

Let’s see why PDFs require specific reading tools, what my setup is, and how I read PDFs.

Reflowable vs fixed-layout ebooks

With reflowable ebook file formats, such as ePub and Mobi, reading apps rearrange the text and other content to fit any screen size, much like web browsers do with HTML pages. Text fills the viewing area while maintaining a comfortable, legible size.

In fixed-layout ebooks like PDF files, the pages have a predetermined size and the text, images, and other document elements are fixed in size and laid out on the page at specific locations. The result looks like the pages of printed books. By default, reading apps zoom out the full page to fit the screen. The smaller the screen, the smaller the text. In addition, blank margins waste part of the page.

This makes it impractical to read PDFs on the screens of smartphones and small tablets. Reading apps allow zooming in the page until the text is legible. But, like looking through a keyhole, you view a small portion of the content at a time and have to drag around the page to bring into view the rest.

Minimum viable tablet

Up to the current one, I always owned 7” tablets like the Lenovo Tab E7.

While great for reflowable ebooks, a 7” screen is too small for comfortably reading nearly all PDFs. Even with the reading settings I discuss here, text remains small. The low resolution of cheap devices pixelates small text and doesn’t help legibility either.

After the Lenovo Tab E7, I switched to a Lenovo Tab M8 HD 8” tablet. An extra inch is enough to make a difference in the PDF reading experience. The screen has the right size so that the text area on the page, when zoomed in to fit the screen width, is large enough for comfortable reading. The low resolution of the Lenovo Tab M8 HD screen doesn’t affect legibility much, as the panel doesn’t degrade it.

With this 8” device, all it takes for a satisfactory experience with PDF files is to turn on two options of the Google Play Books reading settings.

Google Play Books reading settings

Two specific options improve the reading experience with Google Play Books. Although turning them on is a one-time action, there’s an adjustment I need to make at the beginning of every reading session of PDF ebooks.

The one-time options are accessible by opening a PDF book and tapping the page, which brings up the reading controls. Next, I tap the Aa icon and, under Zoom, turn on the Remember zoom and Tap to scroll options. These are the options on my Lenovo Tab M8 HD:

Google Play Books fixed layout reading controls on Android.

Once the one-time configuration is complete, the first thing to do at each new session is to pinch the page to zoom in until the text area fits the width of the screen, with little or no margin. The Remember zoom option preserves that width for the duration of the session. In the example of the previous screenshot, this is the page after zooming the page to fit:

PDF ebook adjusted to fit the screen in Google Play Books on Android.

In most cases, some vertical scrolling is still required to bring the bottom of the page into view.

When turning a page, the zoom level is usually reset and I’d have to drag the text area again to match it to the screen width. This is where the Tap to scroll option comes in, as it lets me scroll down and turn the page by tapping one of the screen's edges. The option takes care of maintaining the text area centered horizontally, with full lines always in view.

These settings and adjustments go a long way to enabling reading more content on compact and affordable devices.

#Android #ebooks

Discuss... Email | Reply @amoroso@fosstodon.org

A few years ago I bought a cheap Bluetooth keyboard from Amazon.it. At €14, it was mostly an impulse buy for exploring mobile typing on the go and similar settings, such as work stations with limited desk space. This is the device:

I initially used the keyboard with the Android tablet and smartphone I had at the time, a 7” Lenovo Tab E7 and a Pixel 2 XL. I later repurposed the keyboard for the devices I replaced those with, a Lenovo Tab M8 HD 8” tablet and a Pixel 4 XL smartphone. Here is the keyboard with the Lenovo Tab M8 HD:

Despite the simplicity, it took me some trial and error to figure how to pair the keyboard and what keystrokes insert the symbols I need, such as accented letters. So I’m posting these notes in case you come across the same or similar keyboards.

Hardware and packaging

The keyboard is a cheap, compact, plastic 7” chiclet unit that comes with a small foldable stand to hold a tablet or phone. To charge the keyboard I plug it into my Chromebox via the keyboard’s mini-USB port.

The product and packaging have no branding and Android identifies it simply as “Bluetooth Keyboard”. The Amazon listing indicates FREALL as the manufacturer and 7INKEYBD-BK as the model.

The instruction sheet isn’t of great help for learning how to operate the keyboard. The document is short, incomplete, and inaccurate. But reading the Amazon reviews helped me understand the pairing procedure. I discovered the rest by experimenting.

Pairing

Although the keyboard can work with different mobile and desktop operating systems, I use it only with Android and this is the experience I’m sharing here. To pair the keyboard with an Android device:

  1. turn on the keyboard
  2. on the keyboard, press CONNECT
  3. on Android, turn on Bluetooth and start the pairing flow
  4. on the keyboard, press Fn+Q
  5. on Android, tap the keyboard entry
  6. on the keyboard, type the pairing code Android prompts to enter
  7. on the keyboard, press Enter

After pairing is complete, on your Android device you’ll get a notification prompting to configure the keyboard by selecting a language and layout. This step may not be necessary.

From now on, to use the keyboard enable Bluetooth on Android and turn on the keyboard, which should connect automatically.

Keyboard shortcuts

The keys hold up to four labels for entering symbols, controlling media playback, or executing commands.

Accessing most of the symbols or functions of a key is often self-explanatory. For example, to type a blue symbol on a key, press that key while holding the modifier key with the blue Fn label.

Typing other characters or executing commands not printed on the keys is harder, so I include below some lists of useful keystrokes.

Symbols

You can directly insert the symbols in the following table by pressing the corresponding keystrokes. To type an accented character, press the keystroke that selects the accent you want and then press the character. For example, to get an e with a grave accent, è, press Alt +` and then e.

Keystroke Symbol
Alt+E é
Alt+ ` grave accent
Alt+U umlaut
Alt+I ~
Alt+S ß
Alt+c ç
Alt+N

Android commands and actions

The keyboard accepts the standard Android keyboard shortcuts. I found a few more and listed in the table below the ones that are handy, little known, or frequently used.

Launching apps

To launch one of these apps, here are the corresponding shortcuts:

Keystroke App
type search query Google Search
command Google Assistant
command+B Chrome
command+C Google Contacts
command+E Gmail
command+L Google Calendar
command+S Google Messages

Actions

The keyboard lets you invoke other Android features and navigation actions. Here are the ones I found:

Keystroke App
Alt in text field emoji selector
control+Enter set focus
command+Delete Back
command+Enter go to home screen
command+N open notifications shade

#Android

Discuss... Email | Reply @amoroso@fosstodon.org

Back when the Pixel 4 XL was Google's latest Android flagship, JR Raphael wrote a great piece on the insanity of smartphone screen notches and holes: The enduring absurdity of our smartphone bezel obsession. He pointed out the compromises punching holes into and cutting out screen areas in the name of no bezels imposes for little or no design gain, which often defeats the whole point of making those changes in the first place.

In the later article No, the Pixel 4’s bezels are not a major crime against smartphone design, Andy Boxall discussed why having bezels is not an issue and the dislike for bezels is largely irrational.

Beyond aesthetics, there are drawbacks to using a device with thin or no bezels.

I can’t tell how many times I inadvertently touched unwanted user interface elements of apps on my old Pixel 2 XL phone and my current Pixel 4 XL, which have some bezel. For example when I grab the device ringing for an incoming call, which often results in a declined call because I touch the wrong areas close to the edges of the screen.

Bezels actually have advantages as they can accommodate the parts screen notches and holes house, such as cameras and sensors.

I use only Google phones, despise screen notches and holes, and wish Google focused on substantial features such as improving optical zoom (Super Res Zoom doesn’t qualify) rather than chasing questionable design decisions and fads with collateral damage like missing bezels.

The Pixel 4 XL was Google's last phone with bezels and no screen mutilations. What I hoped was a fad turned into a design trend and later Pixels came with screen holes.

My Pixel 4 XL is close to the end of life and I need to replace it with the upcoming Pixel 7 Pro. Guess what? It has a screen hole, I'll have to deal with it and get the device anyway.

Stop mutilating screens. I want my bezels back.

#Android

Discuss... Email | Reply @amoroso@fosstodon.org

First reading about Flet made me jump over my chair as it's what I was long looking for, a solution to my web and Android development needs. Flet is an opinionated, Flutter-based GUI framework for creating multi-user web, desktop, and mobile applications.

What I was looking for is an easy way of creating simple web and Android apps in Python. Web frameworks such as Django are overkill and too low level for me, and in most cases require JavaScript or other non-Python frontend code.

As for mobile, although there are Python frameworks for Android development like Kiwi and BeeWare, they come with the ballast of a heavy Java and Android SDK toolchain.

Flet overcomes these issues. It enables creating web apps that hide a web framework under the hood. And, without touching Java, Flet can make also PWAs that run on Android and other mobile platforms. All from the same fully Python code base. Plus, deploying Flet web apps to my favorite Python environment, Replit, is well supported and straightforward.

I'm closely following the development of Flet and will experiment with the framework.

#Android #Python

Discuss... Email | Reply @amoroso@fosstodon.org

ChromeOS 104 delivered the ability to access USB serial devices from Android, an option for controlling the Z80-MBC2 computer from an Android terminal emulator app.

I didn't realize chromeOS 104 improved the support for accessing USB serial devices also from web apps implementing the WebUSB API. On my Chromebox, version 104 is the first that enables controlling the Z80-MBC2 from the web. Here's a CP/M 3.0 session in a serial terminal emulator web app:

USB Web Serial terminal emulator web app running a Z80-MBC2 CP/M 3.0 session on chromeOS.

Up to chromeOS 104, web terminals failed to connect to the Z80-MBC2 as they didn't detect the USB device. With version 104 I tested the following terminal apps, most of which work:

These apps operate the same way. A connection button brings up a system dialog listing the serial devices, like the Z80-MBC2's CP2102 chip. Once connected, the apps behave like other terminal emulators.

Although useful as an additional option for controlling the Z80-MBC2 on chromeOS, these web terminals are experimental or basic apps, have limited functionality, and miss major features like XMODEM file transfer.

#z80mbc2 #sbc #Android #chromeOS

Discuss... Email | Reply @amoroso@fosstodon.org

ChromeOS 104 landed on my Chromebox delivering a pleasant surprise, the ability to access serial USB devices from Android apps.

When I plugged the Z80-MBC2 Z80 homebrew computer into the Chromebox under chromeOS 104, the system popped up this notification allowing me to connect the device to Android or Linux, not just Linux as before:

chromeOS notification allowing to connect a Z80-MBC2 serial USB device to Linux or Android.

The notifcation confirms the detection of the Z80-MBC2's CP2102 chipset and says:

USB device detected

Open Settings to connect CP2102 USB to UART Bridge Controller to Linux or Android apps

Connect to Linux Connect to Android

I had long been looking forward to accessing the Z80-MBC2 from Android. I researched a great terminal emulator app, Serial USB Terminal, which can connect to serial USB devices, features basic ANSI support, and can transfer files via XMODEM. Although the app runs fine on the Chromebox, I never figured how to connect to the Z80-MBC2. It turns out it wasn't possible, until chromeOS 104.

Selecting the notification's option to connect to Android prompts to run Serial USB Terminal, optionally setting it as the default app for Android connections.

I interacted a bit with the Z80-MBC2 from the Android terminal emulator and it's usable. Here's what a CP/M 3.0 session looks like in the app in landscape tablet mode, the window layout that works best with a terminal:

Serial USB Terminal Android app running a Z80-MBC2 CP/M 3.0 session on chromeOS.

Input goes in a text field separate from the terminal output. It feels awkward on the desktop but natural on mobile devices with touch interfaces.

Serial USB Terminal's ANSI support seems limited or incomplete, but I haven't checked extensively.

I tried transferring a file via XMODEM from the terminal emulator to the Z80-MBC2 under CP/M 3.0. But, as with Crostini Linux, nothing happens and the XMODEM transfer doesn't work. More experimentation may provide clues on the XMODEM issue.

So far I haven't played with the Z80-MBC2 much from Android, but it's great to have another option for controlling the device.

#z80mbc2 #sbc #Android #chromeOS

Discuss... Email | Reply @amoroso@fosstodon.org

Back in the CP/M and MS-DOS days, developers shipped software with all sorts of device drivers to support such basic peripherals and system services as terminals, graphics cards, mices and input devices, memory management, mass storage units, printers, network equipment, and more.

Every developer pretty much had to reinvent the wheel. Yet the industry thrived, and many software houses and independent programmers published successful applications and games.

These days mobile developers gripe about Android fragmentation, a consequence of the success of open platforms like CP/M and the IBM PC.

#Android #development #retrocomputing

Discuss... Email | Reply @amoroso@fosstodon.org

Since getting a Xiaomi Redmi Watch 2 Lite smartwatch I've been monitoring the battery usage of the Mi Fitness (Xiaomi Wear) companion app for Android. On my Pixel 4 XL phone, with the watch turned off battery usage was at 10%, then dropped to an acceptable 4% a couple of days later.

I'll wear the watch mostly when on the go, so I want to control the resources the app consumes when the device is not in use.

#Android #smartwatch

Discuss... Email | Reply @amoroso@fosstodon.org

I bought a Xiaomi Redmi Watch 2 Lite smartwatch for use with my Pixel 4 XL Android phone. Here's the product packaging.

Xiaomi Redmi Watch 2 Lite product packaging

I wasn't familiar with Xiaomi's line-up of smartwatches but an Android Police article drew my attention to the Watch 2 Lite. I realized it's what I was looking for as it has the features and price point I want in a smartwatch.

Why did I get the product? Is it any good?

Motivation

I loved the glanceability and essentiality of the early Android Wear. Then came apps and Android Wear — later Wear OS — smartwatches became expensive, bloated, dog slow, and clumsy smartphone replicas.

All I want in a smartwatch is a cheap device that mirrors my phone's notifications, with vibration for incoming calls as a plus. Exactly what the Android Police article advocates for, highlighting the Watch 2 Lite as an example.

Although I don't care about fitness tracking, the Xiaomi Mi Band seemed perfect. I tried a Xiaomi Mi Band 4 but returned the product, as the screen was too small and notifications were barely legible with my prescription glasses.

The 1.55” display of the Watch 2 Lite seemed large enough. At a price not much higher than the Mi Band's, I decided to give it a shot.

Hardware

I've been using the Watch 2 Lite for over a day and text is comfortably legible with my glasses, particularly the text of notifications. Withouth glasses I can even read most large text. For example, the options of the system settings menu look like this.

System settings menu options on the display of a Xiaomi Redmi Watch 2 Lite smartwatch

The device is light and feels comfortable on the wrist. I don't care much for the design, which is good enough for me.

Touch sensitivity seems uneven. At times I have to tap icons or perform gestures more than once to make the actions go through.

The reviews of the Watch 2 Lite warn about the one-second delay between activating the display and it turning on, so it's something I expected. But the delay may be less of an issue than anticipated because, by the time I raise the wrist close to the eyes to view the screen after pressing a button to activate it, the display has already turned on.

It's still early to evaluate battery life. I turned off the fitness tracking features and functionality I don't need, so I expect it to be higher than average. Something to watch for is the battery usage of the Mi Fitness (Xiaomi Wear) companion app for Android, which is constantly at 10% on my Pixel 4 XL even with the smartwatch turned off.

Software

It didn't take much to familiarize with the few features of the smartwatch. The notifications shade is just a swipe-down gesture away from the home screen.

The companion app Mi Fitness (Xiaomi Wear) is a bit confusing though, especially when signing up for a new account. But, again, exploring the app clarifies how it works.

#Android #smartwatch

Discuss... Email | Reply @amoroso@fosstodon.org

I'm among those who think the best camera is the one I carry with me.

There's no grand scheme motivating my choice not to get a traditional camera, using instead my smartphone for on the go and travel photography. It's hard to beat a compact and light device I always have handy.

In my trip to Florida to view a rocket launch from Kennedy Space Center, I took photos with my current smartphone, a Google Pixel 4 XL. Its camera recorded the two rocket launches I ended up viewing, the space facilities and museums I visited, and general travel photography.

How did the 4 XL camera fare?

Distant subjects and rocket launches

Despite having been released almost three years ago, the 4 XL still holds up well.

The camera works best when the subjects fill most of the frame. But my daylight photos at Kennedy Space Center show also good detail of distant vehicles, such as the Crew-4 Falcon 9 rocket at launch complex 39A and the SLS rocket at 39B. The photos bring out also enough detail of the daylight Starlink 4-14 launch, despite the dynamic action and the high tonal range difference between the rocket structure and the bright exhausts.

The 2X optical zoom helped make distant subjects large enough to reveal detail better. However, I wish I had a latest generation flagship device with a more powerful optical zoom to enlarge those subjects a bit more.

Night launches

Where the 4 XL camera fell short is with night photography of dynamic events.

My photos of the Crew-4 night launch didn't record much light to reveal the complex detail and delicate tones of the exhaust plume of the ascending rocket. At that point, the booster was too far and not lit enough to show any detail.

As for the launch itself, from when the rocket engines ignited to when the booster cleared the tower and began ascending, the performance of the 4 XL was similar to that of the newer generation devices the friends who traveled with me used. In my photos, the ascending rocket looks like a saturated blob of light. The tonal range was so high, with the black background of the night sky contrasting with the blinding rocket exhausts, that not even recent smartphones may adequately capture and present it.

Wide-field photography

This travel experience with the 4 XL camera made me change my mind on lenses.

I thought a wide-angle lens wouldn't be useful to me, as I don't do much landscape or people photography, and preferred a lens with optical zoom.

However, by shooting photos at Kennedy Space Center, I realized that, without a wide field of view, it's hard to frame large and close objects in full — or nearly in full — without cropping. A wide field lens would have come in handy, for example, to shoot the Atlantis Space Shuttle or the Saturn V. You can come very close to these vehicles, which is a challenging observation point for framing.

#Android #space

Discuss... Email | Reply @amoroso@fosstodon.org