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
Categoria: Java
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
Fixando o caminho do JDK no Glassfish
Caso esteja desejando fixar o caminho do JDK no Glassfish, ao invés de usar a variável de ambiente, basta ir até a pasta ".....\glassfish\config\" e no arquivo bat "asenv.bat" editar seu conteúdo, inserindo uma linha de comando informando a variável AS_JAVA, por exemplo, "set AS_JAVA=C:\Program Files\Java\jdk1.8.0_40". Depois disso e de ter salvo o arquivo, execute … Continue lendo Fixando o caminho do JDK no Glassfish
No ‘Access-Control-Allow-Origin’ header is present on the requested resource
Estava trabalhando em um projeto onde o web service em Jersey e a aplicação cliente em AngularJS estavam rodando no mesmo servidor Glassfish. Como esperado, quando a aplicação cliente consumisse o web service surgiria o erro "No 'Access-Control-Allow-Origin' header is present on the requested resource". Isso é uma questão relacionada ao CORS ou Cross-origin resource sharing. Uma aplicação … Continue lendo No ‘Access-Control-Allow-Origin’ header is present on the requested resource