-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d3c748
commit 5c5fcc6
Showing
12 changed files
with
179 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### Longo demais, quero resumo. (TLDR;) | ||
Criar conta permite que eu te dê acesso correto dentro do aplicativo sem precisar depender do portal nem de lógicas malucas para tentar descobrir quem é quem. | ||
|
||
### História | ||
A maioria dos processos do UNES ocorrem somente no dispositivo, e quando se trata disso, tudo que voce obteve de acesso sozinho é confiavel para ser mostrado no aplicativo. | ||
|
||
Contudo, isso muda quando as informações passam a fazer parte do "UNESverso", | ||
neste contexto eu preciso de alguma maneira de saber se a informação é real e se você "é realmente quem diz ser". | ||
|
||
Por isso, para te autenticar, o UNESverso precisava realizar uma série de operações que se tornaram cada vez mais complicadas, sem falar no captcha que ainda estraga muita coisa. | ||
|
||
### Mas por que isso é importante? | ||
Talvez voce tenha a pergunta: | ||
`"O UNES realmente precisa autenticar os alunos? Por que não simplesmente confiar em todos?"` | ||
E a resposta que tenho para isso é que a maioria esmagadora das coisas é aberta, mas, existem algumas funcionalidades onde somente uma pessoa pode acessar e editar. | ||
Por exemplo: editar o seu perfil colocando uma foto, validar se as informacoes contríbuidas para o Paradoxo não são duplicadas etc. | ||
|
||
### Sério? Preciso mesmo? | ||
A resposta para esta pergunta é não. | ||
|
||
Mas, as pessoas que optarem por criar uma conta e verificarem ela usando um email, podem passar a receber notificações de forma mais consistente, já que o servidor pode confiar na conta do portal que foi vinculada ao UNES e enviar notificações de atualização de forma assertiva. | ||
|
||
Já imaginou como seria triste receber uma notificacao: "Hoje nao tem aula", mas a notificação nao era na verdade para voce? Ou... "Eu acabei de chegar na universidade, por que nao consigo acessar o UNESverso?". | ||
|
||
Dito tudo isso, estou aberto a feedbacks, se você acha que isso não deveria ser assim ou se tem alguma sugestão, manda no email: joaopaulo761@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...src/main/java/com/forcetower/uefs/feature/unesaccount/why/CreateAccountReasonsFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.forcetower.uefs.feature.unesaccount.why | ||
|
||
import android.os.Bundle | ||
import android.text.method.LinkMovementMethod | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.navigation.fragment.findNavController | ||
import com.forcetower.core.utils.ViewUtils | ||
import com.forcetower.uefs.databinding.FragmentServiceAccountWhyIsItNeededBinding | ||
import com.forcetower.uefs.feature.shared.UFragment | ||
import io.noties.markwon.AbstractMarkwonPlugin | ||
import io.noties.markwon.Markwon | ||
import io.noties.markwon.core.MarkwonTheme | ||
import io.noties.markwon.image.ImagesPlugin | ||
import io.noties.markwon.linkify.LinkifyPlugin | ||
import io.noties.markwon.movement.MovementMethodPlugin | ||
import java.nio.charset.Charset | ||
|
||
class CreateAccountReasonsFragment : UFragment() { | ||
private lateinit var binding: FragmentServiceAccountWhyIsItNeededBinding | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View { | ||
val markwon = Markwon.builder(requireContext()) | ||
.usePlugin(object : AbstractMarkwonPlugin() { | ||
override fun configureTheme(builder: MarkwonTheme.Builder) { | ||
val color = ViewUtils.attributeColorUtils(requireContext(), androidx.appcompat.R.attr.colorPrimary) | ||
builder.linkColor(color) | ||
} | ||
}) | ||
.usePlugin(ImagesPlugin.create()) | ||
.usePlugin(MovementMethodPlugin.create(LinkMovementMethod.getInstance())) | ||
.usePlugin(LinkifyPlugin.create()) | ||
.build() | ||
|
||
val stream = requireContext().assets.open("unes_account_why.md") | ||
val size = stream.available() | ||
val buffer = ByteArray(size) | ||
stream.read(buffer) | ||
stream.close() | ||
val span = String(buffer, Charset.forName("UTF-8")) | ||
|
||
markwon.setMarkdown(binding.content, span) | ||
|
||
return FragmentServiceAccountWhyIsItNeededBinding.inflate(inflater, container, false).also { | ||
binding = it | ||
}.root | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
binding.toolbar.setNavigationOnClickListener { | ||
findNavController().popBackStack() | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/src/main/res/layout/fragment_service_account_why_is_it_needed.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout 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"> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.material.appbar.AppBarLayout | ||
android:id="@+id/app_bar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
style="@style/Widget.AppBar" | ||
app:elevation="0dp" | ||
app:liftOnScroll="true"> | ||
|
||
<com.google.android.material.appbar.MaterialToolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:title="Mas, Por que?" | ||
app:navigationIcon="@drawable/ic_arrow_back_black_24dp"/> | ||
</com.google.android.material.appbar.AppBarLayout> | ||
|
||
<androidx.core.widget.NestedScrollView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:fillViewport="true" | ||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> | ||
|
||
<TextView | ||
android:id="@+id/content" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="24dp" | ||
tools:text="@tools:sample/lorem/random"/> | ||
</androidx.core.widget.NestedScrollView> | ||
</androidx.coordinatorlayout.widget.CoordinatorLayout> | ||
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters