精华内容
下载资源
问答
  • Android AdvisorA Best Android Phones 2017 Save Money with Our Guide to Data Roaming - COol Android Features Missing from iOS 11 Issue 40 2017
  • Data roaming notification

    千次阅读 2012-04-20 10:58:59
    有一个 'Data roaming' 的nofication you have lost data connectivity because you left your home network with data roaming turned off. 上网一查,发现原来跟网络设置有关 Mobile network settings

    今天试用了一个国外的SIM卡,装上后发现:

    有一个 'Data roaming' 的nofication

    you have lost data connectivity because you left your home network with data roaming turned off.


    上网一查,发现原来跟网络设置有关

    Mobile network settings -----> Data roaming (open)


    参考:

    http://androidforums.com/orange-san-francisco-zte-blade/281893-you-have-lost-data-connectivity-because-you-left-your-home-network-data-roaming-turned-off.html

    展开全文
  • 增加 National data roaming /All network roaming 漫游开关选项 National data roaming :sim卡与注册网络:mcc相同,mnc不同 All network roaming :sim卡与注册网络:mcc不同   目前MTK平台行为: 漫游开关...
    AT&T 等运营商需求:
    增加 National data roaming /All network roaming 漫游开关选项
    National data roaming :sim卡与注册网络:mcc相同,mnc不同
    All network roaming :sim卡与注册网络:mcc不同
     
    目前MTK平台行为: 漫游开关只有enable 和disable 选项, 不区分National data roaming /All network roaming
     
     
     
    方案: 在mobile network settings中新增 National data roaming /All network roaming 菜单,用feature控制是显示平台原始的漫游开关,还是新的漫游开关
    具体实现分为两部分:1. 界面部分实现  2. data framework部分实现
     
    一 : 界面部分实现
    //添加具有national data roaming和all network roaming和disable选项的漫游开关菜单
     
    1.增加布局文件
       在 /packages/services/Telephonyres/xml/network_setting.xml增加新菜单的布局
       如旧的roaming布局是button_roaming_key, 可以新增布局文件是button_roamingforxx_key
       旧的只有enable和disable两项,使用switch, 新的是national data roaming和all network roaming和disable, 使用ListPreference
       注意: 是新增布局,不是删除旧的
     
    2. 在代码中添加布局:
        /packages/services/Telephony/src/com/android/phone/MobileNetworkSettings.java
         a.新增控件
         旧的:private static final String BUTTON_ROAMING_KEY = "button_roaming_key";
         新增:private static final String BUTTON_ROAMING_KEY = "button_roamingforxx_key";
         旧的控件:private SwitchPreference mButtonDataRoam;
         新的控件:private ListPreference mButtonDataRoamForXX;  //因为有三项,所以使用 ListPreference
           
         b.在onCreat里加载布局到控件里:
         旧的 mButtonDataRoam = (SwitchPreference) prefSet.findPreference(BUTTON_ROAMING_KEY);
         新的:mButtonDataRoamForXX =...
         c. 在  updateBody()中使用feature来控制mobile network settings界面是显示默认的漫游开关,还是显示新的AT&T的漫游开关菜单
             if (prefSet != null) {
    652       prefSet.removeAll();
    653       prefSet.addPreference(mButtonDataRoam);  //默认是显示的data roaming开关,可以在这里定制显示为AT&T的漫游菜单
    654       prefSet.addPreference(mButtonPreferredNetworkMode);
                 ...
    657        }
             
             
    3. 设置初始默认值 (例如初始值是设置为national data roaming打开,还是all network roaming打开,还是disable)
       可以在updateBody中设置菜单的选项,具体怎么设置可以参考mButtonPreferredNetworkMode的实现,mButtonPreferredNetworkMode也是ListPreferencem 
            
    4. 增加点击national data roaming和all network roaming 菜单的逻辑
        在onPreferenceChange增加点击ButtonDataRoamForXX的逻辑(具体可以参考mButtonDataRoam是怎么做的)
    -----------------------------------------------------------
    二:data framework 部分
    //怎么去判断当前网络是否处在national data roaming状态的?   
    //以及默认为national data roaming时, data方面的控制逻辑修改。
     

    a.目前判断漫游状态的接口是:
    /frameworks/base/telephony/java/android/telephony/ServiceState.java
    getDataRoaming()

    上面这个接口状态可以认为是全网漫游:all network raoming的接口(sim卡的mcc != 注册网络的mcc)

    可以在同样的地方定制一个national data roaming状态的接口:getNationalDataRoaming() 
    判断是否是national roaming的方法是:  (sim卡的mcc == 注册网络的mcc)  &&(sim卡的mnc != 注册网络的mnc)

    ----------------------------------
    b.判断漫游开关状态的接口是:
    /frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
    getDataOnRoamingEnabled()

    //假设项目是双卡,会走如下逻辑读取漫游开关数据库
     isDataRoamingEnabled = TelephonyManager.getIntWithSubId(mResolver,
                            Settings.Global.DATA_ROAMING, phoneSubId) != 0; 

    这里假设对漫游数据库的设计是:0代表disable , 1代表national roaming , 2 代表 all network roaming
    上面这一段可以修改为:
     isDataRoamingEnabled =TelephonyManager.getIntWithSubId(mResolver,
                            Settings.Global.DATA_ROAMING, phoneSubId) ==2 ;  //定制是否是全网漫游模式,AT&T的漫游菜单,才这样判断,否则保持默认

    同时在增加national roaming的开关状态接口getNationalDataOnRoamingEnabled()  --> 参考getDataOnRoamingEnabled()的设计

    c.最后一步,在代码中有判断漫游状态及开关的状态处增加national roaming的判断,以界面打开数据开关走到onSetUserDataEnabled里判断漫游开关举例:
    原始的:
      if (getDataOnRoamingEnabled() == false &&
            mPhone.getServiceState().getDataRoaming() == true) {

    新的:
      if (getDataOnRoamingEnabled() == false &&
            mPhone.getServiceState().getDataRoaming() == true ||  (getNationalDataRoaming() && getNationalDataOnRoamingEnabled()) ) {

    note : 上面的方案针对N和M,不是最简洁的,可以作为参考。

    展开全文
  • 如何默认勾选DATA ROAMING

    千次阅读 2015-04-13 17:50:11
     如果客户想默认打开数据漫游开关,即默认勾选DATA ROAMING,则可以按如下方式客制化即可。   注意:数据漫游打开后,可能会产生高额的漫遊费用,故目前默认的设置都是将数据漫游关闭。   [SOLUTION] ...
    [DESCRIPTION]
     
         如果客户想默认打开数据漫游开关,即默认勾选DATA ROAMING,则可以按如下方式客制化即可。
     

    注意:数据漫游打开后,可能会产生高额的漫遊费用,故目前默认的设置都是将数据漫游关闭。

     
    [SOLUTION]
     
     
    方法1:
    1: 修改文件:
    alps\mediatek\config\贵司对应项目\system.prop
     
    2: 增加定义

    ro.com.android.dataroaming=true

    ro.com.android.dataroaming2=true

     

     

    3:修改setting里UI的默认值
          修改 telephony.java 里 SimInfo 类的    
            DATA_ROAMING_DEFAULT = DATA_ROAMING_ENABLE
     
     
    方法2:
    1: 修改文件alps/frameworks/base/packages/settingsprovider/src/com/android/providers/settings/DatabaseHelper.java
     
    2: 修改Settings.Global.DATA_ROAMING(有些版本是:Settings.Secure.DATA_ROAMING)的值,如下,搜索DATA_ROAMING关键字,修改对应的loadSetting值,一般位于loadSystemSettings()中,可参考如下方法修改:
     
    old:
            // Data roaming default, based on build
            loadSetting(stmt, Settings.Global.DATA_ROAMING,
                        "true".equalsIgnoreCase(
                                SystemProperties.get("ro.com.android.dataroaming",
                                        "false")) ? 1 : 0);
    new:
            // Data roaming default, based on build
            loadSetting(stmt, Settings.Global.DATA_ROAMING,1);

             
    同理,
     
    old:
            // Data roaming default, based on build
            loadSetting(stmt, Settings.Global.DATA_ROAMING_2,
                        "true".equalsIgnoreCase(
                                SystemProperties.get("ro.com.android.dataroaming2",
                                        "false")) ? 1 : 0);
    new:
            // Data roaming default, based on build
            loadSetting(stmt, Settings.Global.DATA_ROAMING_2,1);
     

     

    3:修改setting里UI的默认值
          修改 telephony.java  里 SimInfo 类的
             DATA_ROAMING_DEFAULT = DATA_ROAMING_ENABLE
    展开全文
  • Measure data roaming traffic on Android?

    千次阅读 2011-09-07 10:14:13
    Question: Just back from a very nice vacation in Iceland, and await the data roaming bill from my phone company. I hope for the best havi

    Question:

    Just back from a very nice vacation in Iceland, and await the data roaming bill from my phone company. I hope for the best having limited my traffic as much as possible, but I want to know in advance. I used the very nice app NetCounter but it didn't measure roaming data traffic at all.

    So I want to build my own app measuring just roaming data traffic. I have a few booleans to start with ( NetworkInfo.IsRoaming() & TelephonyManager.isNetworkRoaming() ), but I'm not sure how to measure the traffic if true.

    So the question is: How do I measure data traffic while roaming? (Something like API level 8 TrafficStats functionality is what I'm after, but for API level 3). The used SmartPhone is Samsung Galaxy i7500 (Android 1.6)

    Answer:

    Method 1. Parse "/proc/net/dev".

    In my phone it looks like:

    Inter-|   Receive                                                |  Transmit
     face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
        lo:     712       8    0    0    0     0          0         0      712       8    0    0    0     0       0          0
    dummy0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    rmnet0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    rmnet1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    rmnet2:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
     wlan0:  146112     423   32    0    0     0          0         0    42460     409    0    0    0     0       0          0
    

    In my phone the "rmnet0" row holds is the one that holds the stats for mobile line internet. I hope its format does not vary among kernel versions.

    Method 2: Parse "/sys/class/net".

    I guess this is the recommended method.As shown here: http://www.jaqpot.net/svn/android/netcounter/trunk/src/net/jaqpot/netcounter/service/SysClassNet.java


    展开全文
  • <p>Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm <p>How does one resolve it? 转载于:...
  • 2: 修改Settings.Global.DATA_ROAMING(有些版本是:Settings.Secure.DATA_ROAMING)的值,如下,搜索DATA_ROAMING关键字, 修改对应的loadSetting值,一般位于loadSystemSettings()中,可参考如下方法修改:  ...
  • <div><p>https://github.com/notsecure/uTox/issues/184</p> <p>AppData\Roaming would be better than AppData\Local</p><p>该提问来源于开源项目:notsecure/uTox</p></div>
  • appData/Roaming/JamTaba 2' folder. The installer is checking if the 'appData/Local/Jamtaba 2' exists in user machine and copying files recursivelly to Roaming folder. </li><li> <p>...
  • Upgrade AppData\Roaming\npm

    2020-12-01 11:41:26
    t spent much time looking at how the script works, but can it upgrade npm installs in AppData\Roaming\npm too? I noticed the npm ...
  • “#AppData-Roaming-Sublime-Text-3”
  • <div><p>The default location for scriptcs when installed via chocolately has changed going forward - #667 (AppData\Local vs AppData\Roaming). <p>When installing the nightlies version (cinst with force...
  • <div><p>The Portable edition of mRemoteNG 1.75 RC1 saves user.config to both AppData\Local and AppData\Roaming. When you launch the software it doesn't look for AppData\Roaming, so it thinks you&#...
  • 自Vista及Win7开始,微软更改了原有的应用程序存储目录结构,(XP是Application Data)C\用户\用户名\Appdata, 并分为Roaming, Local,及 LocalLow三个文件夹. 更改原因如下: 优化登录速度 根据使用安全级别分别访问...
  • \ AppData \ Roaming \ FreeCAD \ Macro的相关内容 暂存的Python代码文件和必要的FreeCAD文件 先决条件: 已安装FreeCAD 0.18已安装Python 3.6.8已安装Pyquaternion 0.9.9和Shapely 1.7.1,并将目录从... \ Python...
  • %AppData%\Roaming\Microsoft\Crypto\RSA滿了

    千次阅读 2020-02-19 20:16:06
    Folder %AppData%\Roaming\Microsoft\Crypto\RSA filled up with hundreds of small files knowledge from https://support.qlik.com/articles/000070548 Folder %AppData%\Roaming\Microsoft\Crypto\RSA...
  • <div><p>In case there are national characters in the path to AppData\Roaming\Electrum - for example, username in OS is "Администратор", then the full path looks like C:\Users\Ад...
  • <div><p>I think the Portable version of mpv.net should not make a settings folder in appdata/roaming. A portable version should have everything contained in one folder, so you don't leave your ...
  • 在用脚手架搭建vue项目时,提示:无法加载文件 C:\Users\1111111\AppData\Roaming\npm\vue.ps1,因为在此系统禁止运行脚本 这是你笔记本禁止运行脚本,解决办法 1.管理员身份打开 2 3.输入set-ExecutionPolicy ...
  • C:\Users[username]\AppData\Roaming\mRemoteNG <p>In an domain envirionment with roaming profile you have no settings, very bad bug.</p><p>该提问来源于开源项目:mRemoteNG/mRemoteNG</p></div>
  • t available in the AppData\Roaming\Sublime Text 3\Packages\omnisharp-sublime\PrebuiltOmniSharpServer\approot\packages\KRE-Mono.1.0.0-beta2\bin folder. <p>This is probably a bug in kpm pack, but this ...
  • <p>My request is to place sync clients configs at %appdata%\roaming to be sure users settings are within roaming profile. <p>Regards Timm</p><p>该提问来源于开源项目:owncloud/client</p></div>
  • AppData\Roaming\npm-cache\_logs

    千次阅读 2019-03-24 16:31:43
    C:\Users\Kelly\AppData\Roaming\npm-cache\_logs\2019-03-24T08_17_24_284Z-debug.log 解决方案1: 1、删除node_modules包 2、清除缓存:npm cache clean --force 3、重新安装:npm install 解决方法2...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 14,441
精华内容 5,776
关键字:

dataroaming