Posts

Showing posts with the label Java

QML: Mixed native Android and QML animated splash screen

Image
In this blog two methods for show a splash screen has been proposed. One is based to pure QML code and show animations and the second is native Android way but static. Now a third method mixing both previous solution by allow a partially animated splash screen is proposed.

Java and https invalid certification error

Image
In case you are working under a restricted network with some particular proxy who have its own secure certificate system is possible you experiment some problem when Java runtime try to download something from an https address. Developing with Android Studio can show the problem cause try to download gradle package at first compilation.

Store and retrieve Android contacts photo

Image
Android default contacts are, basically, a database for store and retrieve phone contacts info. Here a short snippets showing a way to store and retrieve the photo of the contacts. Android contacts store photo in two format, large and thumbnail with two different way for retrieve it.

QML: Get Android signal strength level

Image
Second post regarding how to get system info from Android to QML. This post will analyze the way to install an Android listener to be advised when phone signal strength level change.

QML: Get Android battery level and status

Image
This post will explain a way to get Android battery level and status from QML. To be more precise will explain the way to install a sort of listener that will automatically advise the QML layer about changes in level of battery charge and the status of the phone (if on charge or not).

QML: Resize controls when Android virtual keyboard come up

Image
QML have currently a bug (current version 5.8 still have) in resize window when android keyboard come up. It happen when virtual keyboard is requested the QML window show a bad flicker by repaint the top control on the center of the screen and back on top again. This look really unprofessional.

Qt android: interface C++ and java through JNI

Image
The latest revisions Qt framework allow to port application developed in C++ code to run in Android OS also. For standard app the Qt framework provide all the required features but in some case is necessary to interact with the system using native java code. For make such task Qt provide some specific objects able to allow a more easy work.

Android: take a screenshot of a view

Image
There are some different ways to take a screenshot of a view. Here some code snippets ready to use in your app. The basic concept consists in render the content of the view into a bitmap.

Using Eclipse for develop Android app mixed Java and C/C++ code

Image
Eclipse is the "official" IDE proposed by Google for Android development. Usually Android app are written using Java code but for some specific task could be necessary to use native C/C++ code to interface with the Java side. Here a tutorial about how to configure Eclipse for a mixed Java and C/C++ code and how to develop it.

Android.mk and prebuilt static library

Image
Java language used in Android allow to communicate to external libraries written in C language through JNI interface. However is possible to use only dynamics libraries and there is no possibility, for obvious reasons, to use static libraries instead. In case you have a precompiled static library you need to use in your Android app you can create a dynamics as "wrapper" for your static library.

Install Oracle JDK 6 in Linux for Android compilation

Image
Latest distribution of Linux doesn't "officially" support the Oracle JDK 6 package anymore in their repositories. However product like Android still require this package for allow compilation. This mean we need to manually download and install it. The procedure is quite simple but need some steps to follow.