Sadaqat Academy provides free learning courses, scholarships, guidance, Test Preparations, videos lectures, past papers for all class.

No More Tension: All is here

Guidances, TimeTable, News etc.

Welcome Here in Sadaqat Academy

Free Learning Courses, scholarship, guidance, Test Preparation, Video Lectures, Past Papers of All Classes

Past Papers

Past Papers of All classes and All universities

Download Our Mobile Application

Educational Related Applications, Fun related and much more, from download section.

Educational news

Be Updated in detail with us

All is here

Video lectures, Motivational Videos and too much more here

Wednesday, March 25, 2020

RAPID RESEARCH & INNOVATION INITIATIVE (RRII)


The COVID-19 RAPID Research and Innovation Initiative (RRII) invites researchers to use the RAPID Research and Innovation funding mechanism, which allows HEC to receive and review proposals dealing with topics and issues of severe urgency with regard to the availability of or access to data, facilities or specialized equipment as well as quick-response research on COVID-19. There is an urgent and immediate need for research in order to gain a better understanding of the epidemic, to understand and contain the patterns of spread, develop diagnostics and improve patient care and the public health response. The said fund is supported by the World Bank and implemented by the Higher Education Commission (HEC). The RRIF will provide funds to selected institutions based upon a competitive, yet swift peer-review of proposals. 

The priority themes for RRIF support include:
  • Development of Infectious Diseases Surveillance Systems Systems using big data analytics and artificial intelligence: Including integrating the response into the entire medical system, from primary to secondary to tertiary
  • Disease Epidemiological Modelling: Data systems and evidence-informed modelling for disease prediction, outcome prediction and impact assessment of interventions
  • Immune Patterns of COVID-19: Immune Mechanisms of COVID-19 infections and recovery, implications for diagnostics and therapeutics, including understanding localized factors and responses (such as ethnic, genetic, social, behavioral, and climatic factors, etc.)
  • Treatment modalities and strategies including concentration on local and traditional medicine
  • Diagnostics kits: Rapid diagnostics based on antigen detection vide RTPCR systems, Gene EXPERT systems or alternatives
  • Indigenous manufacture of Low cost Intensive-care equipment: Oxygen supply and monitoring equipment, Intravenous fluid devices, Ventilators/CPAP units, Cardio-respiratory monitors etc.
  • Development of disinfectants particularly using indigenous herbal ingredients: low-cost sterilization and sanitation material for hospitals, general-purpose consumer hand sanitization material
  • Personal Protective Equipment: N-95 Masks, other Personal Protective Gear (clothing gowns, goggles, and gloves), preferably reusable materials
  • Information Collection and Dissemination IT platforms: Identify hotspots and growth patterns, Contact tracing modeling of affected people
  • An additional priority area for the funding instrument RAPID Innovation Seed Fund (RISF) is Education Technology to facilitate learning at the basic and secondary education levels in a COVID-19 environment
Each applicant seeking funding through the RAPID Research and Innovation Fund can propose an idea based on one of the above-mentioned priority themes and can apply through one of the following three funding instruments:
  1. RAPID Innovation Seed Fund (RISF)


Call for Proposal for RAPID Research and Innovation Initiative (RRII) is now open and applications can be submitted through the online portal (eportal.hec.gov.pk) after 25.3.2020. 

Deadline for submission of applications is 3rd ​April 2020 (23.59 Pakistan Standard Time)


Share:

Development of Android MCQs App

In this project, we shall build an android MCQs App

Module 1: 

         We will using Firebase to store data (Question, Answer, User, Ranking...etc)

Be ready for learning

 - Firebase setup
 - Sign Up/ Sign In layout
 - Register / Login functional

Now create new Empty Project from Android Studio. Then,

Now we need to create new project on Firebase.

Click on Add Project
Create a project
Enter Project Name


Setting of android studio on Firebase and Vice Versa:
Create new android app on Firebase
While create new android app on Firebase, copy package name from MainActivity.java and put in Firebase as per requirement.
Now Steps to Read SHA1: open on android studio as

Copy SHA1 from 

