Brew Question: Download Brew PDF

How to obtain the phone number of the device on which my application is running?

Tweet Share WhatsApp

Answer:

An application can obtain the phone number of the device on which it is running by calling ITAPI_GetStatus(). The phone number is in TAPIStatus.szMobileID.

For example:

TAPIStatus tapiStat;

if (ITAPI_GetStatus(pMe->p_tapi, &tapiStat) == EBADPARM) {

DisplayOutput((IApplet*)pMe, 6, "TAPI Status fetch failed");

}

DisplayOutput((IApplet*)pMe, 4, "Mobile ID:");

DisplayOutput((IApplet*)pMe, 5, tapiStat.szMobileID);

Download Brew PDF Read All 78 Brew Questions
Previous QuestionNext Question
When making a voice call immediately after a data call, why do we see the Privacy Alert again instead of "Return to Application"?When will BREW offer HTTP Support?