【问题标题】:How to get Data About Phone Number and Locations如何获取有关电话号码和位置的数据
【发布时间】:2013-01-10 10:51:13
【问题描述】:

我开发了一个应用程序,可以显示任何电话号码的位置和服务提供商。

点赞9718202569idea number 德里电信圈

我对所有印度电话号码都这样做了。

现在我想为美国、英国和其他国家的电话号码做这件事。

但我没有在互联网上获得与此相关的数据。

【问题讨论】:

  • 只是出于好奇,您是否在代码中的任何地方使用了国家/地区代码来实现印度数字的目标?

标签: java android location phone-number


【解决方案1】:

看这个:

    telephonyManager =  (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
    lineOne = telephonyManager.getLine1Number();
    Log.d(TAG, "line 1 " + lineOne);

    deviceId = telephonyManager.getDeviceId(); 
    Log.d(TAG, "getDeviceId() " + deviceId);


    networkOperator =  telephonyManager.getNetworkOperatorName();
    Log.d(TAG, "getNetworkOperatorName() " + networkOperator);

    networkType = telephonyManager.getNetworkType();
    Log.d(TAG, "getNetworkType () " + networkType);

    phoneType = telephonyManager.getPhoneType();
    Log.d(TAG, "getPhoneType () " + phoneType);

    simSerialNumber = telephonyManager.getSimSerialNumber();
    Log.d(TAG, "getSimSerialNumber () " + simSerialNumber );

    subscriberId = telephonyManager.getSubscriberId();
    Log.d(TAG, "getSubscriberId () " + subscriberId);


    // Register the listener with the Location Manager to receive location updates
    locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, timeBetweenFixes, distanceBetweenFixes, locationListener);
    locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeBetweenFixes, distanceBetweenFixes, locationListener);
    IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
    context.registerReceiver(batteryReceiver, filter);    

【讨论】:

  • 这仅提供有关手机 SIM 卡的信息。我想要所有电话号码的此信息
  • 你在问联系人??
猜你喜欢
  • 1970-01-01
  • 2020-01-04
  • 1970-01-01
  • 2011-09-05
  • 2023-03-22
  • 1970-01-01
  • 2015-12-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多