MajhaRojgar (เคฎाเคा เคฐोเคเคाเคฐ™)
เคฎाเคा เคฐोเคเคाเคฐ เคนे เคเค เคंเคเคฐเคจेเค เคตเคฐ เคเคชเคฒเคฌ्เคง เคเค เคธाเคเค เคเคนे เค्เคฏाเค्เคฏा เคฎाเคง्เคฏเคฎाเคคूเคจ เคเคชเคฒ्เคฏाเคฒा เคตिเคตीเคง Job's - เคฐोเคเคाเคฐा เคธंเคฌंเคงीเค्เคฏा Daily Update's เคฎिเคณเคคाเคค Notification เคชोเคธ्เค เคเคฃเคी เคฌเคฐेเค เคाเคนी.เคเคธे เคฎเคนाเคฐाเคท्เค्เคฐ เคถाเคธเคจा เคคเคฐ्เคซे Maha-DBT Farmer's เคคเคธेเค PoCRA เค्เคฏा เคฎाเคง्เคฏเคฎाเคคुเคจ เคตिเคตिเคง เคฏोเคเคจा เคฐाเคฌเคตिเคฒ्เคฏा เคाเคคाเคค.
เคชเคฐंเคคु เคเคชเคฒ्เคฏाเคฒ เคค्เคฏा เคฏोเคเคจांเคฌเคฆ्เคฆเคฒ เคชुเคฐे เคชुเคฐ เคฎเคนिเคคी เคจเคธเคคे เคिंเคต्เคนा เคเคชเคฒ्เคฏा เคชเคฐीเคฏंเคค เคฏा เคฏोเคเคจांเคฌเคฆ्เคฆเคฒ เคฎเคนिเคคी เคชोเคนोเคเคค เคจाเคนी เคค्เคฏाเคฎुเคณे เคถाเคธเคจाเค्เคฏा เคฏा เคฏोเคเคจांเคे เคฒाเคญ เคถेเคคเคเคฐी เคฌांเคงเคตांเคจा เคฎिเคณเคค เคจाเคนीं.
เคฎ्เคนเคฃूเคจ เคเคฎ्เคนी เคฏा เคธเคฎเคธ्เคฏेเคा เคเคชाเคฏ เคฎ्เคนเคฃूเคจ เคถेเคคเคเคฐी เคฎिเคค्เคฐांเคธाเค ी เคเค เคฎोเคฌाเคเคฒ เฅฒเคช เคेเคเคจ เคเคฒो เคเคนोเคค.
เคต เคคเคถेเค เคฏा เฅฒเคช เคฎเคงे เคเคชเคฒ्เคฏाเคฒ เคตिเคตीเคง เคช्เคฐเคाเคฐเคा เคธเคฐเคाเคฐी เคต เคाเคธเคी เคจोเคเคฑ्เคฏा เคธंเคฌंเคงीเคे เคธुเคฆ्เคงा Updates เคฎिเคณเคคीเคฒ เคเคฃे เคเคฐुเคฃ เคเคชเคฒ्เคฏा เคฎुเคฒाเคฌाเคณांเคจा เคธुเคฆ्เคงा เคค्เคฏाเคा เคฒाเคญ เคนोเคเคฒ.
Majha Rojgar - เคฎाเคा เคฐोเคเคाเคฐ เคฌเคฆ्เคฆเคฒ
Latest Government Job's in India
เคเคฅे เคเคชเคฒ्เคฏाเคฒा เคฐोเคเคाเคฐा เคธंเคฌंเคงिเคค เคธเคฐ्เคต เคช्เคฐเคाเคฐเค्เคฏा เคाเคธเคी เคต เคธเคฐเคाเคฐी เคจोเคเคฐी เคธंเคฌंเคงी Daily Update's เคฎिเคณเคคीเคฒ।
। เคช्เคฐเคตेเคถ เคชเคค्เคฐ। เคจिเคाเคฒ। เคฎเคนเคค्เคค्เคตाเค्เคฏा เคญเคฐเคคी। เคตเคฐ्เคคเคฎाเคจ เคญเคฐเคคी।
Majha Rojgar (เคฎाเคा เคฐोเคเคाเคฐ) เคे เคाเคนी เคฎुเค्เคฏ Topic's
Topic's
*๐เคตเคฐ्เคคเคฎाเคจ เคญเคฐเคคी
*๐ขเคฎेเคा เคญเคฐเคคी
*๐เคชเคฐीเค्เคทा
*๐เคช्เคฐเคตेเคถเคชเคค्เคฐ
*๐ขเคจिเคाเคฒ
*๐ขเคฎเคนเคค्เคค्เคตाเคी เคญเคฐเคคी
*๐เคฐेเคฒ्เคตे เคญเคฐเคคी
*๐ง๐งเค
เคช्เคฐेंเคीเคธ๐ง๐ป เคญเคฐเคคी
*๐ฆเคฌँเค เคญเคฐเคคी
*๐ก️เคธंเคฐเค्เคทเคฃ เคธेเคตा
*INDIAN ๐ฎ๐ณ ARMY
*๐ฅเค
เค्เคจिเคชเคฅ เคฏोเคเคจे เค
ंเคคเคฐ्เคเคค เคญเคฐเคคी
*๐ง✈️SSC
*๐ฎเคชोเคฒिเคธ เคญเคฐเคคी
* ๐ฎ๐ณ เคธเคฐเคाเคฐी เคฏोเคเคจा
* ๐พเคถेเคคเคเคฑ्เคฏा เคธाเค ीเค्เคฏा เคฏोเคเคจा๐ฑ
เคฎाเคा เคฐोเคเคाเคฐ เคे Android app เคเคคा เคเคชเคฒ्เคฏा เคธेเคตेเคฎเคง्เคฏे
Google Play Store เคตเคฐ เคฎोเคซเคค เคเคชเคฒเคฌ्เคง
เคจौเคเคฐी เคถोเคงเคค เคเคนाเคค। เคฎिเคณเคค เคจाเคนी เคเคนेเคค ।
เคเคนो เคฎเค เคตाเค เคเคธเคฒी เคฌเคเคค เคเคนाเคค। เคเคคเค เคกाเคเคจเคฒोเคก เคเคฐा เคฎाเคा เคฐोเคเคाเคฐ เคे Official App เคเคคा เคเคชเคฒ्เคฏा เคธेเคตे เคฎเคง्เคฏे.
เคฎाเคा เคฐोเคเคाเคฐ เคे Android app เคเคคा เคเคชเคฒ्เคฏा เคธेเคตेเคฎเคง्เคฏे
*เคฎिเคณเคตा เคฎเคนเคค्เคตाเค्เคฏा เคจोเคเคฐीเคे ๐ Notification เคเคคा เคเคชเคฒ्เคฏा เคฎोเคฌाเคเคฒ เคตเคฐเค
*เคธเคฐ्เคต เคช्เคฐเคाเคฐเค्เคฏा เคธเคฐเคाเคฐी เคต เคाเคธเคी เคจौเคเคฐी เคตिเคทเคฏ เคฎเคฐाเค ि เคคुเคจ เคฎाเคนिเคคी เคฆेเคจाเคฐे เคฆेเคถाเคคीเคฒ เคเค เคฎेเคต App
*เคเคคा เคเคชเคฒ्เคฏा เคธेเคต เคฎเคงे Google Play Store เคตเคฐ เคฎोเคซเคค เคเคชเคฒเคฌ्เคง
Download App
Official Website :- https://www.majharojgar.in
App CODE in Android Studio
1) MainActivity.java
package com.apnajob.majharojgar;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.onesignal.OneSignal;
public class MainActivity extends AppCompatActivity {
String websiteURL = "https://www.majharojgar.in/"; // sets web url
private WebView webview;
SwipeRefreshLayout mySwipeRefreshLayout;
private ProgressBar progressBar;
private static final String ONESIGNAL_APP_ID = "0f68de21-6c4d-44f0-b5f0-8caafda93a3d";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Enable verbose OneSignal logging to debug issues if needed.
OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE);
// OneSignal Initialization
OneSignal.initWithContext(this);
OneSignal.setAppId(ONESIGNAL_APP_ID);
// promptForPushNotifications will show the native Android notification permission prompt.
// We recommend removing the following code and instead using an In-App Message to prompt for notification permission (See step 7)
OneSignal.promptForPushNotifications();
if( ! CheckNetwork.isInternetAvailable(this)) //returns true if internet available
{
//if there is no internet do this
setContentView(R.layout.activity_main);
//Toast.makeText(this,"No Internet Connection, Chris",Toast.LENGTH_LONG).show();
new AlertDialog.Builder(this) //alert the person knowing they are about to close
.setTitle("No internet connection available")
.setMessage("Please Check you're Mobile data or Wifi network.")
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
//.setNegativeButton("No", null)
.show();
}
else
{
//Webview stuff
webview = findViewById(R.id.webView);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setDomStorageEnabled(true);
webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER);
webview.loadUrl(websiteURL);
webview.setWebViewClient(new WebViewClientDemo());
webview.setWebChromeClient(new WebChromeClientDemo());
}
//Swipe to refresh functionality
mySwipeRefreshLayout = (SwipeRefreshLayout)this.findViewById(R.id.swipeContainer);
mySwipeRefreshLayout.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
webview.reload();
}
}
);
//Progress bar
progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setMax(100);
}
private class WebViewClientDemo extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
progressBar.setVisibility(View.GONE);
progressBar.setProgress(100);
mySwipeRefreshLayout.setRefreshing(false);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
progressBar.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
}
}
private class WebChromeClientDemo extends WebChromeClient {
public void onProgressChanged(WebView view, int progress) {
progressBar.setProgress(progress);
}
}
//set back button functionality
@Override
public void onBackPressed() { //if user presses the back button do this
if (webview.isFocused() && webview.canGoBack()) { //check if in webview and the user can go back
webview.goBack(); //go back in webview
} else { //do this if the webview cannot go back any further
new AlertDialog.Builder(this) //alert the person knowing they are about to close
.setTitle("EXIT")
.setMessage("Are you sure. You want to Exit ?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.setNegativeButton("No", null)
.show();
}
}
}
class CheckNetwork {
private static final String TAG = CheckNetwork.class.getSimpleName();
public static boolean isInternetAvailable(Context context)
{
NetworkInfo info = (NetworkInfo) ((ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
if (info == null)
{
Log.d(TAG,"no internet connection");
return false;
}
else
{
if(info.isConnected())
{
Log.d(TAG," internet connection available...");
return true;
}
else
{
Log.d(TAG," internet connection");
return true;
}
}
}
}
2) activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
tools:ignore="MissingConstraints" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="55dp"
android:layout_height="55dp"
android:indeterminate="false"
android:max="100"
android:progress="20"
android:progressTint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
3) AndroidMainifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.apnajob.majharojgar">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MajhaRojgar"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="false" />
<activity
android:name=".SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
4) SplashActivity.java
package com.apnajob.majharojgar;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Window window = getWindow() ;
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);
Thread splashTread = new Thread(){
@Override
public void run() {
try {
sleep(3000);
startActivity(new Intent(getApplicationContext(),MainActivity.class));
finish();
} catch (InterruptedException e) {
e.printStackTrace();
}
super.run();
}
};
splashTread.start();
}
}
5) activity_splash.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".SplashActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="300dp"
android:src="@drawable/logo"
android:scaleType="centerCrop"
android:padding="50dp"
android:layout_marginTop="220dp"/>
<ProgressBar
android:layout_width="220dp"
android:layout_height="10dp"
android:layout_gravity="center_horizontal"
style="?android:attr/progressBarStyleHorizontal"
android:max="100"
android:indeterminate="true"
android:progress="0"
android:layout_marginTop="100dp"
/>
</LinearLayout>
6) Gradle Scripts
build.gradle(app)
CODE :-
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.apnajob.majharojgar"
minSdk 21
targetSdk 32
versionCode 2
versionName "2.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.firebase:firebase-messaging:23.0.7'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
}
7) settings.gradle(Majha Rojgar)
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
jcenter()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
}
}
rootProject.name = "Majha Rojgar"
include ':app'



No comments:
Post a Comment