Paste on Firebase as

Add FireBase to Your Android App
Download file when the above screen is come and put into your android studio as shown in above.

When you click on Continue Gradle, you need to follow Gradle instructions...

Copy code and paste as 

Next Step
    

Next Step:


Paste of file into android studio after downloading from Firebase


Now Make Sync Gradle.

We had done Firebase to our Android Project.

Now, we need to add some  required Libraries to add into android project such as firebase, design, etc... then we need to work with xml file and finally with java file... 


Libraries includes:
  • Firebase core
  • Firebase database
  • Material Edit Text
  • Card View


apply plugin: 'com.android.application'
android {
    compileSdkVersion 29    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "com.example.generalknowledgequizapp"        minSdkVersion 16        targetSdkVersion 29        versionCode 1        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"    }

    buildTypes {
        release {
            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.google.firebase:firebase-core:17.2.3'    implementation 'com.google.firebase:firebase-database:19.2.1'    implementation 'com.google.firebase:firebase-analytics:17.2.3'    implementation 'com.rengwuxian.materialedittext:library:2.1.4'    implementation 'androidx.appcompat:appcompat:1.1.0'    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'    testImplementation 'junit:junit:4.13'    androidTestImplementation 'androidx.test.ext:junit:1.1.1'    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'    implementation 'androidx.cardview:cardview:1.0.0'}
apply plugin: 'com.google.gms.google-services'


Next, we will create Model

our user will have three main information
- User name
- password
- Email

Hence, Java-->Model-->User.java


package Model;

import android.text.Editable;

public class User {
    private String userName;
    private String password;
    private String email;

    public User() {
    }

    public User(String userName, String password, String email){
        this.userName = userName;
        this.password = password;
        this.email = email;
    }


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}



Now we will create layout for signup


<?xml version="1.0" encoding="utf-8"?><androidx.cardview.widget.CardView    xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:layout_margin="8dp"
    app:cardElevation="4dp"    >
<LinearLayout    android:orientation="vertical"    android:layout_width="match_parent"    android:layout_height="wrap_content">

    <com.rengwuxian.materialedittext.MaterialEditText        android:id="@+id/edtNewUserName"        android:hint="User name"        android:textColorHint="@color/colorPrimary"        android:textColor="@color/colorPrimary"        android:textSize="24sp"        android:layout_width="match_parent"        android:layout_height="wrap_content"        app:met_baseColor="@color/colorPrimary"        app:met_floatingLabel="highlight"        app:met_singleLineEllipsis="true"        />

    <com.rengwuxian.materialedittext.MaterialEditText        android:id="@+id/edtNewPassword"        android:hint="Password"        android:textColorHint="@color/colorPrimary"        android:textColor="@color/colorPrimary"        android:textSize="24sp"        android:inputType="textPassword"        android:layout_width="match_parent"        android:layout_height="wrap_content"        app:met_baseColor="@color/colorPrimary"        app:met_floatingLabel="highlight"        app:met_singleLineEllipsis="true"        />

    <com.rengwuxian.materialedittext.MaterialEditText        android:id="@+id/edtNewEmail"        android:hint="Email"        android:textColorHint="@color/colorPrimary"        android:textColor="@color/colorPrimary"        android:textSize="24sp"        android:inputType="textEmailAddress"        android:layout_width="match_parent"        android:layout_height="wrap_content"        app:met_baseColor="@color/colorPrimary"        app:met_floatingLabel="highlight"        app:met_singleLineEllipsis="true"        />
</LinearLayout>


</androidx.cardview.widget.CardView>


Now, coding start...

package com.example.generalknowledgequizapp;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.rengwuxian.materialedittext.MaterialEditText;

import Model.User;

public class MainActivity extends AppCompatActivity
{
    MaterialEditText edtNewUser, edtNewPassword, edtNewEmail; // For Sign Up    MaterialEditText edtUser, edtPassword; // For Sign In
    Button btnSignUp, btnSignIn;

    FirebaseDatabase database;
    DatabaseReference users;

    @Override    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //Firebase        database = FirebaseDatabase.getInstance();
        users = database.getReference("Users");

        edtUser = (MaterialEditText)findViewById(R.id.edtUser);
        edtPassword = (MaterialEditText)findViewById(R.id.edtPassword);

        btnSignIn = (Button)findViewById(R.id.btn_sign_in);
        btnSignUp = (Button)findViewById(R.id.btn_sign_up);

        btnSignUp.setOnClickListener(new View.OnClickListener() {
            @Override            public void onClick(View view) {
                showSignUpDialog();
            }
        });
        btnSignIn.setOnClickListener(new View.OnClickListener() {
            @Override            public void onClick(View v) {
                signIn(edtUser.getText().toString(),edtPassword.getText().toString());
            }
        });
    }

    private void signIn(final String user, final String pwd) {
        users.addListenerForSingleValueEvent(new ValueEventListener() {
            @Override            public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                if(dataSnapshot.child(user).exists())
                {
                    if(!user.isEmpty())
                    {
                        User login = dataSnapshot.child(user).getValue(User.class);
                        if(login.getPassword().equals(pwd))
                            Toast.makeText(MainActivity.this, "Login ok!", Toast.LENGTH_SHORT).show();
                        else                            Toast.makeText(MainActivity.this, "Wrong password", Toast.LENGTH_SHORT).show();
                    }
                    else                        {
                        Toast.makeText(MainActivity.this, "Please enter your user name", Toast.LENGTH_SHORT).show();
                    }
                }
                else                {
                    Toast.makeText(MainActivity.this, "User is not exists", Toast.LENGTH_SHORT).show();
                }

            }

            @Override            public void onCancelled(@NonNull DatabaseError databaseError) {

            }
        });
    }



    private void showSignUpDialog() {
        AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);
        alertDialog.setTitle("Sign Up");
        alertDialog.setMessage("Please Enter Required Information");

        LayoutInflater inflater = this.getLayoutInflater();
        View sign_up_layout = inflater.inflate(R.layout.sign_up_layout,null);


        edtNewUser = (MaterialEditText)sign_up_layout.findViewById(R.id.edtNewUserName);
        edtNewEmail = (MaterialEditText)sign_up_layout.findViewById(R.id.edtNewEmail);
        edtNewPassword = (MaterialEditText)sign_up_layout.findViewById(R.id.edtNewPassword);

        alertDialog.setView(sign_up_layout);
        alertDialog.setIcon(R.drawable.ic_account_circle_black_24dp);

        alertDialog.setNegativeButton("NO", new DialogInterface.OnClickListener() {
            @Override            public void onClick(DialogInterface dialogInterface, int i) {
                dialogInterface.dismiss();
            }
        });

        alertDialog.setPositiveButton("YES", new DialogInterface.OnClickListener() {
            @Override            public void onClick(DialogInterface dialogInterface, int i) {
                final User user = new User(edtNewUser.getText().toString(),
                        edtNewPassword.getText().toString(),
                        edtNewEmail.getText().toString());

                users.addListenerForSingleValueEvent(new ValueEventListener() {
                    @Override                    public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                        if (dataSnapshot.child(user.getUserName()).exists())
                            Toast.makeText(MainActivity.this, "User already exists !", Toast.LENGTH_SHORT).show();
                        else {
                            users.child(user.getUserName())
                                    .setValue(user);
                            Toast.makeText(MainActivity.this, "User registration success!", Toast.LENGTH_SHORT).show();
                        }

                    }

                    @Override                    public void onCancelled(@NonNull DatabaseError databaseError) {

                    }
                });
                dialogInterface.dismiss();

            }

        });
        alertDialog.show();
        }
}

