Online Quiz Application Android Studio

Online Quiz Application Android Studio – In this article I have explained how to implement an Online Quiz exam application using android studio IDE. Nowadays everybody tries to make online exams not offline. Because offline has a lot of work, waste of time, pressure, students are trying to copy, misbehave activities etc. That’s why every college/school staff faculties prefer online quiz examination apps.

Students also like you online because when compared to offline exams it’s very comfortable, user friendly, time saving, no physical work. Correction works are also easily made by online progression.

Online Quiz Application Android Studio

Create Project

Okay let’s start our project to implement the best attractive online quiz examination system android app using android studio IDE. There are two ways available to develop an online quiz. They are, store the questions & answers from the server side. Another way is to store from client space directly execute the API.

I hope you know the basic things of project creation. So after creating a project select some other activity & open the MainActivity.java file and add the following code below.

package com.vacuum.app.metquiz.Splash;

/**
 * Created by Home on 10/14/2017.
 */

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;

import com.vacuum.app.metquiz.MainActivity;
import com.vacuum.app.metquiz.R;
import com.vacuum.app.metquiz.Utils.CustomDialogClass;

import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;

import static com.vacuum.app.metquiz.Splash.LoginFragment.LOGIN_FRAGMENT_TAG;
import static com.vacuum.app.metquiz.Splash.SignupFragment.SIGNUP_FRAGMENT_TAG;


public class SplashScreen extends AppCompatActivity {

    public static final String MY_PREFS_NAME = "MyPrefsFile";
    Context mContext;
    public  SharedPreferences prefs;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        mContext = this.getApplicationContext();
        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                .setDefaultFontPath("fonts/airbnb.ttf")
                .setFontAttrId(R.attr.fontPath)
                .build());
        remmber_me();
    }

    private void remmber_me() {
        prefs = mContext.getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE);
        String remmber = prefs.getString("card_id",null);
        if (remmber != null){
            Intent i = new Intent(mContext, MainActivity.class);
            startActivity(i);
            finish();
        }else {
            login_fragment();
            CustomDialog();
        }

    }

    private void CustomDialog() {
        CustomDialogClass cdd=new CustomDialogClass(SplashScreen.this);
        cdd.setCancelable(false);
        cdd.show();
    }

    private void login_fragment() {
        Fragment fragment = new LoginFragment();
        FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
        fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,
                android.R.anim.fade_out);
        fragmentTransaction.replace(R.id.frame, fragment, LOGIN_FRAGMENT_TAG);
        fragmentTransaction.commitAllowingStateLoss();
    }

    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
    }


}

Splash screen features are also used on this android application. Lots of features added & user friendly navigation for accessing files. When we use the splash screen more, it gives more awesome looks.

Online Quiz Application

In this project additionally need to create five directories like

  1. Login registration form
  2. View score
  3. Add Questions
  4. Show the list of options
  5. Show the Results
  6. Wrong Questions/Answers etc..

So the source codes are long, no space to explain. End of article you can download, I will give full free source code of Online Android Quiz App Android Studio.

Moreover in the free time you can make money online via upload articles on blog. Because recent days most of the students are earn money through Google AdSense network.

Leave a Reply