PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WM - Como Simular o click na Tecla Home do Android
WM - Como Simular o click na Tecla Home do Android
Iniciado por adrianoboller, fev., 27 2016 2:53 AM - Sem resposta
Membro registado
3.651 mensagems
Popularité : +175 (223 votes)
Publicado em fevereiro, 27 2016 - 2:53 AM
//Simula o click na Tecla Home do Android

import android.app.Activity;
import android.content.Intent;
import java.lang.*;
import android.util.*;
import java.lang.Exception;
import android.util.Log;

PUBLIC static void KeyHome()
{
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getActiviteEnCours().startActivity(startMain);
}


Como usar:
KeyHome()


Bons estudos!

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/