All had been done. Now go to firebase, click on database and update rules to true value and start signup work.










Share:

Tuesday, March 24, 2020

Development of Digital Counter - Taasbi Application

In this post, I am describing complete procedure for the Development of Digital Counter - Taasbi Application to be developed in the Android Studio.


Step 1: Open empty project on android studio.

Step 2: Open activity_main.xml and code as

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    tools:context=".MainActivity">

    <TextView        android:id="@+id/counterTxt"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_marginTop="40dp"        android:textSize="120sp"        android:text="25"/>

    <LinearLayout        android:layout_below="@+id/counterTxt"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:orientation="horizontal"        android:layout_marginTop="80dp">

        <Button            android:id="@+id/minusBtn"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="-"            android:textSize="50sp"/>

        <Button            android:id="@+id/resetBtn"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="Reset"            android:textSize="50sp"            android:layout_marginLeft="5dp"            android:layout_marginRight="5dp"/>

        <Button            android:id="@+id/plusBtn"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="+"            android:textSize="50sp"/>

    </LinearLayout>

</RelativeLayout>


Step 3: Open MainActivity.java and code as

package com.example.taasbi_digitalcounter;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    private TextView counterTxt;
    private Button minusBtn;
    private Button plusBtn;
    private Button resetBtn;

    private  int counter;

    private View.OnClickListener clickListener = new View.OnClickListener() {
        @Override        public void onClick(View v) {
            switch (v.getId()){
                case R.id.minusBtn :
                    minusCounter();
                    break;
                case R.id.plusBtn :
                    plusCounter();
                    break;
                case R.id.resetBtn :
                    initCounter();
                    break;
            }
        }
    };
    @Override    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        counterTxt = (TextView) findViewById(R.id.counterTxt);
        minusBtn = (Button) findViewById(R.id.minusBtn);
        minusBtn.setOnClickListener(clickListener);
        plusBtn = (Button) findViewById(R.id.plusBtn);
        plusBtn.setOnClickListener(clickListener);
        resetBtn = (Button) findViewById(R.id.resetBtn);
        resetBtn.setOnClickListener(clickListener);

        initCounter();
    }

    private void initCounter(){
        counter = 0;
        counterTxt.setText(counter + "");
    }

    private void plusCounter(){
        counter++;
        counterTxt.setText(counter + "");
    }

    private void minusCounter(){
        counter--;
        counterTxt.setText(counter + "");
    }
}


