use of com.secupwn.aimsicd.utils.RealmHelper in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class MapViewerOsmDroid method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
log.info("Starting MapViewer");
setUpMapIfNeeded();
mDbHelper = new RealmHelper(this);
tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
// Bind to LocalService
Intent intent = new Intent(this, AimsicdService.class);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE);
}
use of com.secupwn.aimsicd.utils.RealmHelper in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class AdvancedUserSmsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
realm = Realm.getDefaultInstance();
dbaccess = new RealmHelper(getApplicationContext());
RealmResults<SmsData> msgitems = realm.where(SmsData.class).findAllSorted("timestamp");
listViewAdv.setAdapter(new SmsDataAdapter(getApplicationContext(), msgitems));
listViewAdv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> a, View v, int position, long id) {
final SmsData smsData = (SmsData) listViewAdv.getItemAtPosition(position);
realm.executeTransaction(new Realm.Transaction() {
@Override
public void execute(Realm realm) {
smsData.deleteFromRealm();
}
});
Toast.makeText(a.getContext(), "Deleted Sms", LENGTH_SHORT).show();
return true;
}
});
}
use of com.secupwn.aimsicd.utils.RealmHelper in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class MapFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
log.info("Starting MapViewer");
setUpMapIfNeeded();
mDbHelper = new RealmHelper(getActivity());
tm = (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
// Bind to LocalService
Intent intent = new Intent(getActivity(), AimsicdService.class);
getActivity().bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
TelephonyManager tm = (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE);
}
use of com.secupwn.aimsicd.utils.RealmHelper in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class DbViewerFragment method onAttach.
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mDb = new RealmHelper(activity.getBaseContext());
}
Aggregations