01 paź

How to fix Magic Keyboard (w/o Numeric pad) to work correctly with Ubuntu 20.04 LTS

If you would like to enjoy typing your favourite keyboard on Ubuntu as well, you need to change mapping on keys like:

  1. Left Control to Left Win
  2. Left Win to Left Control
  3. Right Option to Right Command

First two steps we will achieve using gnome-tweak-tool (how to install, check here). If you have installed successfully, open it, go to Keyboard & Mouse section -> Additional layout options -> Ctrl postion and check as shown on the picture below:

The 3rd step doesn’t work for me while I set up it through tool above. But it is quite simple to use it by one-liner in /etc/rc.local. I had to created it manually and configure permissions to chmod 755

#!/bin/bash
# switch opt with command key
echo 1 | tee /sys/module/hid_apple/parameters/swap_opt_cmd

And that’s all, now you can use commands and diacritics like on your mac 🙂

09 wrz

Android: MapFragment nested in parent fragment

Would you like to show map in your smart Android app? It is very easy, but after successfully passed some steps. In this tutorial I would like to make these steps with you to make the process faster and in a specific case – we will show our map in nested fragment.

Before funny work with the Android code we need to go through basic checkpoint list:

  1. Check if you have installed a Google Play Services in your Android SDK Manager. If no of course please install it! Second part of this point is to import the google-play-services-lib project into your workspace.
  2. Find your debug.keystore (or other) to list some details about it (like SHA-1 hash which is extremly important to accomplish next step.
  3. Create Google Maps API Key basing on SHA-1 from 2nd step and your application package name.

Read More

20 lut

Android with Eclipse: Conversion to Dalvik format failed with error 1 [solved]

During compiling some Android projects using Eclipse I had regular problems with exporting signed apk file. It is a known problem and everyone has his own solution to fix the issue. For my projects where I included many apk libs or jar files (Actionbarsherlock, gson, etc…) every export was finished with result:

Eclipse Android dalvik format failed with error

Conversion to Dalvik format failed with error 1

or my Eclipse crashed or the package was corrupted 🙂 It was very frustrating. It was not problem with Proguard. The solution is very simple. Before you start to create signed apk file you should:

  • go to Project menu -> disable Build Automatically…
  • after that Project -> Clean.. and clean all yours projects you use to create your apk ( uncheck Start a build immediately)

eclipse.clean_.android.without.recompile

  • and now right click on the project -> Android tools -> Export signed application package…

Works for me on my workstations with Windows. And you still have problems with that?

22 mar

Scanning and generating barcodes using ZXING library on Android

logoThe most popular all-in-one codes library for Android is zxing. Everyone used a Barcode scanner app based on this lib. But this library provides also ability to generate codes. In this example I show you how scan 1D code – Code 128. Code 128 is a very popular type of 1D code. After scanning, we obtain scanned information and… encode again to show on Android device for further scanning. Let’s go!

What we need:

14 cze

Andlytics [*]

Od kilku dni nie mogłem korzystać z bardzo przydatnej aplikacji Andlytics dla twórców oprogramowania, którzy udostępniają swoje dzieła na Google Play. Dziś przeczytałem na kanale Twitter programu, że dalszy rozwój i poprawki programu są już niemożliwe! Wszystko przez Google’a, który wprowadził XsrfToken, aby uniemożliwić ataki CSRF. Teraz trzeba znów za każdym razem łączyć się przez panel deweloperski Google’a, który nie jest zbyt szybki. Będę tęsknił!