Archive

Archive for May, 2016

How to record Android screen device?

May 20th, 2016 1 comment

Sometime you may need to demonstate a function, feature…. on your phone. something like:

 

And how to do that?

For Android 5.0 (Lollipop) and later: Use this: https://play.google.com/store/apps/details?id=com.hecorat.screenrecorder.free

 

For Android 4.4 (Kitkat) and later: You can use ADB to do this.

  1. Connect your device to computer via cable/miniUSB in debugging mode.
  2. Open CMD and type:
  3. You can begin your demonstration on your phone. Press CTRL + C when done. YOURFILENAME.mp4 will be saved in the root folder of SDcard.

 

 

For older Android version: It’s not difficult but your phone need to be rooted. So i don’t talk about this.

Handle “Enter” key in SoftKeyboard

May 15th, 2016 No comments

[code lang=java]
YourEditText.setOnKeyListener(new OnKeyListener()
{
public boolean onKey(View v, int keyCode, KeyEvent event)
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
switch (keyCode)
{
case KeyEvent.KEYCODE_DPAD_CENTER:
case KeyEvent.KEYCODE_ENTER:
doSomeThing();
return true;
default:
break;
}
}
return false;
}
});
[/code]

read more:

http://stackoverflow.com/questions/4451374/use-enter-key-on-softkeyboard-instead-of-clicking-button

 

Categories: Android Tags:

How to check whether SD card is mounted or not?

May 1st, 2016 No comments

Very simple.

if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){
// SD Card is mounted
} else {
// SD Card is not mounted
}

Categories: Android Tags: