Answered by:
How to get data usage notification

Question
-
Hi,
I am working on a mobile broadband campanion app.
I am interested in getting data usage notification.
Docs say we can use system trigger to get notification when there is change of 5% in data usage.
But for that I believe we need to set cost (data limit).I tried to set cost through provisioning.
Most example on net add cost element in DefaultProfile.
But I am getting error while using this xml as Cost is not part of DefaultProfile.
<?xml version="1.0"?>
<CarrierProvisioning xmlns="http://www.microsoft.com/networking/CarrierControl/v1">
<Global>
<CarrierId>{00000000-1111-2222-3333-444444444444}</CarrierId>
<SubscriberId>1234567890</SubscriberId>
</Global>
<MBNProfiles>
<DefaultProfile xmlns="http://www.microsoft.com/networking/CarrierControl/WWAN/v1">
<Name>Profile Name</Name>
<Description>The Description</Description>
<Cost xmlns="http://www.microsoft.com/networking/CarrierControl/DUSM/v1" PlanType="Fixed" OverDataLimit="true" Congested="true">
<UsageInMegabytes Timestamp="2002-05-30T09:30:10+06:00">25</UsageInMegabytes>
<DataLimitInMegabytes>10</DataLimitInMegabytes>
<BillingCycle StartDate="2011-09-30T09:30:10+06:00" Duration="P1Y4M20DT2H34M78S" Resets="false"></BillingCycle>
<BandwidthInKbps>5</BandwidthInKbps>
<MaxDownloadFileSizeInMegabytes>25</MaxDownloadFileSizeInMegabytes>
<CarrierPolicy>
<SecurityUpdatesExempt>true</SecurityUpdatesExempt>
</CarrierPolicy>
</Cost>
<HomeProviderName>Contoso</HomeProviderName>
<Context>
<AccessString>apn</AccessString>
<UserLogonCred>
<UserName>username</UserName>
<Password>password</Password>
</UserLogonCred>
</Context>
</DefaultProfile>
</MBNProfiles>
</CarrierProvisioning>Is there any other way to set Datalimit.
Thanks,
Win8 dev- Edited by Help Window8 Developer Sunday, June 3, 2012 1:44 AM
Saturday, June 2, 2012 3:33 PM
Answers
-
Hi Eric,
Thanks for looking into it.
I found that we can add Plans to CarrierProvisioning.
But If I add Plan then I get error 82170013 in Plan.
Where can I find the meaning of this error.Thanks,
Win8 DevError 0x82170013 means that there was a plan defined but does not link to any profiles. In other words, the Plan name for the plan (Plans/Plan/@name) does not match to the associated plan name in the MBN profile (MBNProfiles/MBNProfile/AssociatedPlan).
- Proposed as answer by Eric Hanson-MSFTModerator Friday, June 15, 2012 10:54 PM
- Marked as answer by Eric Hanson-MSFTModerator Wednesday, June 20, 2012 4:26 AM
Friday, June 15, 2012 10:53 PMModerator
All replies
-
Win8 Dev,
I will look into this for you.
Best Wishes - Eric
Sunday, June 3, 2012 5:21 AMModerator -
Hi Eric,
Thanks for looking into it.
I found that we can add Plans to CarrierProvisioning.
But If I add Plan then I get error 82170013 in Plan.
Where can I find the meaning of this error.Thanks,
Win8 DevMonday, June 4, 2012 2:38 PM -
DataLimit is set in the Plan. In the profile, you set an AssociatedPlan which matches the Plan’s Name. A single Plan can be tied to multiple (MBN, Wi-Fi) profiles. Could you send a pointer to the documentation which shows the Cost directly embedded in the plan? That needs to be updated if it hasn’t been already.
Best Wishes - Eric
Wednesday, June 6, 2012 11:25 PMModerator -
Hi Eric,
What is the schema AssociatedPlan, online docs just say TBD.
I am not able to set the Plans in CarrierControlSchema, I get error 82170013 when I add Plans to CarrierControlSchema.
What does this error signifies. Can you provide me an example for Plans.Thanks,
Win8 Dev
Thursday, June 7, 2012 11:28 AM -
Win8 Dev,
Could you send me a pointer to the docs that say TBD?
Best Wishes - Eric
Friday, June 8, 2012 6:23 AMModerator -
http://msdn.microsoft.com/en-us/library/windows/apps/hh868443.aspx
Description says TBD.
How would we use AssociatedPlan if we are not able to set a Plan
Friday, June 8, 2012 11:01 AM -
Win 8 Dev,
I have reported the doc issue. I am also looking into this for you.
Best Wishes - Eric
Wednesday, June 13, 2012 3:30 AMModerator -
Thanks for looking into this Eric.
Would you know if system trigger NetworkStateChange also fires when there is a change in data usage by more then 5%.
Are there any triggers that monitor connection data usage.
Thanks,
Win8 Dev
Wednesday, June 13, 2012 10:35 AM -
Hi Eric,
Thanks for looking into it.
I found that we can add Plans to CarrierProvisioning.
But If I add Plan then I get error 82170013 in Plan.
Where can I find the meaning of this error.Thanks,
Win8 DevError 0x82170013 means that there was a plan defined but does not link to any profiles. In other words, the Plan name for the plan (Plans/Plan/@name) does not match to the associated plan name in the MBN profile (MBNProfiles/MBNProfile/AssociatedPlan).
- Proposed as answer by Eric Hanson-MSFTModerator Friday, June 15, 2012 10:54 PM
- Marked as answer by Eric Hanson-MSFTModerator Wednesday, June 20, 2012 4:26 AM
Friday, June 15, 2012 10:53 PMModerator