Applying MD5 Algorithm In Android

Hello developers, have you ever given a thought about securing your content when it is being used in communication? If yes then this blog might help you in achieving so.

MD5 stands for Message Digest(5 denotes the series), which is a hashing algorithm used for generating the fingerprint of the content. It was designed in 1991 by Ronald Rivest at MIT.

MD5 algorithm is a one way hashing process which means you cannot generate original text from the hash code.It always produces the same output for the similar input, and this property is used for checking the data integrity. You can compare the two hash codes at destination(one which is received from server and one which is already present at destination) and check whether the files contains the same content or not.

Continue reading

Upload Failed : You uploaded a debuggable APK

It was quite late in the evening and I was about to wrap up my work. Suddenly I got a call form my client in Skype and he shared his concerns of uploading the build to production. Although it was late, I thought to help him before I close the day, since that guy is in the middle of his day time (in US). Now mind set is to spend time on the issue. I started looking into the issue.

The issue is, while he (my client) started uploading the APK file into the Android store, he is receiving the below rejection message from the store.

Upload Failed

Continue reading

How to Use Render Scripts in Android

If you are an android developer, you must have faced the problem of slowing down or even crash of your app while implementing complex image processing operations? I faced the same and found RenderScripts as appropriate solution to it.

The RenderScript are used in android for complex computations such as image processing. The Scripts are based on the C99 standard of C language. RenderScripts was introduced in API 11 i.e. Honeycomb.

For accessing RenderScript in android there are two API’s

1. Android.renderscript :- from API 11(HoneyComb) to higher API’s.
2. Android.support.v8.renderscript :- from API 8(Froyo) to higher.

Continue reading

Bluetooth Low Energy (BLE)

Don’t you think Bluetooth plays a significant role in making the smart phones smart? So let’s talk about something smarter i.e. Bluetooth Smart or BLE. As far as the BLE or the Bluetooth low energy is concerned it is not just a feature it’s a new technology

it was first proposed by NOKIA in 2006 with the name WIBREE. And now the devices which are equipped with BLE are called as Bluetooth Smart devices and the devices which has both Bluetooth classic and the BLE are called as Bluetooth Smart Ready devices.

Continue reading

SeekBar Customization for Android Development

If you want some customization in the seekbar which you use while developing android apps, there are several ways of doing this. You can customize seek bar with the help of the xml or you can make it impressive even programmatically.

Let’s have a look if you want to change its appearance with the help of xml

First of all the progress Drawable attribute of the seekbar should be set as the xml file in the drawables folder as

android:progressDrawable=”@drawable/progress_seekbar”

The overall seek bar implementation in the layout xml should look something like this

Continue reading

Toast MyToast

In this post we will be talking about the most helpful feature provided by Android for a quick notification to user, i.e. Toasts “Small informative texts shown at bottom-center of device screen, for defined time duration”.

Default UI design of these toasts is a semi-transparent dark color background with white text over it, not even showing the name of application which spawned it, no so eye-catching, right? I know… So, let’s make a custom Toast Notification that complements our awesome UI…

Continue reading

Backup API Implementation: Creating Backup of App Data and Settings Over Cloud

How about creating a backup setting for an android application, so that when the application is uninstalled the personal settings it does not get erased permanently, instead the settings is stored on the cloud and the next time when you install the application it asks you to restore the settings. Interestingly, it can restore the settings when you install the application into other device too. It can be achieved through Backup API provided by Google. You will find it really interesting, easy and useful.

It’s not for the synchronizing of the data with other apps or storing the data which could further be used as in the case of SQLite . Also there is no method to access the backed up data other than the API and neither any way to make the Backup status known. This makes it easier to implement and lesser code it requires.

Android currently supports and provides helpers to backup and restore the complete data of the Shared Preferences or the internal storage if they are light weighted i.e. less than one megabyte.

For the implementation of Backup API the first and the foremost thing which has to be done is create the API key for your application by clicking on the link

https://developer.android.com/google/backup/signup.html?csw=1
and registering your application by giving the appropriate package (the package name of your app)

Android Backup

Android Backup

Continue reading

Device Administration API in Android

Device Admin API is basically used for the access of the device at the administrative level. Like accessing the device password, disabling the device camera, limiting the size of the password, setting the maximum failed attempt for the password, erasing all the data of the device etc.

 

It basically is implemented with the use of three classes named as below,

 

DeviceAdminReceiver

DevicePolicyManager

DeviceAdminInfo

 

The first and the foremost thing you need to do is create the MyDeviceAdminReciever.java class obviously after creating a new project and the MyDeviceAdminReceiver class should extend the DeviceAdminReciever class. The DeviceAdminReceiver class is the base class for implementing the DeviceAdminApi and in the app must contain its subclass.

Continue reading

Displaying alert dialog in Android using Xamarin

Introduction:
Alert dialog is a important part of any application. Conveying various information, error messages and even for taking confirmations from user can be done through alert dialog. Xamarin provides it’s own way of showing alert and conveying messages to the user.

Description:
Alerts in Xamarin are, an object of AlertDialog.Builder class, where AlertDialog is a subclass of Dialog class. Builder() is a method of AlertDialog class, which creates an alert dialog to display. We can add multiple buttons to this alert dialog. The builder takes the current context (Activity) and shows the Alert Box in the main thread(The UI thread). Continue reading

Relative layout design in Android using Xamarin

Introduction:
Xamarin provides different layout for designing the user interface in Android.
Some common ones being used are Relative Layout, Linear Layout, Grid Layout, Table Layout, Frame Layout etc. Most of them are understandable from their name itself. Here we will discuss about how to design using Relative Layout in Xamarin for Android.

Description:
As the name suggests, Relative Layout mainly makes use of the controls present in the Designer and places controls relatively to each other. The most important aspect of this design being the First element placed inside the tag. The places itself depending on the properties set for the children in the Relative Layout.
For example: Continue reading