Android progress bar with padding

I want to make my progress bar looks something like that: I dont want to use images, so I have tried to make this with the shapes: <item android:id=”@android:id/background”> <shape> <corners android:radius=”50dp” /> <gradient android:angle=”270″ android:centerColor=”#2a2723″ android:centerY=”0.75″ android:endColor=”#2a2723″ android:startColor=”#2a2723″ /> </shape> </item> <item android:id=”@android:id/secondaryProgress”> <clip> <shape> <corners android:radius=”50dp” /> <gradient android:angle=”270″ android:centerColor=”#16e61c” android:centerY=”0.75″ android:endColor=”#9dfd6e” android:startColor=”#16e61c” […]

Android: how to install apk on device, without using android sdk tools

I have built my app into a signed SDK. I would like for beta testers to be able to install this on their devices without having to install and use the android sdk tools (I realize the apk can be installed with command line tools, but would prefer that not be necessary). I tried manually […]

Don't understand how to use GridLayout.spec()

This GridLayout is going in my app that has a lot of levels. Each level has a different number of rows and columns. I assume that this GridLayout would be my best bet to use to satisfy my needs. Also, all need to be done at runtime prorammatically. I am having trouble understanding how to […]

JNI loading : Warning : Do not hardcode use Context.getFilesDir().getPath() instead

I am facing a problem in one of my app, I have the following code to load a lib (JNI) the app needs : static { // load the JNI library Log.i(“JNI”, “loading JNI library…”); System.load(“/data/data/com.mypackage.appname/lib/libxxxxxx.so”); Log.i(“JNI”, “JNI library loaded!”); } So i get get the warning : “Do note hardcode use Context.getFilesDir().getPath() instead” which […]

How to use rawQuery to insert a record

I need to store a record using rawQuery method, because i want to insert the current date and time (datetime()), but I also need to insert strings that contain quotes. So I wrote this code: String sql=”INSERT INTO sms VALUES ( null, ?1, ?2, ?3, datetime())”; dbw.rawQuery(sql, new String[]{str1,str2,str3}); But it doesn’t store anything… what’s […]

Do Android Geofences remain active until removed/expired or only until my PendingIntent is launched

I’m about to implement a feature with geofences and before I get any serious work done, I need to know whether geofences remain active after the first transition. The core of the feature is: every time I’m within x meters of point P (call this Area A), I want Action B to occur. What I […]

Passing Parameters via URI in Android

Is it possible (or recommended) to pass parameters to content providers via URIs in Android, similar to how web addresses use them? That is to say, can I use name/value pairs in content:// URIs? For example, I have a search provider that can search based on names. I pass it a URI like this: content://com.example.app/name/john […]

How can I serialize a RealmObject to JSON in Realm for Java?

I am implementing a DB for my Application and I am trying “connect” it to my REST interface. The data comes in as JSON and with the new JSON-Support (as of Realm 0.76) I can throw the JSON at my Realm.createObjectFromJson(MyType.class, jsonString) and it creates the appropiate obejcts and RealmLists. But how can I do […]

Turn on speakerphone whenever an outgoing call is made

My requirement is to turn on speakerphone whenever an outgoing call is initiated. I tried the following code, but it is not working. In fact, speakerphone turns on when in the middle of a call, a second call comes ! package in.co.allsolutions; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.TelephonyManager; import android.util.Log; //import […]

How to set a background image in android

Im very new to this android development.I just started to create a hello world application. I tried to set a background image and it is working fine.When i tried to add a text on the image it is not working. I tried in the way below.Can anyone please help me where im going wrong. in […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.