Can not perform this action after onSaveInstanceState

I've faced this problem sometimes but I've never written about it. It's very interesting because it proves that the Android avoid at all costs lose the state of the activity. This error commonly happens when you try to commit a fragment transaction after the onSaveInstanceState() be called, in other words, when you do it in … Continue lendo Can not perform this action after onSaveInstanceState

Saving Instance State…again

I've posted sometimes about save instance state on activities (in portuguese), but I could observe that I've writen that Android OS can kill your process when it needs memory, so the activity can be destroyed anytime. I've written too that when it happens Android will give a chance to developers finish any threads or connections … Continue lendo Saving Instance State…again

Android – Tweaking the Back Stack Behaviour

I've written a post about Android back stack and its default behaviour where every started activity is placed in a "last in, first out" stack. Today, I was reading a great article on Android guides where there is a section to explain about situations where we must to tweak this behavior, something that I forgot … Continue lendo Android – Tweaking the Back Stack Behaviour

Problemas com RSA (BadPaddingException)

Tive alguns problemas em um projeto próprio com a criptografia RSA, pois o texto criptografado em um APP Android não estava sendo corretamente descriptografado no webservice, mesmo com as chaves pública e privada estando corretas. A exception (BadPaddingException) informava sobre um problema de "padding". O que descobri e minhas leituras sobre o tema é que … Continue lendo Problemas com RSA (BadPaddingException)

Lendo dados de um arquivo dentro do projeto

Quando colocamos por exemplo um arquivo txt dentro da pasta "src/Files/meuarquivo.txt" de nosso projeto, um erro bem comum é que ao sermos influenciados pela lógica vamos capturar esse arquivos através de new File("src/Files/meuarquivo.txt") em algum lugar de nosso código Java. Primeiramente, obviamente o nosso código Java que captura esse arquivo será executado após ser compilado, … Continue lendo Lendo dados de um arquivo dentro do projeto