×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Cool I am trying to integrate inner-active ADS sdk into my wp7 Application

    I am trying to integrate inner-active ADS sdk into my wp7 Application using https://inneractive.jira.com/wiki/di...SDK+guidelines.



    Below is the error when the application is Run




    Error 4 The name 'DeviceNetworkInformation' does not exist in the current context E:\Windows projects\New Sample Windows projects\MediaViewer\MediaViewer\Pages\MainPage.xaml.cs 59 17 MediaViewer




    Below is the code

    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    using Microsoft.Phone.Controls;
    using MediaViewer.ViewModels;
    using Inneractive.Nokia.Ad;
    using InneractiveAdLocation;
    using Microsoft.Phone.Net.NetworkInformation;



    private void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
    if (DeviceNetworkInformation.IsNetworkAvailable)
    {
    // Watch location
    IaLocationClass iaLocation = new IaLocationClass();
    iaLocation.Done += new System.EventHandler<IaLocationEventArgs>(iaLocation_Done);
    iaLocation.StartWatchLocation();

    optionalParams = new Dictionary<InneractiveAd.IaOptionalParams, string>();
    optionalParams.Add(InneractiveAd.IaOptionalParams.Key_OptionalAdWidth, "300"); //ad width
    optionalParams.Add(InneractiveAd.IaOptionalParams.Key_OptionalAdHeight, "250"); //add height
    }

    //Show Add Banner. Remarks: pay attention to use Application Id from NAX
    //nax_control.Childred.Count()==0 => just to add one banner control on a page. Without this, code would add as many banners as you navigate to page where banner is placed
    if (optionalParams != null && nax_control.Children.Count() == 0)
    {


    InneractiveAd iaBanner = new InneractiveAd("GlobalTakeoffInc_Yupp_WP", InneractiveAd.IaAdType.IaAdType_Banner, 30, optionalParams);
    nax_control.Children.Add(iaBanner);


    InneractiveAd iaInterstitial = new InneractiveAd("GlobalTakeoffInc_Yupp_WP", InneractiveAd.IaAdType.IaAdType_Interstitial, 30, optionalParams);
    nax_control.Children.Add(iaInterstitial);
    }
    }





    Please fix the issue

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,491

    Re: I am trying to integrate inner-active ADS sdk into my wp7 Application

    Quote Originally Posted by GTO_India View Post
    I am trying to integrate inner-active ADS sdk into my wp7 Application using https://inneractive.jira.com/wiki/di...SDK+guidelines.



    Below is the error when the application is Run




    Error 4 The name 'DeviceNetworkInformation' does not exist in the current context E:\Windows projects\New Sample Windows projects\MediaViewer\MediaViewer\Pages\MainPage.xaml.cs 59 17 MediaViewer




    Below is the code

    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    using Microsoft.Phone.Controls;
    using MediaViewer.ViewModels;
    using Inneractive.Nokia.Ad;
    using InneractiveAdLocation;
    using Microsoft.Phone.Net.NetworkInformation;



    private void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
    if (DeviceNetworkInformation.IsNetworkAvailable)
    {
    // Watch location
    IaLocationClass iaLocation = new IaLocationClass();
    iaLocation.Done += new System.EventHandler<IaLocationEventArgs>(iaLocation_Done);
    iaLocation.StartWatchLocation();

    optionalParams = new Dictionary<InneractiveAd.IaOptionalParams, string>();
    optionalParams.Add(InneractiveAd.IaOptionalParams.Key_OptionalAdWidth, "300"); //ad width
    optionalParams.Add(InneractiveAd.IaOptionalParams.Key_OptionalAdHeight, "250"); //add height
    }

    //Show Add Banner. Remarks: pay attention to use Application Id from NAX
    //nax_control.Childred.Count()==0 => just to add one banner control on a page. Without this, code would add as many banners as you navigate to page where banner is placed
    if (optionalParams != null && nax_control.Children.Count() == 0)
    {


    InneractiveAd iaBanner = new InneractiveAd("GlobalTakeoffInc_Yupp_WP", InneractiveAd.IaAdType.IaAdType_Banner, 30, optionalParams);
    nax_control.Children.Add(iaBanner);


    InneractiveAd iaInterstitial = new InneractiveAd("GlobalTakeoffInc_Yupp_WP", InneractiveAd.IaAdType.IaAdType_Interstitial, 30, optionalParams);
    nax_control.Children.Add(iaInterstitial);
    }
    }





    Please fix the issue

    Your other thread http://developer.nokia.com/Community...th-test-values had a few suggestions already as solution to your code which seems similar to the one you provided theretoo and the solution also seemed to be working as accepted by you..So what happened?

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: I am trying to integrate inner-active ADS sdk into my wp7 Application

    I dont know I have started integrating for new app I think Iam missing any reference or directive required for device location etc

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    602

    Re: I am trying to integrate inner-active ADS sdk into my wp7 Application

    Have you added Microsoft.Phone dll to the project reference?
    Heard of DVLUP? Join here

  5. #5
    Super Contributor
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,578

    Re: I am trying to integrate inner-active ADS sdk into my wp7 Application

    Have you checked out this article: Implementing_advert_in_Windows_Phone_app_using_Inneractive_with_CSharp (can't see it mentioned in thread, sorry if it has been)

Similar Threads

  1. I have built a WP7 Application How to integrate music API or SDK into my App.
    By GTO_India in forum Nokia MixRadio Windows Phone API
    Replies: 30
    Last Post: 2013-12-09, 09:18
  2. Integrate facebook with application
    By Rondoo23 in forum Mobile Java General
    Replies: 2
    Last Post: 2012-09-24, 01:00
  3. How to integrate Smartinstaller in Qt Quick application for Symbian^3 ??????
    By shintu in forum [Archived] Nokia Smart Installer for Symbian
    Replies: 6
    Last Post: 2011-12-20, 11:08
  4. i need to integrate facebook into my application............................
    By aryansbtloe in forum General Development Questions
    Replies: 2
    Last Post: 2011-06-03, 13:57
  5. Replies: 0
    Last Post: 2002-09-18, 07:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •