fiz o iniciar sessao e ja programei
parent
968c9190d7
commit
68d4dc9149
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
|
alias(libs.plugins.google.gms.google.services)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
@ -44,6 +45,13 @@ dependencies {
|
||||||
implementation(libs.navigation.fragment)
|
implementation(libs.navigation.fragment)
|
||||||
implementation(libs.navigation.ui)
|
implementation(libs.navigation.ui)
|
||||||
implementation(libs.activity)
|
implementation(libs.activity)
|
||||||
|
implementation(libs.firebase.ai)
|
||||||
|
implementation(libs.camera.camera2.pipe)
|
||||||
|
implementation(libs.firebase.auth)
|
||||||
|
implementation(libs.credentials)
|
||||||
|
implementation(libs.credentials.play.services.auth)
|
||||||
|
implementation(libs.googleid)
|
||||||
|
implementation(libs.mediarouter)
|
||||||
testImplementation(libs.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(libs.ext.junit)
|
androidTestImplementation(libs.ext.junit)
|
||||||
androidTestImplementation(libs.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,16 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Cuida" >
|
android:theme="@style/Theme.Cuida" >
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.iniciar_sessao"
|
android:name=".ui.Inicial.Esqueci_a_palavra_passe"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".ui.Inicial.Criar_conta"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.Inicial.iniciar_sessao"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.example.cuida.ui;
|
package com.example.cuida.ui.Inicial;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
|
@ -10,13 +10,13 @@ import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
import com.example.cuida.R;
|
import com.example.cuida.R;
|
||||||
|
|
||||||
public class iniciar_sessao extends AppCompatActivity {
|
public class Criar_conta extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
EdgeToEdge.enable(this);
|
EdgeToEdge.enable(this);
|
||||||
setContentView(R.layout.activity_iniciar_sessao);
|
setContentView(R.layout.activity_criar_conta);
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.example.cuida.ui.Inicial;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.example.cuida.R;
|
||||||
|
|
||||||
|
public class Esqueci_a_palavra_passe extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_esqueci_apalavra_passe);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
package com.example.cuida.ui.Inicial;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.example.cuida.R;
|
||||||
|
import com.example.cuida.ui.MainActivity;
|
||||||
|
import com.google.android.gms.tasks.OnCompleteListener;
|
||||||
|
import com.google.android.gms.tasks.Task;
|
||||||
|
import com.google.firebase.auth.AuthResult;
|
||||||
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
|
|
||||||
|
public class iniciar_sessao extends AppCompatActivity {
|
||||||
|
private ImageView imageView;
|
||||||
|
private EditText emailEditText;
|
||||||
|
private EditText palavraPasseEditText;
|
||||||
|
private Button entrarButton;
|
||||||
|
private Button criarContaButton;
|
||||||
|
private TextView bemVindoTextView;
|
||||||
|
private Button esqueciAPalavraPasseButton;
|
||||||
|
|
||||||
|
private FirebaseAuth mAuth;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_iniciar_sessao);
|
||||||
|
|
||||||
|
// Inicializar Firebase Auth
|
||||||
|
mAuth = FirebaseAuth.getInstance();
|
||||||
|
|
||||||
|
// Configuração do layout para Edge-to-Edge
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Associar as Views
|
||||||
|
imageView = findViewById(R.id.imageView);
|
||||||
|
emailEditText = findViewById(R.id.emailEditText);
|
||||||
|
palavraPasseEditText = findViewById(R.id.palavraPasseEditText);
|
||||||
|
entrarButton = findViewById(R.id.entarButton);
|
||||||
|
criarContaButton = findViewById(R.id.criarContaButton);
|
||||||
|
bemVindoTextView = findViewById(R.id.bemVindoTextView);
|
||||||
|
|
||||||
|
// Definir o listener para o botão de criar conta
|
||||||
|
criarContaButton.setOnClickListener(v -> {
|
||||||
|
// Chama o método para criar a conta
|
||||||
|
criarConta();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Método para criar uma nova conta de utilizador.
|
||||||
|
*/
|
||||||
|
private void criarConta() {
|
||||||
|
String email = emailEditText.getText().toString().trim();
|
||||||
|
String password = palavraPasseEditText.getText().toString().trim();
|
||||||
|
|
||||||
|
// 1. Validar as entradas do utilizador
|
||||||
|
if (email.isEmpty()) {
|
||||||
|
emailEditText.setError("O e-mail é obrigatório");
|
||||||
|
emailEditText.requestFocus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.isEmpty()) {
|
||||||
|
palavraPasseEditText.setError("A palavra-passe é obrigatória");
|
||||||
|
palavraPasseEditText.requestFocus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.length() < 6) {
|
||||||
|
palavraPasseEditText.setError("A palavra-passe deve ter no mínimo 6 caracteres");
|
||||||
|
palavraPasseEditText.requestFocus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Criar o utilizador no Firebase
|
||||||
|
mAuth.createUserWithEmailAndPassword(email, password)
|
||||||
|
.addOnCompleteListener(this, task -> {
|
||||||
|
if (task.isSuccessful()) {
|
||||||
|
// Se o registo for bem-sucedido
|
||||||
|
Log.d("FIREBASE_AUTH", "createUserWithEmail:success");
|
||||||
|
Toast.makeText(iniciar_sessao.this, "Conta criada com sucesso.", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
// Navega para a MainActivity
|
||||||
|
navegarParaMainActivity();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Se o registo falhar
|
||||||
|
Log.w("FIREBASE_AUTH", "createUserWithEmail:failure", task.getException());
|
||||||
|
// Mostra uma mensagem de erro mais específica
|
||||||
|
String errorMessage = task.getException() != null ? task.getException().getMessage() : "Erro desconhecido.";
|
||||||
|
Toast.makeText(iniciar_sessao.this, "Falha na autenticação: " + errorMessage, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navega para a MainActivity e limpa a pilha de atividades.
|
||||||
|
*/
|
||||||
|
private void navegarParaMainActivity() {
|
||||||
|
Intent intent = new Intent(iniciar_sessao.this, MainActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
finish(); // Finaliza a atividade atual
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
package com.example.cuida;
|
package com.example.cuida.ui;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.example.cuida.R;
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
@ -27,7 +28,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
// Passing each menu ID as a set of Ids because each
|
// Passing each menu ID as a set of Ids because each
|
||||||
// menu should be considered as top level destinations.
|
// menu should be considered as top level destinations.
|
||||||
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
||||||
R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
|
R.id.navigation_inicio, R.id.navigation_dashboard, R.id.navigation_notifications)
|
||||||
.build();
|
.build();
|
||||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_main);
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_main);
|
||||||
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
|
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.Inicial.Criar_conta">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Criar conta"
|
||||||
|
android:textColor="#020202"
|
||||||
|
android:textSize="34sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.Inicial.Esqueci_a_palavra_passe">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -5,6 +5,103 @@
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.iniciar_sessao">
|
tools:context=".ui.Inicial.iniciar_sessao">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="100dp"
|
||||||
|
android:layout_marginTop="48dp"
|
||||||
|
android:layout_marginEnd="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.493"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/emailEditText"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginStart="100dp"
|
||||||
|
android:layout_marginTop="112dp"
|
||||||
|
android:layout_marginEnd="100dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Email"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.505"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/palavraPasseEditText"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginStart="100dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="100dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Palavra-Passe"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.505"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/emailEditText" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/entarButton"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginStart="100dp"
|
||||||
|
android:layout_marginTop="44dp"
|
||||||
|
android:layout_marginEnd="100dp"
|
||||||
|
android:background="#2196F3"
|
||||||
|
android:backgroundTint="#000000"
|
||||||
|
android:shadowColor="#03A9F4"
|
||||||
|
android:text="Entrar"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textColorHighlight="#03A9F4"
|
||||||
|
android:textColorHint="#03A9F4"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.515"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/palavraPasseEditText"
|
||||||
|
app:rippleColor="#03A9F4"
|
||||||
|
app:strokeColor="#03A9F4" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/esqueciAPalavraPasseButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Esqueci a Palavra-Passe"
|
||||||
|
android:textColor="#03A9F4"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/palavraPasseEditText"
|
||||||
|
app:layout_constraintHorizontal_bias="0.993"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/palavraPasseEditText"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/palavraPasseEditText" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/criarContaButton"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:backgroundTint="#FFFFFF"
|
||||||
|
android:text="Criar conta"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/entarButton"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/entarButton"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/entarButton" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bemVindoTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="BEM VINDO"
|
||||||
|
android:textSize="34sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/imageView"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/imageView"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -30,4 +30,5 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navGraph="@navigation/mobile_navigation" />
|
app:navGraph="@navigation/mobile_navigation" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,11 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_home"
|
android:id="@+id/navigation_inicio"
|
||||||
android:icon="@drawable/ic_home_black_24dp"
|
android:icon="@drawable/ic_home_black_24dp"
|
||||||
android:title="@string/title_home" />
|
android:title="@string/title_home" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/app_bar_search"
|
||||||
|
android:icon="@drawable/ic_search_black_24dp"
|
||||||
|
android:title="Search"
|
||||||
|
app:actionViewClass="android.widget.SearchView" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_dashboard"
|
android:id="@+id/navigation_dashboard"
|
||||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/mobile_navigation"
|
android:id="@+id/mobile_navigation"
|
||||||
app:startDestination="@+id/navigation_home">
|
app:startDestination="@+id/navigation_inicio">
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_home"
|
android:id="@+id/navigation_inicio"
|
||||||
android:name="com.example.cuida.ui.home.HomeFragment"
|
android:name="com.example.cuida.ui.home.HomeFragment"
|
||||||
android:label="@string/title_home"
|
android:label="@string/title_home"
|
||||||
tools:layout="@layout/fragment_home" />
|
tools:layout="@layout/fragment_home" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
|
alias(libs.plugins.google.gms.google.services) apply false
|
||||||
}
|
}
|
||||||
|
|
@ -11,6 +11,14 @@ lifecycleViewmodelKtx = "2.6.1"
|
||||||
navigationFragment = "2.6.0"
|
navigationFragment = "2.6.0"
|
||||||
navigationUi = "2.6.0"
|
navigationUi = "2.6.0"
|
||||||
activity = "1.11.0"
|
activity = "1.11.0"
|
||||||
|
googleGmsGoogleServices = "4.4.4"
|
||||||
|
firebaseAi = "17.6.0"
|
||||||
|
cameraCamera2Pipe = "1.6.0-alpha01"
|
||||||
|
firebaseAuth = "24.0.1"
|
||||||
|
credentials = "1.5.0"
|
||||||
|
credentialsPlayServicesAuth = "1.5.0"
|
||||||
|
googleid = "1.1.1"
|
||||||
|
mediarouter = "1.8.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
|
|
@ -24,7 +32,15 @@ lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-view
|
||||||
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
|
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
|
||||||
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }
|
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }
|
||||||
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
|
firebase-ai = { group = "com.google.firebase", name = "firebase-ai", version.ref = "firebaseAi" }
|
||||||
|
camera-camera2-pipe = { group = "androidx.camera", name = "camera-camera2-pipe", version.ref = "cameraCamera2Pipe" }
|
||||||
|
firebase-auth = { group = "com.google.firebase", name = "firebase-auth", version.ref = "firebaseAuth" }
|
||||||
|
credentials = { group = "androidx.credentials", name = "credentials", version.ref = "credentials" }
|
||||||
|
credentials-play-services-auth = { group = "androidx.credentials", name = "credentials-play-services-auth", version.ref = "credentialsPlayServicesAuth" }
|
||||||
|
googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" }
|
||||||
|
mediarouter = { group = "androidx.mediarouter", name = "mediarouter", version.ref = "mediarouter" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
google-gms-google-services = { id = "com.google.gms.google-services", version.ref = "googleGmsGoogleServices" }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue