Android Development
Google Maps V2 Clustering Sample
Here is my sample for Google Maps V2 Clustering Docs here: https://developers.google.com/maps/documentation/android-api/utility/marker-clustering#introduction App in action: Fork on github:
Here is my sample for Google Maps V2 Clustering Docs here: https://developers.google.com/maps/documentation/android-api/utility/marker-clustering#introduction App in action: Fork on github:
Problem happens when you have more than one developer in the Android team or you develop project from different computers. Some APIs or functionality depends on keystore which sign the APK. For example Facebook API. To make life easier you need keep your debug.keystore same for all your computers/developers. But, Read more…
Here is sample for loop tabs in Android. Video with sample application in action Lets show how it works. 1. I have Tab enum which describe Tab element. Also you can handle tab state. I don’t do it in this sample. package com.hrupin.looptabs.infinitetabbar; import com.hrupin.looptabs.R; /** * Created by Igor Read more…
Case: We need know current user activity. Using ActivityRecognitionApi we can get if user driving, walking, running, ride bicycle. Android get information from all the sensors and analyse it using ActivityRecognitionApi. Below simple sample how to implement it. Please follow the steps: 1. Create android project in Android Studio. 2. Read more…
As you know a lot of application can show their views above all application. You can see if in Facebook Messanger. How to do it? The Android API have SYSTEM_ALERT_WINDOW permission (“android.permission.SYSTEM_ALERT_WINDOW”). The API said: “SYSTEM_ALERT_WINDOW Allows an app to create windows using the type TYPE_SYSTEM_ALERT, shown on top of Read more…
Here is sample application which demonstrate shake detecting. This sample application go into red when shake detected. Please look youtube video. package com.hrupin.sample.shakedetect; import android.app.Activity; import android.graphics.Color; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.view.View; import android.widget.RelativeLayout; import android.widget.TextView; import java.security.cert.CollectionCertStoreParameters; public class MainActivity extends Activity Read more…
Here is little sample how to send email (send intent to MailĀ app) with text file as attachment. Screenshot: And here is source code of main feature: private void sendIntentToGmailApp(File fileToSend) { if(fileToSend != null){ Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_SUBJECT, “Send Text File As Attachment Example”); email.putExtra(Intent.EXTRA_TEXT, emailBody); email.putExtra(Intent.EXTRA_STREAM, Read more…
Here is sample for fastScroll ListView functionality. To apply this style you need add the following lines into your app’s style: <item name=”android:fastScrollThumbDrawable”>@drawable/fastscroll_drawable</item> <item name=”android:fastScrollOverlayPosition”>atThumb</item> <item name=”android:fastScrollTrackDrawable”>@drawable/track_fastscroll</item> Also if you need handle click action on your scrollbar you need create the next drawable: <?xml version=”1.0″ encoding=”utf-8″?> <selector xmlns:android=”http://schemas.android.com/apk/res/android” > <item Read more…
Here is very simple example how to use LoaderManager from “android.support.v4.app” package. This sample will help you create nice application which can very nice communicate with your web server. The sample application looks like activity with ViewPager. Each Fragment in ViewPager adapter have implemented LoaderManager.LoaderCallbacks. Where “T” is returning type. Read more…
Today I’ve got the “Conversion to Dalvik format failed with error 1” error when make “Android Tools–>Export Unsigned Application Package” I have ADT 23.0.2 The problem was in the Proguard. To fix it you can disable Proguard in “project.properties” (Note that it is bad idea) or update Proguard. The Proguard Read more…