Commit 15680fad authored by Salika Madhushanka W.J's avatar Salika Madhushanka W.J

Merge branch 'IT19240152' into 'master'

It19240152

See merge request !2
parents 997ae949 3b2f43fe
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
E ketha
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
/src/main/assets
\ No newline at end of file
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.chaquo.python'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.eketha"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "x86"
}
python {
buildPython "C:/python/python.exe"
pip {
install "opencv-contrib-python-headless"
install "pillow"
install "numpy"
install "fastapi"
install "matplotlib"
install "dlib"
install "imutils"
install "argparse"
install "scipy"
}
}
sourceSets {
main {
python.srcDir "src/main/python"
}
}
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
aaptOptions {
noCompress "tflite"
//noCompress "lite"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.firebase:firebase-firestore:23.0.3'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'org.tensorflow:tensorflow-lite-support:0.1.0'
implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation('org.tensorflow:tensorflow-lite:0.0.0-nightly') { changing = true }
implementation('org.tensorflow:tensorflow-lite-gpu:0.0.0-nightly') { changing = true }
implementation('org.tensorflow:tensorflow-lite-support:0.0.0-nightly') { changing = true }
//Tensorflow Lite Dependencies
implementation 'org.tensorflow:tensorflow-lite:+'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
\ No newline at end of file
{
"project_info": {
"project_number": "298794319825",
"project_id": "e-ketha-1d78c",
"storage_bucket": "e-ketha-1d78c.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:298794319825:android:655562d35cdefc6beb2af0",
"android_client_info": {
"package_name": "com.example.eketha"
}
},
"oauth_client": [
{
"client_id": "298794319825-ggpi5ip7rblgnrtjd45agcgpta9vosfu.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDUT3ASDvnYO9wWONGaXq8VceXfKTgYYGY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "298794319825-ggpi5ip7rblgnrtjd45agcgpta9vosfu.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
# 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
\ No newline at end of file
package com.example.eketha;
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.eketha", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.eketha">
<uses-feature
android:name="android.hardware.Camera.any"
android:required="true" />
<uses-feature
android:name="android.hardware.Camera"
android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.EKetha">
<activity android:name=".SplashScreen"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GrowthHeight" />
<activity android:name=".GrowthThreatment" />
<activity android:name=".GrowthDetect" />
<activity android:name=".Admin" />
<activity android:name=".growthHome" />
<activity android:name=".Growth" />
<activity android:name=".Register" />
<activity android:name=".Login"/>
<activity android:name=".MainActivity" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Admin extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
}
}
\ No newline at end of file
This diff is collapsed.
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import org.tensorflow.lite.support.common.TensorProcessor;
import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.List;
public class GrowthDetect extends AppCompatActivity {
private TensorBuffer outputProbabilityBuffer;
private TensorProcessor probabilityProcessor;
private Bitmap bitmap,inputImage,outputImage,outputImage1;
private List<String> labels;
private TextView resulttext,resulttext2;
private Button btnTreatment, btn;
private ImageView imageView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_detect);
imageView1 = findViewById(R.id.image2);
btnTreatment = findViewById(R.id.btnTreatment);
resulttext = findViewById(R.id.resulttext);
resulttext2 = findViewById(R.id.resulttext2);
String result = getIntent().getStringExtra("results");
resulttext.setText(result);
String det = getIntent().getStringExtra("details");
resulttext2.setText(det);
String button = getIntent().getStringExtra("button");
btnTreatment.setText(button);
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
if(button.equals("Height Measurement")){
btnTreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String result2 = resulttext.getText().toString();
String treatment = "";
if(result2.equals("Rice")){
treatment="Rice";
System.out.println(result2);
} else if(result2.equals("Weed")){
treatment=getResources().getString(R.string.treatment1);
System.out.println(result2);
}
BitmapDrawable drawable = (BitmapDrawable) imageView1.getDrawable();
outputImage = drawable.getBitmap();
try {
//Write file
String filename = "bitmap.png";
FileOutputStream stream = openFileOutput(filename, Context.MODE_PRIVATE);
outputImage.compress(Bitmap.CompressFormat.PNG, 100, stream);
//Cleanup
stream.close();
outputImage.recycle();
Intent intent2 = new Intent(GrowthDetect.this, GrowthHeight.class);
intent2.putExtra("results2", result2);
intent2.putExtra("image", filename);
startActivity(intent2);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}else if(button.equals("Weed Identification")) {
{
btnTreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Intent intent2 = new Intent(GrowthDetect.this, Weeds.class);
// startActivity(intent2);
}
});
}
}
}
}
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.util.Base64;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import com.chaquo.python.PyObject;
import com.chaquo.python.Python;
import com.chaquo.python.android.AndroidPlatform;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class GrowthHeight extends AppCompatActivity {
private Handler handler = null;
private Bitmap inputImage,newImage,bitmap,outputImage,outputImage1;
private Button btnHeight,btnThreatment;
private ImageView imageView1;
private BitmapDrawable drawable;
private String imageString;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_height);
imageView1 = findViewById(R.id.imageHeightView);
btnHeight = findViewById(R.id.button3);
btnThreatment = findViewById(R.id.button2);
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
btnThreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BitmapDrawable drawable = (BitmapDrawable) imageView1.getDrawable();
outputImage1 = drawable.getBitmap();
try {
//Write file
String filename = "bitmap.png";
FileOutputStream stream = openFileOutput(filename, Context.MODE_PRIVATE);
outputImage1.compress(Bitmap.CompressFormat.PNG, 100, stream);
//Cleanup
stream.close();
outputImage1.recycle();
//Pop intent
Intent intent = new Intent(GrowthHeight.this, GrowthThreatment.class);
intent.putExtra("image", filename);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
});
btnHeight.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
autoDenoiseImage();
}
});
}
private void autoDenoiseImage() {
new Thread() {
public void run() {
startMeasuring();
newImage = outputImage;
handler.sendEmptyMessage(0);
}
}.start();
handler = new Handler() {
public void handleMessage(android.os.Message msg) {
imageView1.setImageBitmap(outputImage);
}
;
};
}
public void heightImage(View v) {
autoDenoiseImage();
imageView1.setImageBitmap(newImage);
}
private String getStringImage(Bitmap bitmap) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
byte[] imageBytes = byteArrayOutputStream.toByteArray();
String encodedImage = Base64.encodeToString(imageBytes, Base64.DEFAULT);
return encodedImage;
}
public void startMeasuring() {
final Python py= Python.getInstance();
imageString = getStringImage(inputImage);
PyObject pyo = py.getModule("height");
PyObject obj = pyo.callAttr("main", imageString);
String str = obj.toString();
byte data[] = Base64.decode(str, Base64.DEFAULT);
Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
outputImage = bmp;
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;
import java.io.FileInputStream;
public class GrowthThreatment extends AppCompatActivity {
private Bitmap inputImage;
private ImageView imageView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_threatment);
imageView1 = findViewById(R.id.treatImg);
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.InputType;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
public class Login extends AppCompatActivity {
EditText Email, password;
Button login;
boolean valid;
FirebaseAuth fAuth;
FirebaseFirestore fStore;
TextView text2;
CheckBox remember;
SharedPreferences sharedPreferences;
SharedPreferences.Editor editor;
Boolean saveLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
Email = findViewById(R.id.loginemail);
password = findViewById(R.id.loginpassword);
login = findViewById(R.id.btnlogin);
text2 = findViewById(R.id.txtdonthaveacc);
fAuth = FirebaseAuth.getInstance();
fStore = FirebaseFirestore.getInstance();
remember=findViewById(R.id.rememmber_me);
password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
//remember me---------------------------------------------------------------------------------------------------------------------------
sharedPreferences=getSharedPreferences("PRESS_NAME",MODE_PRIVATE);
editor=sharedPreferences.edit();
saveLogin=sharedPreferences.getBoolean("SaveLogin",true);
if (saveLogin = true) {
Email.setText(sharedPreferences.getString("Email", null));
password.setText(sharedPreferences.getString("password", null));
}
//click the signUp button----------------------------------------------------------------------------------------------------------
text2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Register.class));
}
});
//-----------------------------------------------------------------------------------------------------------------------------------
//Click the login button------------------------------------------------------------------------------------------------------------
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
checkField(Email);
checkField(password);
if (valid) {
fAuth.signInWithEmailAndPassword(Email.getText().toString(), password.getText().toString()).addOnSuccessListener(new OnSuccessListener<AuthResult>() {
@Override
public void onSuccess(AuthResult authResult) {
Toast.makeText(Login.this, "Logging Successfully", Toast.LENGTH_SHORT).show();
checkUserAccessLevel(authResult.getUser().getUid());
//check the remember me checked------------------------------------------------------------------------------------------
if(remember.isChecked()){
editor.putBoolean("SaveLogin",true);
editor.putString("Email",Email.getText().toString());
editor.putString("password",password.getText().toString());
editor.commit();
Toast.makeText(Login.this, "Save Email and password", Toast.LENGTH_SHORT).show();
}else {
//Toast.makeText(Login.this, "Remember Not Save Email and password", Toast.LENGTH_SHORT).show();
}
//---------------------------------------------------------------------------------------------------------------------
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Login.this, "Logging Failed", Toast.LENGTH_SHORT).show();
}
});
}
}
});
//------------------------------------------------------------------------------------------------------------------------------------------
}//end the main-------------------------------------------------------------------------------------------------------------------------------
//Define the user roles user and admin-------------------------------------------------------------------------------------------------------
private void checkUserAccessLevel(String uid) {
DocumentReference df = fStore.collection("Users").document(uid);
//extract data from the users
df.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
@Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
Log.d("TAG", "onSuccess" + documentSnapshot.getData());
//identity user access level
if (documentSnapshot.getString("isAdmin") != null) {
//user admin
startActivity(new Intent(getApplicationContext(), Admin.class));
finish();
}
if (documentSnapshot.getString("isUser") != null) {
//user users
Intent i = new Intent(getApplicationContext(), MainActivity.class);
startActivity(i);
finish();
}
}
});
}//end user role-----
//check the validation------------------------------------------------------------------------------------------------------------------------
public boolean checkField(EditText textFiled) {
if (textFiled == Email) {
String val = Email.getText().toString();
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (val.isEmpty()) {
Email.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(emailPattern)) {
Email.setError("Invalid email address");
valid = false;
} else {
Email.setError(null);
valid = true;
}
return valid;
}
else if(textFiled==password){
String val=password.getText().toString();
if (val.isEmpty()) {
password.setError("Field cannot be empty");
valid= false;
} else if (val.length()<6) {
password.setError("At least 6 characters");
valid= false;
}else {
password.setError(null);
valid= true;
}
return valid;
}
return valid;
}
@Override
protected void onStart() {
super.onStart();
if (FirebaseAuth.getInstance().getCurrentUser() != null) {
startActivity(new Intent(getApplicationContext(), MainActivity.class));
finish();
}
}//end validation
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import com.google.firebase.auth.FirebaseAuth;
public class MainActivity extends AppCompatActivity {
private CardView cardView1, cardView2, cardView3, cardView4;
private ImageButton logout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
cardView1 = findViewById(R.id.card1);
cardView2 = findViewById(R.id.card2);
cardView3 = findViewById(R.id.card3);
cardView4 = findViewById(R.id.card4);
logout = findViewById(R.id.btnalogout);
logout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseAuth.getInstance().signOut();
startActivity(new Intent(getApplicationContext(), Login.class));
finish();
}
});
// cardView1.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),pdHome.class);
// startActivity(intent);
// }
// });
//
// cardView2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),weedHome.class);
// startActivity(intent);
// }
// });
//
// cardView3.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),fertilizerHome.class);
// startActivity(intent);
// }
// });
cardView4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),growthHome.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.eketha;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkClient {
private static Retrofit retrofit;
private static String BASE_URL = "www.abc.com/";
public static Retrofit getRetrofit() {
OkHttpClient okHttpClient = new OkHttpClient.Builder().build();
if (retrofit == null) {
retrofit = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(okHttpClient).build();
}
return retrofit;
}
}
package com.example.eketha;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.FirebaseFirestore;
import java.util.HashMap;
import java.util.Map;
public class Register extends AppCompatActivity {
EditText fullName, password, retypePassword, Email, mobile;
Button createAccount;
boolean valid = true;
TextView text;
FirebaseAuth fAuth;
FirebaseFirestore fStory;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
fAuth = FirebaseAuth.getInstance();
fStory = FirebaseFirestore.getInstance();
fullName = findViewById(R.id.registerfullName);
Email = findViewById(R.id.registeremail);
mobile = findViewById(R.id.registermobile);
password = findViewById(R.id.registerpassword);
retypePassword = findViewById(R.id.registerretypepassowrd);
createAccount = findViewById(R.id.btnregcreateaccount);
text = findViewById(R.id.txtsigiin);
createAccount.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//Validation check-----------------------------------------------------------------------------------------------------------------------
checkField(fullName);
checkField(Email);
checkField(mobile);
checkField(password);
checkField(retypePassword);
//database input--------------------------------------------------------------------------------------------------------------------------
if (valid) {
fAuth.createUserWithEmailAndPassword(Email.getText().toString(), password.getText().toString()).addOnSuccessListener(new OnSuccessListener<AuthResult>() {
@Override
public void onSuccess(AuthResult authResult) {
FirebaseUser user = fAuth.getCurrentUser();
Toast.makeText(Register.this, "Account Created", Toast.LENGTH_SHORT).show();
DocumentReference df = fStory.collection("Users").document(user.getUid());
Map<String, Object> userInfo = new HashMap<>();
userInfo.put("FullName", fullName.getText().toString());
userInfo.put("Email", Email.getText().toString());
userInfo.put("Mobile", mobile.getText().toString());
userInfo.put("Password", password.getText().toString());
//specify if the user is admin//
userInfo.put("isUser", "1");
df.set(userInfo);
FirebaseAuth.getInstance().signOut();
//startActivity(new Intent(getApplicationContext(), MainActivity.class));
finish();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Register.this, "Failed to Create Account", Toast.LENGTH_LONG).show();
}
});
}
}
});
text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Login.class));
}
});
}
//-----------------------------------------------validation-------------------------------------------------------------------------
public boolean checkField(EditText textFiled) {
if (textFiled == fullName) {
String val = fullName.getText().toString();
if (val.isEmpty()) {
fullName.setError("Field cannot be empty");
valid = false;
} else {
fullName.setError(null);
valid = true;
}
return valid;
} else if (textFiled == Email) {
String val = Email.getText().toString();
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (val.isEmpty()) {
Email.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(emailPattern)) {
Email.setError("Invalid email address");
valid = false;
} else {
Email.setError(null);
valid = true;
}
return valid;
} else if (textFiled == mobile) {
String val = mobile.getText().toString();
String MobilePattern = "[0-9]{10}";
if (val.isEmpty()) {
mobile.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(MobilePattern)) {
mobile.setError("Invalid 10 digit mobile no ");
valid = false;
} else if (val.length()<10) {
mobile.setError("Invalid 10 digit no");
valid = false;
} else {
mobile.setError(null);
valid = true;
}
return valid;
} else if (textFiled == password) {
String val = password.getText().toString();
String passwordVal = "^" +
//"(?=.*[0-9])" + //at least 1 digit
//"(?=.*[a-z])" + //at least 1 lower case letter
//"(?=.*[A-Z])" + //at least 1 upper case letter
"(?=.*[a-zA-Z])" + //any letter
"(?=.*[@#$%^&+=])" + //at least 1 special character
"(?=\\S+$)" + //no white spaces
".{4,}" + //at least 4 characters
"$";
if (val.isEmpty()) {
password.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(passwordVal)) {
password.setError("Password is too weak");
valid = false;
} else if (val.length() < 6) {
password.setError("At least 6 characters");
valid = false;
} else {
password.setError(null);
valid = true;
}
return valid;
} else if (textFiled == retypePassword) {
String val = retypePassword.getText().toString();
String val2 = password.getText().toString();
String passwordVal = "^" +
//"(?=.*[0-9])" + //at least 1 digit
//"(?=.*[a-z])" + //at least 1 lower case letter
//"(?=.*[A-Z])" + //at least 1 upper case letter
"(?=.*[a-zA-Z])" + //any letter
"(?=.*[@#$%^&+=])" + //at least 1 special character
"(?=\\S+$)" + //no white spaces
".{4,}" + //at least 4 characters
"$";
if (val.isEmpty()) {
retypePassword.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(passwordVal)) {
retypePassword.setError("Password is too weak");
valid = false;
} else if (val.charAt(0)=='0') {
retypePassword.setError("At first 0 characters");
valid = false;
} else if (!val2.equals(val)) {
retypePassword.setError("Does to match the password");
valid = false;
} else {
retypePassword.setError(null);
valid = true;
}
return valid;
}
return valid;
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
public class SplashScreen extends AppCompatActivity {
private static int SPLASH_TIME = 3000;
private ImageView image;
private TextView hi,welcome;
private Animation topanim,bottomanim;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
image = findViewById(R.id.imageView);
hi = findViewById(R.id.txthi);
welcome = findViewById(R.id.txtwelcm);
//Animations
topanim = AnimationUtils.loadAnimation(this, R.anim.top_animation);
bottomanim = AnimationUtils.loadAnimation(this, R.anim.botton_animation);
image.setAnimation(topanim);
hi.setAnimation(bottomanim);
welcome.setAnimation(bottomanim);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
FirebaseAuth.getInstance().signOut();
Intent n = new Intent(SplashScreen.this, Login.class);
startActivity(n);
finish();
}
},SPLASH_TIME);
}
}
\ No newline at end of file
package com.example.eketha;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface UploadApis {
@Multipart
@POST("upload")
Call<RequestBody> uploadImage(@Part MultipartBody.Part part, @Part("somedata") RequestBody requestBody);
}
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
public class growthHome extends AppCompatActivity {
private LinearLayout layer1, layer2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_home);
layer1 = findViewById(R.id.layer2);
//layer2 = findViewById(R.id.layer3);
layer1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),Growth.class);
startActivity(intent);
}
});
// layer2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),Fertilizer.class);
// startActivity(intent);
// }
// });
}
}
\ No newline at end of file
from scipy.spatial.distance import euclidean
from imutils import perspective
from imutils import contours
import argparse
import numpy as np
import imutils
import cv2
import base64
import io
from PIL import Image
import os
def show_images(images):
for i, img in enumerate(images):
cv2.imshow("image_" + str(i), img)
def main(data):
#decode the image
decoded_data = base64.b64decode(data)
np_data = np.fromstring(decoded_data, np.uint8)
in_img = cv2.imdecode(np_data, cv2.IMREAD_UNCHANGED)
out_img = in_img.copy()
if len(out_img.shape) < 3:
out_img.resize(*out_img.shape,1)
gray = cv2.cvtColor(out_img, cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray, (9, 9), 0)
edged = cv2.Canny(blur, 50, 100)
edged = cv2.dilate(edged, None, iterations=1)
edged = cv2.erode(edged, None, iterations=1)
cnts = cv2.findContours(edged.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
(cnts, _) = contours.sort_contours(cnts)
cnts = [x for x in cnts if cv2.contourArea(x) >2000]
ref_object = cnts[0]
box = cv2.minAreaRect(ref_object)
box = cv2.boxPoints(box)
box = np.array(box, dtype="int")
box = perspective.order_points(box)
(tl, tr, br, bl) = box
dist_in_pixel = euclidean(tl, tr)
dist_in_cm =10
pixel_per_cm = dist_in_pixel/dist_in_cm
for cnt in cnts:
box = cv2.minAreaRect(cnt)
box = cv2.boxPoints(box)
box = np.array(box, dtype="int")
box = perspective.order_points(box)
(tl, tr, br, bl) = box
cv2.drawContours(out_img, [box.astype("int")], -1, (0, 0, 255), 2)
mid_pt_horizontal = (tl[0] + int(abs(tr[0] - tl[0])/2), tl[1] + int(abs(tr[1] - tl[1])/2))
mid_pt_verticle = (tr[0] + int(abs(tr[0] - br[0])/2), tr[1] + int(abs(tr[1] - br[1])/2))
wid = euclidean(tl, tr)/pixel_per_cm
ht = euclidean(tr, br)/pixel_per_cm
cv2.putText(out_img, "{:.1f}cm".format(ht), (int(mid_pt_verticle[0] + 10), int(mid_pt_verticle[1])),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 5), 2)
pil_img = Image.fromarray(out_img)
buff = io.BytesIO()
pil_img.save(buff, format="JPEG")
#encode the image
img_str = base64.b64encode(buff.getvalue())
return ""+str(img_str, 'utf-8')
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="1500"
android:fromXDelta="0%"
android:fromYDelta="100%" />
<alpha
android:duration="1500"
android:fromAlpha="0.1"
android:toAlpha="1.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="2000"
android:fromXDelta="0%"
android:fromYDelta="-50%" />
<alpha
android:duration="1500"
android:fromAlpha="0.1"
android:toAlpha="1.0" />
</set>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/limegreen"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="700"
android:viewportHeight="700">
<path
android:fillColor="#FF000000"
android:pathData="m416.64,383.04c-6.719,0.559 -12.879,-2.801 -19.039,-6.16 -56.562,-33.039 -104.72,-80.078 -138.32,-136.08 -6.16,-9.519 -11.762,-20.719 -9.519,-31.922 3.922,-21.281 30.801,-29.68 38.641,-49.84 7.281,-17.359 -2.238,-36.961 -13.441,-52.078 -18.48,-25.199 -42,-47.039 -68.879,-63.281 -12.883,-7.84 -26.883,-14.559 -42.004,-15.68 -67.758,-3.359 -71.68,109.76 -62.719,154 9.519,45.922 32.48,88.48 59.359,127.12 63.281,91.84 150.08,169.68 255.36,206.64 36.961,12.879 76.719,20.719 114.8,11.762 19.039,-4.481 36.961,-12.879 50.398,-27.441 13.441,-14 20.719,-34.16 17.359,-53.199 -3.359,-19.602 -16.801,-35.281 -30.238,-49.281 -19.602,-20.16 -41.441,-38.078 -64.961,-53.762 -4.481,-2.801 -8.961,-5.602 -14,-6.16 -5.602,-0.559 -10.641,2.238 -15.68,5.039 -14,7.84 -26.879,17.359 -38.078,28 -5.039,5.039 -10.641,10.078 -17.359,11.199 -0.559,0.563 -1.121,1.121 -1.68,1.121z"/>
</vector>
<vector android:height="24dp" android:tint="@color/black"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector android:height="24dp" android:tint="@color/black"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
</vector>
<vector android:height="40dp" android:viewportHeight="700"
android:viewportWidth="700" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="m254.27,170.59c0,-25.391 10.086,-49.742 28.039,-67.695 17.953,-17.953 42.305,-28.043 67.695,-28.043s49.742,10.09 67.695,28.043c17.953,17.953 28.039,42.305 28.039,67.695s-10.086,49.738 -28.039,67.695c-17.953,17.953 -42.305,28.039 -67.695,28.039 -25.383,-0.027 -49.715,-10.125 -67.664,-28.07 -17.949,-17.949 -28.043,-42.285 -28.07,-67.664zM377.36,293.68h-54.703c-32.637,0.039 -63.922,13.02 -86.996,36.094 -23.074,23.074 -36.055,54.363 -36.094,86.996 0.023,18.129 7.234,35.508 20.051,48.328 12.82,12.82 30.203,20.031 48.332,20.055h164.12c18.129,-0.023 35.512,-7.234 48.332,-20.055 12.816,-12.82 20.027,-30.199 20.051,-48.328 -0.039,-32.633 -13.02,-63.922 -36.094,-86.996 -23.074,-23.074 -54.359,-36.055 -86.996,-36.094z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/lime"/>
<corners android:radius="100dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="@color/green"
android:width="1dp"/>
<corners android:radius="100dp"/>
</shape>
\ No newline at end of file
<?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=".Admin">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:gravity="center"
tools:context=".Growth">
<TextView
android:id="@+id/text"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IDENTIFICATION OF RICE RELATED PlANTS"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="20dp" />
<ImageView
android:id="@+id/image"
android:layout_width="370sp"
android:layout_height="370sp"
android:layout_centerHorizontal="true"
android:layout_marginTop="10sp" />
<Button
android:id="@+id/btnTakePic"
android:layout_marginTop="200dp"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_above="@id/button2"
android:layout_margin="10dp"
android:text="Open Camera"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnOpenCam"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:text="Launch Gallery"
android:textAllCaps="false"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnConfirm"
android:layout_width="wrap_content"
android:layout_height="68dp"
android:layout_margin="10dp"
android:allowClickWhenDisabled="true"
android:text="Rice Identification"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/classitext"
android:layout_marginTop="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp" />
<TextView
android:id="@+id/treattext"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Result"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="20dp" />
</LinearLayout>
\ No newline at end of file
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".GrowthDetect">
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RICE PLANT RESULT"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="30dp" />
<TextView
android:id="@+id/resulttext"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Result"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="30dp" />
<ImageView
android:id="@+id/image2"
android:layout_width="370sp"
android:layout_height="370sp"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/resulttext2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Growth Details"
android:textAlignment="textStart"
android:textColor="#212121"
android:textSize="15dp"
android:textStyle="bold" />
<Button
android:id="@+id/btnTreatment"
android:layout_width="wrap_content"
android:layout_height="68dp"
android:layout_margin="10dp"
android:layout_marginTop="10dp"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textStyle="bold"
android:text="TREATMENTS"/>
</LinearLayout>
\ No newline at end of file
<?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"
android:layout_margin="10dp"
tools:context=".GrowthHeight">
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="108dp"
android:onClick="heightImage"
android:text="Height Measurement"
android:textAllCaps="false"
android:textSize="21sp"
android:textStyle="bold" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="24dp"
android:text="Growth Threatment"
android:textAllCaps="false"
android:textSize="21sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="#009688"
android:text="Height Measurement"
android:textStyle="bold"
android:textSize="30sp"
android:id="@+id/height"
android:layout_marginTop="20sp"
/>
<ImageView
android:id="@+id/imageHeightView"
android:layout_width="370sp"
android:src="@drawable/a"
android:layout_height="370sp"
android:layout_below="@+id/height"
android:layout_centerHorizontal="true"
android:layout_marginTop="10sp"
android:onClick="heightImage" />
</RelativeLayout>
\ No newline at end of file
<?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=".growthHome">
<LinearLayout
android:id="@+id/layer1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginLeft="120dp"
android:layout_marginTop="30dp"
app:srcCompat="@drawable/logo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Growth Management"
android:textStyle="italic"
android:textColor="@color/black"
android:layout_marginTop="10dp"
android:layout_marginLeft="60dp"
android:textSize="30dp"/>
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="173dp"
android:layout_marginRight="30dp"
app:cardCornerRadius="8dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="30dp">
<LinearLayout
android:id="@+id/layer2"
android:background="@color/gray"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="30dp">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
app:srcCompat="@drawable/rice" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="36dp"
android:textColor="@color/white"
android:text="Rice Plant Identification"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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=".GrowthThreatment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/treatText1"
android:layout_margin="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GROWTH TREATMENTS"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="20dp" />
<TextView
android:id="@+id/treatText2"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Growth"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="20dp">
</TextView>
<ImageView
android:id="@+id/treatImg"
android:layout_width="196dp"
android:layout_height="226dp"
android:layout_marginTop="5dp">
</ImageView>
<TextView
android:id="@+id/treatText3"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Treatments"
android:textAlignment="viewStart"
android:textColor="#00BCD4"
android:textSize="20dp">
</TextView>
<TextView
android:id="@+id/treatText4"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Treatment Details"
android:textAlignment="viewStart"
android:textColor="#212121"
android:textStyle="bold"
android:textSize="15dp">
</TextView>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?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=".Login">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="62dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="40dp"
android:fontFamily="sans-serif-black"
android:text="@string/login"
android:textColor="#006400"
android:textSize="50dp" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="129dp"
android:layout_height="122dp"
android:layout_marginLeft="40dp"
app:srcCompat="@drawable/logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="376dp"
android:layout_height="29dp"
android:layout_margin="10dp"
android:text="@string/email"
android:textColor="@color/black"
android:textColorHint="#FFFBFB"
android:textSize="24sp" />
<EditText
android:id="@+id/loginemail"
android:layout_width="match_parent"
android:layout_height="68dp"
android:hint="@string/email"
android:inputType="textPersonName"
android:padding="16dp"
android:textColorHint="#AFA4A4"/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:layout_height="36dp"
android:text="@string/password"
android:textColor="@color/black"
android:textSize="24sp" />
<EditText
android:id="@+id/loginpassword"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:hint="@string/password"
android:inputType="textPassword"
android:padding="16dp"
android:textColorHint="#AFA4A4" />
<CheckBox
android:id="@+id/rememmber_me"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="@color/black"
android:text="@string/rememberme"
android:textColorHint="#FFFBFB"
android:textSize="18sp" />
<Button
android:id="@+id/btnlogin"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:text="@string/login"
android:textColor="#EDE8E8"
android:textSize="18sp"/>
<TextView
android:id="@+id/txtdonthaveacc"
android:layout_width="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="60dp"
android:layout_height="wrap_content"
android:text="Don't Have Account? Register"
android:textColor="@color/black"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
<?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=".Register">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView20"
android:layout_width="178dp"
android:layout_height="62dp"
android:layout_marginTop="40dp"
android:fontFamily="sans-serif-black"
android:text="@string/signup"
android:textColor="#006400"
android:textSize="50dp"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="129dp"
android:layout_height="122dp"
android:layout_marginTop="4dp"
android:layout_marginLeft="40dp"
app:srcCompat="@drawable/logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="30dp"
android:orientation="vertical"
android:layout_marginRight="20dp">
<EditText
android:id="@+id/registerfullName"
android:layout_width="match_parent"
android:layout_height="68dp"
android:hint="@string/fullName"
android:inputType="textPersonName"
android:padding="16dp"
android:textColor="#100E0E"
android:textColorHint="#817B7B" />
<EditText
android:id="@+id/registeremail"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="68dp"
android:drawableLeft="@drawable/ic_email"
android:hint="@string/email"
android:inputType="textEmailAddress"
android:padding="16dp"
android:textColor="#1E1818"
android:textColorHint="#958E8E"/>
<EditText
android:id="@+id/registermobile"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:backgroundTint="#120F0F"
android:drawableLeft="@drawable/ic_call"
android:hint="@string/mobile"
android:inputType="phone"
android:padding="16dp"
android:textColor="#000000"
android:textColorHint="#7C7676" />
<EditText
android:id="@+id/registerpassword"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:drawableLeft="@drawable/ic_lock"
android:hint="@string/password"
android:inputType="textPassword"
android:padding="16dp"
android:textColor="#0B0909"
android:textColorHint="#8E8282"/>
<EditText
android:id="@+id/registerretypepassowrd"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:drawableLeft="@drawable/ic_lock"
android:hint="@string/retypepassword"
android:inputType="textPassword"
android:padding="16dp"
android:textColor="#100F0F"
android:textColorHint="#8A8080" />
<Button
android:id="@+id/btnregcreateaccount"
android:layout_width="match_parent"
android:layout_height="59dp"
android:layout_marginTop="10dp"
android:text="Create Account"
android:textColor="#E8DCDC"
android:textColorHint="#F1ECEC"
android:textSize="16dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="40dp"
android:orientation="horizontal">
<TextView
android:id="@+id/btnforgot"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="1dp"
android:layout_weight="1"
android:text="Already Have An Account?"
android:textColor="@color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/txtsigiin"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:text="@string/signin"
android:textColor="@color/green"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?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"
android:background="@drawable/back3"
tools:context=".SplashScreen">
<ImageView
android:id="@+id/imageView"
android:layout_width="213dp"
android:layout_height="199dp"
android:layout_marginStart="10dp"
android:layout_marginTop="36dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="32dp"
android:src="@drawable/logo"
android:transitionName="logo_image"
app:layout_constraintBottom_toTopOf="@+id/txthi"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.55"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txthi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="304dp"
android:layout_marginBottom="38dp"
android:text="WELCOME"
android:textAlignment="center"
android:textColor="@color/yellowgreen"
android:textSize="70sp"
android:transitionName="logo_text"
app:layout_constraintBottom_toTopOf="@+id/txtwelcm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<TextView
android:id="@+id/txtwelcm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-condensed-medium"
android:text="E-KETHA"
android:textAlignment="center"
android:textColor="@color/yellowgreen"
android:textSize="34sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txthi" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.EKetha" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/green</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="lawngreen">#7CFC00</color>
<color name="chartreuse">#7FFF00</color>
<color name="limegreen">#32CD32 </color>
<color name="lime">#00FF00 </color>
<color name="forestgreen">#228B22 </color>
<color name="green">#008000 </color>
<color name="darkgreen">#006400 </color>
<color name="greenyellow">#ADFF2F</color>
<color name="yellowgreen">#9ACD32</color>
<color name="springgreen">#00FF7F</color>
<color name="mediumspringgreen">#00FA9A</color>
<color name="lightgreen">#90EE90</color>
<color name="mediumseagreen">#3CB371</color>
<color name="seagreen">#2E8B57</color>
<color name="white">#FFFFFF</color>
<color name="gray">#484848</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">E ketha</string>
<string name="menu_home">Home</string>
<string name="menu_gallery">Gallery</string>
<string name="menu_slideshow">Contact Us</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="rememberme">Remember Me</string>
<string name="login">Login</string>
<string name="forgotpassword">Forgot Password</string>
<string name="signup">Sign Up</string>
<string name="fullName">Full Name</string>
<string name="lastName">Last Name</string>
<string name="mobile">Mobile</string>
<string name="retypepassword">Retype Password</string>
<string name="signin">Sign In</string>
<string name="logout">Logout</string>
<string name="title_activity_adminpa">Adminpa</string>
<string name="changeprofile">Change Profile</string>
<string name="deleteprofile">Delete Profile</string>
<string name="save">Save</string>
<string name="cancel">Cancel</string>
<string name="oldpassword">Current Password</string>
<string name="newpassword">New Password</string>
<string name="changepassowrd">Change password</string>
<string name="confirmpassword">ConfirmPassowrd</string>
<string name="resetpassword">Reset Password</string>
<string name="detail1">
Leaf margins turn brown, beginning with the older leaves and moving outward, spreading to leaves toward the branch tip.
The browned leaves may drop from the tree.
Symptoms become progressively worse over a period of 3 to 8 years, until the entire tree turns brown prematurely.
Infected leafhoppers and spittlebugs feed on the succulent, terminal shoots of susceptible host trees, transmitting the bacteria.
There are no viable control options for the insect vectors.
</string>
<string name="treatment1">
• Maintain plant vigor. Keeping susceptible trees healthy and thriving can help them resist infection and survive longer once they are infected.\n\n
• Practice good sanitation. Branches that have died due to bacterial leaf scorch should be routinely removed. Infected trees that are in a severe state of decline should also be removed.\n\n
• Plant resistant species. In areas where bacterial leaf scorch has occurred, avoid planting highly susceptible trees.\n\n
• Antibiotic injections. Oxytetracycline root flare injections applied in spring can reduce bacterium levels and delay symptoms by a couple of weeks.
</string>
<string name="detail2">
Late blight (Phytophthora infestans) is among the most destructive plant disease.
Late blight is caused by a fungus, and it creates irregularly shaped splotches that are slimy and water-soaked.
The spores of this disease are fast-spreading, moving on the wind for miles. Plant only locally grown plants to help keep the pathogen out of your area.
</string>
<string name="treatment2">
• Once late blight strikes, there is little you can do.\n\n
• Tear out the plants, put them in a garbage bag, and throw them out to keep the disease from spreading.\n\n
• Organic fungicides based on Bacillus subtilis are somewhat effective in preventing this tea plant disease when it’s first discovered in your area.
</string>
<string name="detail3">
Bacterial spot is a widespread disease of tea in Sri Lanka, where rainfall and humidity levels promote disease development.
Bacterial spot reduces tea yield and quality by defoliation. The bacteria enter plants through natural openings or wounds.
The leaf spots produced in bacterial spot are nearly identical to those of bacterial speck, and are similar to the initial symptoms of the fungal disease Septoria leaf spot.
A general yellowing of heavily spotted areas on leaves occurs, followed by leaf scorch.
Blighting (rapid death) of foliage progresses upward from the lower leaves on heavily infected plants.
</string>
<string name="treatment3">
• Control of bacterial spot is difficult once it becomes established in the field. Therefore, it is imperative to start with clean seed and transplants.\n\n
• Transplants should be started from clean seed produced in an area where the disease does not occur, or from seed that is disinfested with hot water or chlorine bleach treatment.\n\n
• Remove and destroy diseased crop debris or incorporate it into soil soon after harvest is complete.\n\n
• A weekly spray program with bactericides (mixtures of copper and fungicide) reduces disease development and increases yield.
</string>
<string name="detail4">
Appearing as tiny, round splotches on the leaves, this disease typically starts on the lowest leaves first.
After the plants begin to develop, the lower leaves break out in yellow spots. Within the yellow spots, dark gray centers with dark borders appear.
Black dots appear in the center of the spots. Foliage dies and falls off.
</string>
<string name="treatment4">
• Cut off and destroy infected leaves as soon as you spot them and disinfect pruning equipment before moving from one plant to another.\n\n
• Avoid watering from the top, as the spray can force the spores developing on the leaves back into the soil and continue the disease cycle.\n\n
• Organic fungicides based on copper or Bacillus subtilis are effective against septoria leaf spot, especially when used as a preventative measure.
</string>
<string name="detail5">
The disease starts on the older leaves and spreads upwards.
The first signs are irregular-shaped spots (less than 1 mm) with a yellow margin.
Spread to all leaflets and to other leaves is rapid, causing the leaves to turn yellow, collapse and die. Spots also occur on the stems.
The spores are spread by wind-blown rain, and if windy wet weather continues for a few days, spread is fast and plants lose their leaves quickly.
Look for the disease on the bottom leaves. Look for tiny brown spots with yellow margins. Look for larger spots up to 10 mm that have ring patterns. Spots may be present on the stems and on the fruit.
</string>
<string name="treatment5">
• Do not plant new crops next to older ones that have the disease.\n\n
• Check all seedlings in the nursery, and throw away any with leaf spots.\n\n
• Remove a few branches from the lower part of the plants to allow better airflow at the base.\n\n
• Remove and burn the lower leaves as soon as the disease is seen.\n\n
• The fungicides products to use are chlorothalonil, copper oxychloride or mancozeb.\n\n
• Treatment should start when the first spots are seen and continue at 10-14-day intervals until 3-4 weeks before last harvest. It is important to spray both sides of the leaves.
</string>
</resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.EKetha" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/green</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path
name="project_images"
path="Pictures/"/>
</paths>
\ No newline at end of file
package com.example.eketha;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath 'com.google.gms:google-services:4.3.13'
classpath "com.chaquo.python:gradle:9.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.enableJetifier=true
\ No newline at end of file
#Sun Jul 10 14:47:39 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment