Bonjour,
mon sujet est une application portable de localisation GSM OS symbian s60 pour se localiser a travers mon portable il faut tout d'abord chercher les cell id les BTS les plus proche (min 3 car je vais utiliser la méthode de triangulation )
mon problème est de détecter les cell id pour le moment j'ai trouver un code mais je sais pas si ca marche je suis débutante
Headers required:
#include <Etel3rdParty.h>
Library required:
LIBRARY etel3rdparty.lib
Capabilities required:
capability ReadUserData ReadDeviceData Location
GetCellID.cpp
GetCellID.h
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 CCellIDCheck::~CCellIDCheck() { Cancel(); delete iTelephony; } void CCellIDCheck::ConstructL(void) { iTelephony = CTelephony::NewL(); iTelephony->GetCurrentNetworkInfo(iStatus, iIdV1Pkg); SetActive(); } CCellIDCheck::CCellIDCheck(MCellIdObserver& aObserver) : CActive(EPriorityNormal),iObserver(aObserver),iIdV1Pkg(iIdV1) { CActiveScheduler::Add(this); } void CCellIDCheck::RunL() { iObserver.CellIDL(iIdV1.iCountryCode,iIdV1.iNetworkId,iIdV1.iLocationAreaCode,iIdV1.iCellId); } void CCellIDCheck::DoCancel() { iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel); }
MERCI BIEN
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #include <Etel3rdParty.h> class MCellIdObserver { public: virtual void CellIDL(const TDesC& aCountryCode,const TDesC& aNwId,TUint aAreaCode,TUint aCellId) = 0; }; class CCellIDCheck : public CActive { public: CCellIDCheck(MCellIdObserver& aObserver); void ConstructL(void); ~CCellIDCheck(); private: void RunL(); void DoCancel(); private: MCellIdObserver& iObserver; CTelephony* iTelephony; CTelephony::TNetworkInfoV1 iIdV1; CTelephony::TNetworkInfoV1Pckg iIdV1Pkg; };
Partager