Trying to run Android JUnit tests in Eclipse fails?

I have seen all the examples on the web and it seems real simple. I have a bare-bones app that displays a string. I have a a Android JUnit test project that I created when the app was being created (eclipse asked if I wanted to create a test app). When I run the test […]

Custom Android control with children

I’m trying to create a custom Android control that contains a LinearLayout. You can think of it as an extended LinearLayout with fancy borders, a background, an image on the left… I could do it all in XML (works great) but since I have dozens of occurences in my app it’s getting hard to maintain. […]

In preferences, select my sound just like with RingtonePreference

I have sounds in my /raw folder and I would like my user to be able to choose one sound in preferences exactly like RingtonePreference does but only with my sounds.

Which Intent for Settings – Data usage

I spent several hours by searching correct Intent for launching Data usage Activity in Android Settings. Unfortunetly i found nothing (on web and also here). I also tried reflection (in a case of private field) but also without result. I will be glad for any help. Thanks in advance.

how to kill sub activities and bring activity to top of stack

I have activity A that starts activity B which starts activity C A -> B -> C When a user clicks on a button in activity C, i want to bring A to the top of the stack and take B & C completely out of the stack. Is there a way to do this […]

How to call fragment from an activity in android?

I am working on android fragments. In my app I am getting an issue with activity and fragment. i.e I created a button in fragment1 and called an activity1 in that button click. Again in activity1 I created another button and called activity2. Now from activity2 I called activity1 and from activity1 I am trying […]

Android: sample microphone without recording to get live amplitude/level?

I was trying to get the amplitude level of a microphone on Android like so: MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); Timer timer = new Timer(); timer.scheduleAtFixedRate(new RecorderTask(recorder), 0, 1000); private class RecorderTask extends TimerTask { private MediaRecorder recorder; public RecorderTask(MediaRecorder recorder) { this.recorder = recorder; } public void run() { Log.v(“MicInfoService”, “amplitude: ” + […]

Scan Android SD card for new files

My app allows a user to save an image to their SD card. But I’m not sure how to make it appear in the gallery until you unmount and remount the SD card. I have googled for a couple of days with this problem but am not sure how to make it appear automatically. I […]

Firefox source code for Android

I have recently seen the release of Firefox for Android. It appears that firefox has several awesome features and performance improvements. I want to know if the source code for the Android platform has been released and if so where can I get the latest source code?

Why the current year in the date saved as 3912?

to get the current date and time final Calendar c = Calendar.getInstance(); mYear = c.get(Calendar.YEAR); mMonth = c.get(Calendar.MONTH); mDay = c.get(Calendar.DAY_OF_MONTH); mHour = c.get(Calendar.HOUR_OF_DAY); mMinute = c.get(Calendar.MINUTE); to create current date object Date toDate; toDate.setYear(mYear); toDate.setMonth(mMonth); toDate.setDate(mDay); Date endDate = toDate; when printing endDate object I got Mon Jan 01 13:11:00 GMT+03:00 3912 why ?

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