Share:

Hello World Application

In the last post, I described the process of setting up the android studio on PC. Now, In this blog post, I tell you the development of Hello World Application.



Step 1: Open android Studio. New Project --> Select Empty Project

Step 2: As already buildin Empty Project with Hello World in android  Studio as you can check activity_main.xml from layout. Now, you can build APK.




Your Hello World Application is ready to use.

Your Task:
             Replace the Hello World !... with some other words.....




Share:

Installation of Android Studio

Here, I am talking about installation of Android Studio on Window Platform. First of all, you should clear in your mind that there is about a little bit same process of installation of Android Studio on different Operating System but I am using android studion on both Window 32 bit and 64 bit Operating System. Okay, Let starts, now I guide you about


The installation of Android studio on 32 bit system step by step:


Step 1: Open www.google.com and write Download JDK 8. From the first link you may download jdk for window 32 bit. After downloading, you may install this jdk by default (without any change in path). (Remember that this is the java installation for Android Studio)

Step 2: Open www.google.com and write Download Android Studio. Open the first link and you may download android studio. After downloading, you need to setup by default (without any change in path) to set up android studio.


Installation of Android Studio on 64 bit system Step by Step:


Step 1: Open www.google.com and write Download JDK 8. From the first link you may download jdk for window 64 bit. After downloading, you may install this jdk by default (without any change in path). (Remember that this is the java installation for Android Studio)

Step 2: Open www.google.com and write Download latest JDK. From the first link you may download jdk for window 64 bit. After downloading, you may install this jdk by default (without any change in path).

Step 3: Open www.google.com and write Download Android Studio. Open the first link and you may download android studio. After downloading, you need to setup by default (without any change in path) to set up android studio.


You had all is done to setup android studio.

Share:

Sunday, February 23, 2020

English paper Gujranwala board 10th class Annual 2020



Objective Answer Keys
1. A
2. B
3. D
4. B
5. B
6. A
7. B
8. C
9. A
10. B
11. A
12. A
13. A
14. B
15. C
16. C
17. D
18. B
19. A
Share:

Friday, December 6, 2019

Search This Blog

Recent Posts