Solutions

Solutions for different problems, might not contain code

Snippets, Solutions

Android ExpandableListView Scroll to Expanded Group Position

Once I had this problem: I had an ExapandableListView with groups and children. When I wanted to expand a group the list was scrolling to the end every time. After a little search I’ve figured it out what the problem was. In my xml file where my ExpandableListView was created, I had this attribute: android:transcriptMode=”alwaysScroll” […]

, , ,
Solutions, Tutorial

Android Multi-Touch: Two Fingers Tapping Once

For my project I had to add a feature where the user should use two fingers and tap with both of them at the same time in order to show view.  this behaviour is not very common on Android but I had to implement it anyway. So after I did some research,  and tried multiple

, , , ,
Solutions, Tutorial

Android Broadcast Receiver Example with Parcelable

In this tutorial I will show you how to use Broadcast Receiver and how to use Parcelable too. To do this, we will create an ExpandableList which will have parents and children(they will contain only their names). The children will be an arrayList of strings and because we want to pass this array with an

, , , ,
Snippets, Solutions

Add image to email intent in Android

How to add image to an email intent in Android: // build a email sending intent Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType(“image/png”); // set the email subject emailIntent.putExtra(Intent.EXTRA_SUBJECT, “email subject”); // set the email image path for the attachment emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(“file://” + mEmailImagePath)); // set the body of the email emailIntent.putExtra(Intent.EXTRA_TEXT, “some text message”);

, , , ,
Solutions, Tutorial

How to Add AdMob to Android [Deprecated]

NOTE 1: This tutorial is now deprecated. See this one instead! NOTE 2:  This project is made in Intellij. For those who use Eclipse or other IDE the integration of AdMob library will differ. You can use AdMob lib only on at least Android v3.2 (Api Level 13), so you must compile your project on

, ,
Solutions, Tutorial

Android SSL self signed certificate pass by

This is not my work, I have just found the solution some time ago on the internetUsing the class below you can pass by the ssl certificate error that Android may throw when you are trying to connect to a self signed certified server:First the EasySSLSocketFactory class : import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; import java.security.KeyManagementException; import

, ,
Solutions, Tutorial

Android SQLite Ignore Case from Database

If you want to select data from Database and you want to ignore the case of letters you should use COLLATE NOCASE in your query: “SELECT * FROM  myDataBaseName WHERE some_column= some_value COLLATE NOCASE” It’s not exactly an android issue but you might need some day in your android projects, so I hope it helps

, , ,
Solutions, Tutorial

Run Android Lint from command line

Not many of us use android Lint tool to scan the projects for possible performance or best practices tips. Eclipse has the Lint tool included into adt plugin so Eclipse users can take advantages of this. Ok but what about developers that use intellij IDEA or other IDE for android projects? The answer is simple,

, ,
Scroll to Top