Skip to main content

Posts

Showing posts from 2015

Pinpic : a new mobile app

I am happy to announce that I have published a new application on Google Play, named as Pinpic. It is under photography category. It is a very useful and user-friendly application to specialize photos by pinning anything on them. What it does may seem quite common but in practice it has new and unique features. What are they? Well. Pinpic enables users to write on pictures as many as they want with different properties. Their style(e.g. italic, bold, text color, alignment etc) are easily configurable. It not only has great fonts for latin alphabet but also supports Cyrillic, Hangul, Katakana and Hiragana with many fonts. What if I want to use my own drawings on a photo? Pinpic is here for you. You can draw any thing as many as you want. By resizing, changing thickness and color of lines, drawing style; you can make your drawings more enthusiastic. This feature is just on the way. Wait, there is more. Motifs are great arts to pin on your photos. They will definitely create so cool...

[Android] How to fill outside of drawing with Paint

Android provides many drawing actions via paint. It has several features which provide great flexibility. I have needed a feature nowadays, such that a user can draw shapes or lines. At the end of the job, a user should be able to change color of outside part of drawing. Figure 1 : Example output For this picture, the drawing is obvious, its color is black. Filled place is the whole view that contains the drawing but the shape itself and its inside. The code below will result this functionality when used in onDraw() method:

Xposed - How to hook a method with primitive-type parameter

Xposed Framework is a great tool to take actions which Android SDK doesn't provide for developers. One of the great hacks that you can do is hooking a method. You can see parameters given to a method, with many other properties of it. There are some tutorials on Internet, but in this tutorials, they show hooking method without parameters or with class parameters. Its code is: findAndHookMethod("com.android.settings.Settings", lpparam.classLoader, "updateHeaderList", List.class, new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { //your code } });

Get metadata from pdf via Mupdf library in Android

In this link , one of my previous posts, I have explained how to add mupdf library as a module into an Android Studio project. You can either start with this guide or directly continue to this post. The target file to edit is  mupdf.c . This file contains ndk functions in order to be called from java part. We will just add a ndk function to fetch metadata of a pdf file. Because mupdf library has a functionality to provide it, we don't need any further coding.

How to avoid API-level warning of Android Studio

Before giving the solution, let's start with a scenario. setSelectionFromTop() is a new method in Android Lollipop API. This method is basically beneficial to precisely keep scroll state of a ListView. By keeping that info, a developer can go back to old scroll state after doing some operation like data set change. You are aware of API level and you do your control before you call this function: if (currentapiVersion >= Build.VERSION_CODES.LOLLIPOP) { srlistview.setSelectionFromTop(index, top); } But if project minSdk is set to a lower level (in this case it is 15), this warning will still be displayed in Android Studio:

How to fix no permission error for android devices on Ubuntu 14.04

On Ubuntu 14.04 , adb devices command may return List of devices attached ???????????? no permissions This is because current user doesn't have permission to detect the device. This may be solved in two ways. One is starting adb as root after killling all adb processes. Because root user has permissions for all vendors, almost any android device is detected. But second solution is more handy.