-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
060cc5b
commit 0413470
Showing
83 changed files
with
2,341 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Thu Jun 10 12:36:15 IST 2021 | ||
gradle.version=6.7.1 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
plugins { | ||
id 'com.android.application' | ||
} | ||
|
||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.3" | ||
|
||
defaultConfig { | ||
applicationId "com.example.pollingsystem" | ||
minSdkVersion 16 | ||
targetSdkVersion 30 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
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.3.0' | ||
implementation 'com.google.android.material:material:1.3.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
26 changes: 26 additions & 0 deletions
26
...e android/app/src/androidTest/java/com/example/pollingsystem/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.example.pollingsystem; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
assertEquals("com.example.pollingsystem", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.pollingsystem"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/vote" | ||
android:label="@string/app_name" | ||
android:requestLegacyExternalStorage="true" | ||
android:usesCleartextTraffic="true" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.PollingSystem"> | ||
<activity android:name=".View_result"></activity> | ||
<activity android:name=".Make_vote" /> | ||
<activity android:name=".View_election_status" /> | ||
<activity android:name=".View_booth" /> | ||
<activity android:name=".View_district" /> | ||
<activity android:name=".View_candidate" /> | ||
<activity android:name=".Home" /> | ||
<activity android:name=".Login" /> | ||
<activity android:name=".IPsettings" > | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
|
||
</activity> | ||
<activity android:name=".MainActivity"></activity> | ||
</application> | ||
|
||
</manifest> |
63 changes: 63 additions & 0 deletions
63
bvote android/app/src/main/java/com/example/pollingsystem/Home.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package com.example.pollingsystem; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
public class Home extends AppCompatActivity { | ||
Button b1, b2, b3, b4; | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_home); | ||
|
||
b1 = (Button) findViewById(R.id.btcandidate); | ||
b2 = (Button) findViewById(R.id.btdistrict); | ||
b3 = (Button) findViewById(R.id.btelection); | ||
b4 = (Button) findViewById(R.id.btlogout); | ||
|
||
b1.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
startActivity(new Intent(getApplicationContext(), View_candidate.class)); | ||
} | ||
}); | ||
|
||
b2.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
startActivity(new Intent(getApplicationContext(), View_district.class)); | ||
} | ||
}); | ||
|
||
b3.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
startActivity(new Intent(getApplicationContext(), View_election_status.class)); | ||
} | ||
}); | ||
|
||
b4.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
startActivity(new Intent(getApplicationContext(), Login.class)); | ||
} | ||
}); | ||
} | ||
|
||
public void onBackPressed() { | ||
// TODO Auto-generated method stub | ||
super.onBackPressed(); | ||
Intent b = new Intent(getApplicationContext(), Home.class); | ||
startActivity(b); | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
bvote android/app/src/main/java/com/example/pollingsystem/IPsettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package com.example.pollingsystem; | ||
|
||
|
||
|
||
import android.os.Bundle; | ||
import android.preference.PreferenceManager; | ||
import android.app.Activity; | ||
import android.app.AlertDialog; | ||
import android.content.DialogInterface; | ||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.content.SharedPreferences.Editor; | ||
import android.view.Menu; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.EditText; | ||
|
||
public class IPsettings extends Activity { | ||
EditText etip; | ||
Button btip; | ||
|
||
SharedPreferences sh; | ||
public static String ip; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_ipsettings); | ||
etip=(EditText)findViewById(R.id.etip); | ||
|
||
btip=(Button)findViewById(R.id.btsubmit); | ||
|
||
sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); | ||
etip.setText(sh.getString("ip", "")); | ||
|
||
btip.setOnClickListener(new View.OnClickListener() { | ||
|
||
@Override | ||
public void onClick(View arg0) { | ||
// TODO Auto-generated method stub | ||
|
||
ip=etip.getText().toString(); | ||
if(etip.getText().toString().equals("")) | ||
{ | ||
etip.setError("Enter IP Address"); | ||
etip.setFocusable(true); | ||
} | ||
else | ||
{ | ||
Editor e=sh.edit(); | ||
e.putString("ip", ip); | ||
e.commit(); | ||
startActivity(new Intent(getApplicationContext(),Login.class)); | ||
} | ||
|
||
} | ||
}); | ||
|
||
} | ||
|
||
|
||
public void onBackPressed() | ||
{ | ||
// TODO Auto-generated method stub | ||
new AlertDialog.Builder(this).setIcon(android.R.drawable.ic_dialog_alert) | ||
.setTitle("Exit :") | ||
.setMessage("Exit ...?") | ||
.setPositiveButton("Yes",new DialogInterface.OnClickListener() | ||
{ | ||
|
||
@Override | ||
public void onClick(DialogInterface arg0, int arg1) | ||
{ | ||
// TODO Auto-generated method stub | ||
Intent i=new Intent(Intent.ACTION_MAIN); | ||
i.addCategory(Intent.CATEGORY_HOME); | ||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
startActivity(i); | ||
finish(); | ||
} | ||
}).setNegativeButton("No",null).show(); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.