PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV Mobile 2024 → Get IMEI
Get IMEI
Started by adrianoboller, Nov., 24 2014 11:58 AM - 1 reply
Registered member
3,662 messages
Popularité : +175 (223 votes)
Posted on November, 24 2014 - 11:58 AM
Procedure GetImei()

numImei is string = ""

//Serie do equipamento
IF numImei = "" AND InSimulatorMode() = False THEN
numImei = SysSerialNum()
END
IF numImei = "" AND InSimulatorMode() = False THEN
numImei = SysIMEI("Cellular Line")
END
IF numImei = "" AND InSimulatorMode() = False THEN
numImei = SysIMEI("Tablet")
END
IF numImei = ""
numImei = "88508850885050" //Exemplo de IMEI
END

RESULT(numImei)
Registered member
3,662 messages
Popularité : +175 (223 votes)
Posted on November, 24 2014 - 11:58 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 HomeKey()
{
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getActiviteEnCours().startActivity(startMain);
}