how to handle device back button on sencha touch application

In Sencha touch if I use navigation view i can get back button. This is pretty fine. But what if user hit device backbutton? it is direct exiting the applicaiton. In my requirement it should not exit the application it has to go back to previous screen.How can i do this?.

Where is the build.gradle file located for my android project?

Where is the build.gradle file located for my android project? I’m trying to follow along with this tutorial but can’t make necessary changes to my build.gradle file to use the support library.

Show dropdown programatically in ActionBar / ActionBarSherlock

I have an activity using ActionBarSherlock with ActionBar.NAVIGATION_MODE_LIST. When entering the page I want the spinner in the action bar to expand programmatically after it’s populated with items so the user needs to pick an item. As of now the first item in the adapter is selected automatically. I can’t figure out a nice way […]

fail to start android emulator after update sdk to 23.0.5

I cannot start my emulator after update sdk to 23.0.5 with following errors on windows. Can anyone help? thank you WARNING : No started emulators found, starting an emulator. Waiting for emulator… emulator: device fd:61HAX is working and emulator runs in fast virt mode emulator: warning: opening audio input failed creating window 28 27 320 […]

Set Repeat days of week alarm in android

Can somebody give good logic for set repeat days of week alarm? I have done weekly Alarm by using alarmCalendar.set(Calendar.HOUR, AlarmHrsInInt); alarmCalendar.set(Calendar.MINUTE, AlarmMinsInInt); alarmCalendar.set(Calendar.SECOND, 0); alarmCalendar.set(Calendar.AM_PM, amorpm); Long alarmTime = alarmCalendar.getTimeInMillis(); Intent intent = new Intent(Alarm.this, AlarmReciever.class); intent.putExtra(“keyValue”, key); PendingIntent pi = PendingIntent.getBroadcast(Alarm.this, key, intent, PendingIntent.FLAG_UPDATE_CURRENT); am.setRepeating(AlarmManager.RTC_WAKEUP, alarmTime, 7*1440*60000 , pi); The alarm trigger on […]

Android SDK Windows Failed to execute Android.bat

The title might sound slightly “nubbish” but i assure you it is not, i am completely aware of 90% of systax commands in cmd i am able to install and uninstall .apk’s via adb however this particular nitch keeps setting me back! I have been working on Android SDK for a week or more now […]

Android BroadCastReceiver for volume key up and down

If a user presses volume key up or down is it possible to detect it in my broadcast receiver? I need the full code. Here is my Intent filter IntentFilter filter = new IntentFilter(); filter.addAction(“android.media.VOLUME_CHANGED_ACTION”); and my onReceive method is public void onReceive(Context arg0, Intent intent) { KeyEvent ke = (KeyEvent)intent.getExtras().get(Intent.EXTRA_KEY_EVENT); if (ke .getKeyCode() == […]

Protect a socket in VpnService

I’m exploring the capabilities of Android’s VpnService. Presently, I’ve built a very rudimentary request forwarder by essentially rebuilding the IP stack in user space: I read IP packets from the VpnService’s input stream, parse them, and for connections I don’t want to forward, I attempt to recreate those socket connections outside the VPN connection. I’ve […]

How to disable marker click event?

I am developing an simple app, where I already displayed marker title with mrkr.showInfoWindow() but I don’t want user to tap again that marker. How to disable clicking event of particular marker ? This is how I tried. Marker marker = gMap.addMarker(new MarkerOptions().position(new LatLng(location .getLatitude(), location.getLongitude())).title(“I am here”).icon(BitmapDescriptorFactory.fromResource(R.drawable.mrk1))); marker.showInfoWindow(); //how to use marker.setClickable here or […]

Why don't some xhdpi mobiles display image located in /res/drawable only?

This is a scenario. There are folders: drawable drawable-ldpi drawable-mdpi drawable-hdpi draawble-xhdpi An image (usually background, but not bound to such images only) is located in /res/drawable only. I test the app on Galaxy S3 and the background is displayed properly. I test on HTC One X and background image is not being displayed. If […]

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