This is the privacy policy for the Patient Management app.
Patient Management does not send, manage any personal data of any kind. Your data and Images will save in Google Database Securely.
The Camera permission is required by the Save your Image to Doctors.
//Check if User is Already LoggedIn
if(mAuth.getCurrentUser() != null)
{
//User NOT logged In
finish();
startActivity(new Intent(getApplicationContext(),SignIn.class));
}
user = mAuth.getCurrentUser();
//Setting the tags for Current User.
LoggedIn_User_Email =user.getEmail();
OneSignal.sendTag("User_ID", LoggedIn_User_Email);
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("TESTING", "Sign up Successful" + task.isSuccessful());
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
if (!task.isSuccessful()) {
Toast.makeText(MainActivity.this, "Signed up Failed", Toast.LENGTH_SHORT).show();
}
else
{
userProfile();
Toast.makeText(MainActivity.this, "Created Account", Toast.LENGTH_SHORT).show();
Log.d("TESTING", "Created Account");
}
}
});
}
//Set UserDisplay Name
private void userProfile()
{
FirebaseUser user = mAuth.getCurrentUser();
if(user!= null)
{
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
.setDisplayName(name.getText().toString().trim())
//.setPhotoUri(Uri.parse("https://example.com/jane-q-user/profile.jpg")) // here you can set image link also.
.build();
//Now start Sign In Process
//SignIn Process
private void callsignin(String email,String password) {
mAuth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("TESTING", "sign In Successful:" + task.isSuccessful());
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
if (!task.isSuccessful()) {
Log.w("TESTING", "signInWithEmail:failed", task.getException());
Toast.makeText(MainActivity.this, "Failed", Toast.LENGTH_SHORT).show();
}
else {
Intent i = new Intent(MainActivity.this, SignIn.class);
finish();
startActivity(i);
}
}
});
//Log.d("LOGGED", "IN onStart ");
mFirebaseAdapter = new FirebaseRecyclerAdapter<ShowDataItems, ShowDataViewHolder>
(ShowDataItems.class, R.layout.show_data_single_item, ShowDataViewHolder.class, myRef)
{
public void populateViewHolder(final ShowDataViewHolder viewHolder, ShowDataItems model, final int position) {
viewHolder.Image_URL(model.getImage_URL());
viewHolder.Image_Title(model.getImage_Title());
//OnClick Item it will Delete data from Database
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
AlertDialog.Builder builder = new AlertDialog.Builder(ShowData.this);
builder.setMessage("Do you want to Delete this data ?").setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
int selectedItems = position;
mFirebaseAdapter.getRef(selectedItems).removeValue();
mFirebaseAdapter.notifyItemRemoved(selectedItems);
recyclerView.invalidate();
onStart();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
AlertDialog dialog = builder.create();
dialog.setTitle("Confirm");
dialog.show();
}
});
}
};
recyclerView.setAdapter(mFirebaseAdapter);
}
//View Holder For Recycler View
public static class ShowDataViewHolder extends RecyclerView.ViewHolder {
private final TextView image_title;
private final ImageView image_url;
mRoofRef = new Firebase("https://fir-tutorial-5800f.firebaseio.com/").child("User_Details").push(); // Push will create new child every time we upload data
mRoofRef = new Firebase("https://fir-tutorial-5800f.firebaseio.com/").child("User_Details").push(); // Push will create new child every time we upload data
//Check if User is Already LoggedIn
if(mAuth.getCurrentUser() != null)
{
//User NOT logged In
finish();
startActivity(new Intent(getApplicationContext(),SignIn.class));
}
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("TESTING", "Sign up Successful" + task.isSuccessful());
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
if (!task.isSuccessful()) {
Toast.makeText(MainActivity.this, "Signed up Failed", Toast.LENGTH_SHORT).show();
}
else
{
userProfile();
Toast.makeText(MainActivity.this, "Created Account", Toast.LENGTH_SHORT).show();
Log.d("TESTING", "Created Account");
}
}
});
}
//Set UserDisplay Name
private void userProfile()
{
FirebaseUser user = mAuth.getCurrentUser();
if(user!= null)
{
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
.setDisplayName(name.getText().toString().trim())
//.setPhotoUri(Uri.parse("https://example.com/jane-q-user/profile.jpg")) // here you can set image link also.
.build();
//Now start Sign In Process
//SignIn Process
private void callsignin(String email,String password) {
mAuth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("TESTING", "sign In Successful:" + task.isSuccessful());
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
if (!task.isSuccessful()) {
Log.w("TESTING", "signInWithEmail:failed", task.getException());
Toast.makeText(MainActivity.this, "Failed", Toast.LENGTH_SHORT).show();
}
else {
Intent i = new Intent(MainActivity.this, SignIn.class);
finish();
startActivity(i);
}
}
});
//Again check if the user is Already Logged in or Not
if(mAuth.getCurrentUser() == null)
{
//User NOT logged In
finish();
startActivity(new Intent(getApplicationContext(),MainActivity.class));
}
//Fetch the Display name of current User
FirebaseUser user = mAuth.getCurrentUser();
if (user != null) {
username.setText("Welcome, " + user.getDisplayName());
}