Author name: Catalin Prata

Born in Alba Iulia, a beautiful city from Romania. I like hiking and everything related with electronics and IT . Eager to learn and enhance my knowledge in programming languages. My main specialization is on Mobile Applications development (Android and iOS).

Info

Android Studio – TestFlight upload plugin

As you well know the new IDE for Android is Android Studio and it is using the power of Intellij IDEA IDE which is great.If you work with TestFlight to distribute your builds to your testing teams or customers, you will surely like my new plugin that helps you upload the builds more faster and […]

, , , , , ,
Snippets, Solutions

Set custom font on android – from assets

Among other nice things that Android has, we can also load custom fonts. To do that we need to get a font file with the desired font. There are some sites where you can find open source fonts like this or this.Ok, I assume you downloaded this font file angrybirds-regular.ttf . Step 1: – put the

, , , ,
Snippets, Solutions

AES CB encryption in Android using key and salt

Here is a simple example of AES CB encryption in android using key and salt. I am not expert in encryption but I found how to do this pretty hard and I thought that maybe it will help somebody else if not , it will help me latter again :). // decryption method public static

, , , , , ,
Snippets, Solutions

Android change indeterminate progress bar(wheel) color

There are times when you want to add a progress bar(wheel type) on a white background and you notice that on some phones the progress bar has white color and is not visible… The issue can be fixed if you apply a color to your progress bar drawable. Here is how you can do it:

, ,
Snippets, Solutions

Android HttpResponse content(body) to String

Usually I use the following code to convert a Http response content to String:   BufferedReader in = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); StringBuilder responseBuilder = new StringBuilder(); String line = “”; while ((line = in.readLine()) != null) { responseBuilder.append(line); } in.close(); Log.e(“WS RESPONSE”, responseBuilder.toString()); It is not a bad idea but I found over the internet that

, , , ,
Snippets

Set the application icon

To set the application icon in Android you have to open the project’s Manifest.xml file and add the following attribute to the application tag: <application android:icon=”drawable resource”> Before you do that make sure you add the icon image in one of your drawable directories.. If you called your icon: app_icon.png then the application tag should look

, ,
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

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

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,

, ,
Snippets, Tutorial

Android How To Make an AlertDialog

To make an AlertDialog you have to write this code: AlertDialog.Builder alertDelete = new AlertDialog.Builder(ListsActivity.this); //HERE YOU WILL WRITE THE MESSAGE YOU WANT alertDelete.setMessage(R.string.delete_confirm); //HERE IS THE POSITIVE BUTTON. YOU HAVE TO SET THE BUTTON NAME AND A CLICK LISTENER alertDelete.setPositiveButton(getString(R.string.yes),new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //YOUR ACTION } });

Tutorial

Android How To Make Google Maps Application

NOTE: DEPRECATED. You should use Google Maps Android API V2 Sometimes in our applications we have to add new features like Maps. So in today’s tutorial I will show you how to create a map for your application and what you need in order to create it. Firts of all you have to run the

, , , , ,
Scroll to Top