get Device Information, SIM Information, Network Information (Cool App)


Click Here To Download Apk File


Source Code:


AndroidManifest.xml


Take Permission:

 <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

activity_my.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".MyActivity"
    android:background="#BBFF00"
    >

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Click Here TO Get Information"
        android:id="@+id/info"
        android:layout_marginTop="91dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />

</RelativeLayout>

MyActivity.JAVA

package com.example.abdullah.hijack_android;

import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.telephony.TelephonyManager;

import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import   android.widget.Button;
import android.widget.Toast;

public class MyActivity extends ActionBarActivity {


    Button info;

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

       info=(Button)findViewById(R.id.info);


        final Context   context=this;
        info.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                TelephonyManager   phone=(TelephonyManager)getSystemService(context.TELEPHONY_SERVICE);
                      String  id=phone.getDeviceId();
                String networkCountryISO=phone.getNetworkCountryIso();
                String SIMSerialNumber=phone.getSimSerialNumber();
                String SIMCountryISO=phone.getSimCountryIso();
                String softwareVersion=phone.getDeviceSoftwareVersion();
                String voiceMailNumber=phone.getVoiceMailNumber();


                Toast.makeText(getApplicationContext(),"Network Operator: "+phone.getNetworkOperator()+"\nIMEI Number: "+id+"\nNetWork Country: "+networkCountryISO+"\nSIM  Serial Number: "+SIMSerialNumber+"\nSim Country ISO: "+SIMCountryISO+"\nSoftwareVersion: "+softwareVersion+"\nVoiceMailNumber: "+voiceMailNumber,Toast.LENGTH_LONG).show();

            }
        });



    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.my, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}