Showing posts with label Activity. Show all posts
Showing posts with label Activity. Show all posts

Application which always requires Login

In this tutorial is an attempt to disallow the user to resume an application without signing in again. Whatever happens that causes my app to go off-screen should force the user to sign in again. In this context, signing in is rather case-specific: Say, every time the app is hidden and then shown again, the app will go to one specific activity.

How to create a Splash Activity - best practices

In this small tutorial, I will explain how to add 2 types of splash activities in Android:

  1. Splash that shows a simple layout
  2. Splash that plays a movie


While working on different projects, I discovered that splash activities are really simple to create. You just create some xml layout for your activity, create the activity, and set a timer after a couple of seconds with a Runnable that starts another activity.

How to play a video from resources

As am getting lots of good feedback on my answer on SO for the question How to play a video from the raw or assets folder, I thought of writing this small tutorial on playing a video in your activity.

Adding an Exit button to Android Application

So what is the right way of closing the application!

Usually it is "USER! press back ! press back! keep pressing back! we are close!! okay finally bye"


Here is a small idea i had on adding an Exit button to application.


In my personal opinion, even android users will find a Close button nice and friendly.

Passing primitive Data types between activities

After some time working on android projects, I discovered that it is actually very important to pass data between activities in most projects. It is rather simple when it comes to passing primitive datatypes.