2012-12-20 9 views
10

に更新されていない私は、ブラックベリーの分析サービスのデモ・アプリケーションを開発したが、報告書は、私のプログラムがあるアカウントが更新されません。..レポートは、ブラックベリーの分析で

public class MyApp extends WebtrendsUiApplication { 

    public static void main(String[] args) { 
     MyApp theApp = new MyApp(); 
     theApp.enterEventDispatcher(); 
    } 

    public MyApp() { 
     WebtrendsConfigurator.LoadConfigFile(new AnalyticsConfig()); 
     WebtrendsDataCollector wtDC = WebtrendsDataCollector.getInstance(); 
     wtDC.Initialize(); 
     pushScreen(new MyScreen()); 

    } 

    private class AnalyticsConfig extends WebtrendsConfig { 

     public String wt_dc_app_name() { 
      return "sample"; 
     } 

     public String wt_dc_app_version() { 
      return "1.0.1"; 
     } 

     public String wt_dc_dcsid() { 
      return "dcswcrmlj9dv0hgctfq9y6lw8_3w4g"; // Analytics Demo 
     } 

     public String wt_dc_debug() { 
      return "true"; 
     } 

     public String wt_dc_timezone() { 
      return "+5"; 
     } 

     public String wt_dc_url() { 
      return "http://dc.webtrends.com/v1"; 
     } 

     public String wt_dc_app_category() { 
      return "Utilities"; 
     } 

     public String wt_dc_app_publisher() { 
      return "abc"; 
     } 

    } 
} 



public final class MyScreen extends MainScreen implements FieldChangeListener{ 

    ButtonField b; 

    public MyScreen() { 
     b=new ButtonField(); 
     b.setChangeListener(this); 
     add(b); 
    } 

    public boolean onClose() { 
     try { 
      WebtrendsDataCollector.getInstance().onApplicationTerminate("Application Terminate", null); 
     } catch (IllegalWebtrendsParameterValueException err) { 
      WebtrendsDataCollector.getLog().e(err.getMessage()); 
     } 
     System.exit(0); 

     return true; 
    } 

    public void fieldChanged(Field field, int context) { 
     if(field==b){ 
      try { 
       WebtrendsDataCollector.getInstance().onAdClickEvent("/mainscreen", "Main Screen", "menu", null, "Demo Ad"); 
      } catch (IllegalWebtrendsParameterValueException e1) { 
       System.out.println(e1.toString()); 
       e1.printStackTrace(); 
      } 
     } 
    } 
} 

問題がどこにあるか見つけてください。私はアプリケーション内のdcsidだけを変更しました。

+0

サイドノート..私はuを使用することができ、クラスのグループのように書いたold..butこの質問はかなり知っている:あなた 'OnCloseの()'メソッドは 'System.extを持っている(0)'そして '真実を返す '。それは決して戻りません。 – Coderchu

答えて

関連する問題