How to send datas properly to Google Analytics (ANE-Google-Analytics)

Hello,
I meet a problem when I'm using the native extension created by Alessandro Bianco : ANE-Google-Analytics. I tested this code many times, in the context of AIR mobile application, but I tested it without any success to add new datas to Google Analytic history. I'm really connected to internet properly.
Moreover I think that I've made my functions as required by the author : Can you look at my code below to detect some errors to communicate with Google Analytics ?
<s:TabbedViewNavigatorApplication
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="creationCompleteHandler(event)"
>
    import eu.alebianco.air.extensions.analytics.Analytics;
    import eu.alebianco.air.extensions.analytics.api.ITracker;
    import flash.utils.clearInterval;
    import flash.utils.setInterval;
    import flash.utils.setTimeout;
    public var ganalytics:Analytics;
    public var gtracker:ITracker;
    protected var i:int = 1; // Debug
    protected static const ANALYTICS_ID = "My UA code is here";
    protected function creationCompleteHandler(event:Event):void
        // I launch the tracker :
        ganalytics  = Analytics.getInstance();
        ganalytics.dispatchInterval = 5; // Interval for connecting : 5 seconds
        // I begin to use the tracker :
        GtrackerSessionUsing("RecordingView","HomeView",true);
     * GtrackerConnecting
     * @description : Open connection to Google Analytics, and create instance for a tracker
     * @argument : actionName = "RecordView" or "RecordEvent"
     * @argument : valueName = Name of the view or name of the event to record
    public function GtrackerSessionUsing(actionName:String, valueName:String, createConnection:Boolean=false):void
        gtracker = ganalytics.getTracker(ANALYTICS_ID);
        gtracker.startNewSession();
        if(etablirConnexion==true)
            // Tracking des views :
            var compteur:int = 0;
            var intervalGtrackerCnxOuvrir:uint = setInterval(function():void{
                counter++;
                trace("gtracker ="+gtracker);
                if(counter==50){ // Try to connect - only - 50 times
                    trace("GoogleTracker fails to connect !");
                    clearInterval(intervalGtrackerCnxOuvrir);
                else if(gtracker!=null){
                    trace("GoogleTracker success to connect !");
                    GTrackerRecordAction("EnregistrerView","HomeView");
                    clearInterval(intervalGtrackerCnxOuvrir);
                else{
                    trace("Trying to connect to GoogleTracker... (itérate #"+counter+")");
                    gtracker = ganalytics.getTracker(ANALYTICS_ID);
                    gtracker.startNewSession();
            },5000); // All 10 seconds : iterate a new connection test
    protected function GTrackerRecordAction(actionName:String, valueName:String)
     * @description : Use the tracker of the Google Analytics connected account, all of Views can call this function with this model of code: parentApplication.GTrackerRecordAction(...)
     * @argument : actionName = "RecordView" or "RecordEvent"
     * @argument : valueName = Name of the view or name of the event to record
        if(gtracker!=null)
            switch(actionName){
                case "RecordView":
                trace("GoogleTracker : gtracker.buildView("+valueName+").track()");
                gtracker.buildView(valueName).track();
                break;
                case "RecordEvent":
                switch(valueName){
                    case "event1":
                        gtracker.buildEvent("click", "button").withLabel("play").withValue(10).track();
                    break;
                    case "event2":
                        gtracker.buildEvent("click", "button").withLabel("stop").track();
                    break;
                    case "event3":
                        gtracker.buildEvent("app", "quit").track();
                    break;
                break;
Best regards.

Youtch,
     I'm not sure exactly what your issue is, but I was unable to connect and looked at your code, modifying it for my purposes and it fixed my code. Hopefully it can help fix yours.
     I did notice one thing as I went through, however:
You use
   var compteur:int = 0;
            var intervalGtrackerCnxOuvrir:uint = setInterval(function():void{
                counter++;
The compteur does not match the counter variable. It appears a problem with Franglais is the issue here.
In the event it may help, here is the code I used:
In my creationComplete function:
GoogleAnalytics.initialize("UA-47303719-1");
Here is the code in my app.xml
<extensions>
        <extensionID>eu.alebianco.air.extensions.analytics.NativeGATracker</extensionID>
    </extensions>
And here is the class I created to use the ANE:
package ANE.NativeGATracker{
     import flash.utils.clearInterval;
     import flash.utils.setInterval;
     import eu.alebianco.air.extensions.analytics.Analytics;
     import eu.alebianco.air.extensions.analytics.api.ITracker;
     public class GoogleAnalytics{
          static private var _analytics:Analytics;
          static private var _tracker:ITracker;
          static private var _supported:Boolean;
           * There is no need to instantiate this class
          public function GoogleAnalytics(){
          * Initialize the GoogleAnalytics object.. or return false, if Analytics isn't supported
          static public function initialize(ANALYTICS_ID:String):Boolean{
               if(Analytics.isSupported()){
                    _analytics  = Analytics.getInstance();
                    _analytics.dispatchInterval  = 5;
                    establishTracker(ANALYTICS_ID);
                    _supported   = true;
               }else{
                     _supported  = false;
               return _supported;
          * Establish the tracker connection
          * @description: establishes the tracker connection... reattempt every 10 seconds, up to 50 times
          static private function establishTracker(ANALYTICS_ID:String):void{
               _tracker  = _analytics.getTracker(ANALYTICS_ID);
               _tracker.startNewSession();
               var counter:int    = 0;
               var establishInterval:uint  = setInterval(function():void{
                    counter++;
                    trace("Google Analytics tracker = " + _tracker);
                    if(_tracker != null){
                         trace("GoogleAnalytics tracker connected!");
                         _tracker.buildView("Launch").track();
                         _tracker.buildView("Home").track();
                         clearInterval(establishInterval);
                   }else if(counter == 50){
                         trace("GoogleAnalytics failed to connect.");
                         clearInterval(establishInterval);
                   }else{
                         trace("Trying to connect to Google Analytics... attempt #" + counter);
                         _tracker  = _analytics.getTracker(ANALYTICS_ID);
                         _tracker.startNewSession();
               }, 5000);
         * Analytics object
          static public function get analytics():Analytics{
               return GoogleAnalytics._analytics;
          * Tracker object
          static public function get tracker():ITracker{
               return GoogleAnalytics._tracker;
          * Returns true if analytics are supported, but false if they are not. Check this before any use of the tracker or analytics objects
          static public function get supported():Boolean{
               return GoogleAnalytics._supported;

Similar Messages

  • How to send data back to publishing stream

    Hi,
    Environment: ActionScript3.0, FMS, Flash Project created in Flash Develop
    How to send data back to publishing stream? I need to send data back to publishing stream.
    Using NetStream.send() we can send data to subscribers but is it possible to send data from subscriber back to publisher using any NetStream method.
    One other solution to this is remoteSharedObject, but if it is possible with NetStream class then let me know.
    Thanks

    There are a number of ways to extract data from CRM On Demand including:
    * Export - manual process, generate CSV file containing CRM On Demand data
    * List/Analytics - manual process, export the contents of a report of list to a CSV
    * Web Services - programmatic, develop an application that queries for data within CRMOD
    * Integration Events - programmatic, use workflow to trigger event creation and then poll for events to know when an operation occurs on a record (i.e. Insert of new Account record)
    As for getting that data into another system, that will depend on the system and the methods available for inserting data that it makes available.
    Hope this helps.
    Thanks,
    Sean

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • How to send data to RFC Destination(RFC SENDER Adapter)

    Hi ,
    Scenario:  R/3 Backendà RFC Sender Adapterà XIàsome other system.
    I have configured the RFC destination (of the type TCP/IP) at R/3 System and have registered the Program ID (specified in the RFC destination) in the XI server and using it in the configuration parameters of the RFC Sender Adapter.
    Problem: I do not know how I can send data to the RFC destination. (Should I use a report program/ ABAP Function Module?) Can anybody provide me with a sample code of Report Program/Function module (whichever is required), how to send data to the RFC Destination, so that it may be picked up by my RFC Sender Adapter.
    Thanks and Regards,
    Siva Maranani

    I have one query for you that
    I am trying to develop a scenario in SAP XI
    SAP R/3 ( RFC function module) sends a synchronous request to the XI and SAP XI will send this request to a third party web application using HTTP receiver adapter.
    I am able to send the data/message and it is successfully received at the third party web application.
    But I am facing one issue that I am unable to receive any message/data in my RFC module back.i have seen in sxmb_moni that the two messages are displayed in successfuly processed but in SAP R/3 side nothing get happedned
    Can you tell me how to use some waiting mechanism in function module to wait for the response from SAP XI.
    Regards
    Gopesh

  • How to send data to bam data object through java code

    how to send data to bam data object through java code

    I've made a suggestion in other thread: https://forums.oracle.com/thread/2560276
    You can invoke BAM Webservices (Using Oracle BAM Web Services) or use JMS integration using Enterprise Message Sources (http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bam_ent_msg_sources.htm)
    Regards
    Luis Fernando Heckler

  • IDOC :: how to send data from Custom Infotype in SAP HR to third party

    Hi,
    I have created one custom Infotype by number 9020. How to send data from this infotype to third party system and also change pointers need to trigger for this infotype.
    Please help me in doing it.
    I am using one Custom Message type ZTALENT and Custom Idoc Type ZTALENT.
                                                                                    ZTALENT                        Talent Management                                                                               
    5  E1PLOGI                        Header for an HR Object (Master Data or Organizational Data)                                                                               
    5  E1PITYP                        HR: Transported Infotypes and Subtypes for an Object                                                                               
    ZPUSER                         User base Data File                                          
                    ZPERSON                        Personal Information File Segment                            
                    ZPOST                          Position File                                                
                    ZOPE                           Overall Performance                                          
                    ZPWORK                         Outside Work Experience                                      
                    ZPEDUC                         Education Details of Employee                                
                    E1P0000                        HR: HR Master Record Infotype 0000 (Actions)                 
                    E1P0001                        HR: HR Master Record Infotype 0001 (Org. Assignment)         
                    E1P0002                        HR: HR Master Record Infotype 0002 (Personal Data)           
                    E1P0016                        HR Master Record: Infotype 0016 (Contract Elements)          
                    E1P0022                        HR Master Record: Infotype 0022 (Education)                  
                    E1P0023                        HR Master Record: Infotype 0023 (Other/Previous Employers)   
                    E1P0041                        HR Master Record: Infotype 0041 (Date Specifications)        
                    E1P0105                        HR: HR Master Record Infotype 0105 (Communications)       
                   ZE1P9020
                    ZPLANG                         Language Details                                             
                    ZACTION                        Actions Changes            
    Regards,
    Krishna

    Hello Shankar,
             Technically TEMSE files are read by calling the following 3 function modules in sequence,
                  1) RSTS_OPEN_RLC or RP_TS_OPEN: open the temse object
                  2) RSTS_READ : read the object
                  3) RSTS_CLOSE: close the object
    Regards,
    Rajesh

  • How to send data from a web dypro application using workflow

    Hi All,
    I am working on a web dynpro application where the user will enter the header and item details for a FI document to be posted. Once the user enters the data the workflow should initiate and should also send the data across to the approver to approve. To initiate the workflow I am using the function module 'SAP_WAPI_START_WORKFLOW' and it's working fine and generating a uniquw workflow item id. Now my main concern is how to send the data across from web dynpro application through the workflow. I have my data in three internal tables: 1. header table. 2. G/L table and 3. Currency table, I am capturing all this data from the web dypro screen entered by the user. Right now I have the following code in my web dypro application.
    METHOD execute_bapi_acc_document_post .
      DATA: return TYPE TABLE OF bapiret2.
      DATA: wa_return LIKE LINE OF return.
      DATA lo_bapi_acc_document_po TYPE REF TO if_wd_context_node.
      DATA lo_changing TYPE REF TO if_wd_context_node.
      DATA lo_accountgl TYPE REF TO if_wd_context_node.
      DATA lo_currencyamount TYPE REF TO if_wd_context_node.
      DATA lo_importing TYPE REF TO if_wd_context_node.
      DATA lo_documentheader TYPE REF TO if_wd_context_node.
      DATA lo_element TYPE REF TO if_wd_context_element.
      DATA lt_elements TYPE wdr_context_element_set.
      DATA ls_c_documentheader TYPE if_componentcontroller=>element_documentheader.
      DATA lt_c_accountgl TYPE if_componentcontroller=>elements_accountgl.
      DATA ls_c_accountgl LIKE LINE OF lt_c_accountgl.
      DATA lt_c_accountgl_cp TYPE if_componentcontroller=>elements_accountgl.
      DATA lt_c_currencyamount TYPE if_componentcontroller=>elements_currencyamount.
      DATA ls_c_currencyamount LIKE LINE OF lt_c_currencyamount.
      DATA lt_c_currencyamount_cp TYPE if_componentcontroller=>elements_currencyamount.
      DATA wa_c_currencyamount type bapiaccr09.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
      EXPORTING
        TASK                      = 'TSXXXXXXXXXX'            
       USER                      = sy-uname
    IMPORTING
       RETURN_CODE               = L_RETURN_CODE
       WORKITEM_ID               = LV_WIID
    TABLES
    *   INPUT_CONTAINER           = lt_input_container
       MESSAGE_LINES             = lt_message_lines
       AGENTS                    = ls_agents
      lo_bapi_acc_document_po = wd_context->get_child_node( wd_this->wdctx_bapi_acc_document_po ).
      lo_changing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_changing ).
      lo_accountgl = lo_changing->get_child_node( wd_this->wdctx_accountgl ).
      lo_currencyamount = lo_changing->get_child_node( wd_this->wdctx_currencyamount ).
      lo_importing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_importing ).
      lo_documentheader = lo_importing->get_child_node( wd_this->wdctx_documentheader ).
      lo_element = lo_documentheader->get_element( ).
      lo_element->get_static_attributes(
        IMPORTING static_attributes = ls_c_documentheader ).
      lt_elements = lo_accountgl->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_accountgl ).
        INSERT ls_c_accountgl INTO TABLE lt_c_accountgl[].
      ENDLOOP.
      lt_c_accountgl_cp = lt_c_accountgl[].
      lt_elements = lo_currencyamount->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_currencyamount ).
        INSERT ls_c_currencyamount INTO TABLE lt_c_currencyamount[].
      ENDLOOP.
      lt_c_currencyamount_cp = lt_c_currencyamount[].
      READ TABLE lt_c_currencyamount INTO ls_c_currencyamount INDEX 2.
      ls_c_currencyamount-amt_doccur = ls_c_currencyamount-amt_doccur * '-1.0000'.
      MODIFY lt_c_currencyamount FROM ls_c_currencyamount INDEX 2.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader = ls_c_documentheader
        TABLES
          accountgl      = lt_c_accountgl
          currencyamount = lt_c_currencyamount
          return         = return.
    ENDMETHOD.
    Please suggest.
    Thanks,
    Rajat
    I am not sure if this falls in webdynpro or workflow threads.. so I am posting it here also
    Edited by: rajatg on Jun 23, 2010 9:28 PM

    Dear Colleague,
    You have different method to send parameters to Workflow.
    1. Method
    Container Set Element
    DEFINE SWC_SET_ELEMENT.
      CALL FUNCTION 'SWC_ELEMENT_SET'
        EXPORTING
          ELEMENT   = &2
          FIELD     = &3
        TABLES
          CONTAINER = &1
        EXCEPTIONS
          OTHERS    = 1.
    END-OF-DEFINITION.
    Set the data into Workflow container
        SWC_SET_ELEMENT IT_CONTAINER 'parameter1' lv_parameter1.
    Start the Workflow
        CALL FUNCTION 'EWW_WORKFLOW_START'
          EXPORTING
            X_TASK          = 'WS90000001'   " your wf
          IMPORTING
            Y_WORKFLOW_ID   = WF_ID " your workitem id
          TABLES
            X_CONTAINER     = IT_CONTAINER
          EXCEPTIONS
            INVALID_TASK    = 1
            NO_ACTIVE_PLVAR = 2
            START_FAILED    = 3
            GENERAL_ERROR   = 4
            OTHERS          = 5.
    2. Method,
    You can also add your parameters direly to a container,
      DATA: lt_simple_container TYPE TABLE OF swr_cont,
            ls_simple_container TYPE swr_cont.
      ls_simple_container-element = 'parameter1'.
      ls_simple_container-value = lv_parameter1.
      APPEND ls_simple_container TO lt_simple_container.
      CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
        EXPORTING
          workitem_id      = WF_ID " your workitem id
          do_commit        = 'X'
        TABLES
          simple_container = lt_simple_container.
    Bulent.

  • How to send data from WEBI HYPERLINK to SAP R/3

    Can someone please help in sending the data from WEBI to R/3 system.
    We created a universe on top of a BEX Query and on Top of that we created a web intelligence report.
    Now our requirement is when we click on any record in BO web ntelligence report that data should get populated in SAP R/3 system FAGLL03 screen . How to send the data from WEBI to R/3 system.
    Edited by: SAP BPS on Feb 5, 2010 6:23 AM

    Herry,
    You can refer the below docs for reference. Instead of receiver JDBC , you have to use Receiver as R/3.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    I hope it helps.
    Best regards,
    raj.

  • Re: How to send data to  Application Server

    HI Experts,
    Can anyone tell me how to send alv report ouput data to the application server.
    Regards,
    p11272

    Hi,
    You can use Open dataset to transfer internal tables to application server.
    Given below is the Simple code that will help you to extend.
    Parameters to enter the path
    PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat'
                             LOWER CASE.
    Table Declaration
    TABLES VBAK.
    Data Declaration
    DATA D_MSG_TEXT(50).
    Get data for file transfer
    DATA INT_VBAK LIKE VBAK OCCURS 100
                       WITH HEADER LINE.
    SELECT * FROM VBAK INTO TABLE INT_VBAK.
    SORT INT_VBAK BY VBELN.
    LOOP AT INT_VBAK.
      WRITE: / INT_VBAK-VBELN,
               INT_VBAK-KUNNR.
    ENDLOOP.
    Opening the File
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                          MESSAGE D_MSG_TEXT.
    IF SY-SUBRC NE 0.
      WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
      EXIT.
    ENDIF.
    Transferring Data
    LOOP AT INT_VBAK.
      TRANSFER INT_VBAK-VBELN TO FILENAME.
    ENDLOOP.
    Closing the File
    CLOSE DATASET FILENAME.
    Thanks
    shankar

  • How to send data from HR system to PI system

    Hi All,
    I need to write a program that pulls the data from HR system and pushes it to PI system.I pretty much have the logic to pull the HR data but I would like to know the steps involved in pusing the data to PI system and how much time does it take approximately
    Thanks
    Bala Duvvuri

    Hi Bala,
    Proxies are used to send data to the PI system.
    Hence you will have to create ABAP Proxies which will extract the data and send it to the PI System.
    Regards,
    Samreen.

  • EPM add-in for Excel question : How to send data from local member?

    Dear experts,
      for EPM add-in for excel, how do I send data from local member?
    best regards,
    Evans.

    Hello Evans,
    Could you please explain what is your requisite? What is the formula on your local member?
    You can also apply formulas to formatting sheet. This way you can reference the cells in your formatting sheet formulas and save the values in the report area.
    Please check this blog:
    How to use Excel formulas in BPC Input Schedules
    Thank you
    Best regards,
    Raquel Oliveira

  • How to send data back to the server

    i create a program to send data back to ther server using j2me.
    its work well on emulator but when i install the application on sony ericsssin p910i or k700i or nokia 7710 then its not working and simply hang.
    here is sample code which is run well on emulator but not on mobile.
    what is the problem in that or how can this code run in mobile is there any mobile specific setting or internet setting.
    Pls reply asap.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * An example MIDlet to invoke a CGI script.
    public class ThirdExample extends MIDlet {
    private Display display;
    // String url = "http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016";
    String url = "http://sampler.infopro.stpn.soft.net/midletdata.asp?name=name";
    public ThirdExample() {
    display = Display.getDisplay(this);
    * Initialization. Invoked when we activate the MIDlet.
    public void startApp() {
    try {
    getGrade(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    * Pause, discontinue ....
    public void pauseApp() {
    * Destroy must cleanup everything.
    public void destroyApp(boolean unconditional) {
    * Retrieve a grade....
    void getGrade(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    TextBox t = null;
    int x = 5, y =7;
    try {
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    os = c.openOutputStream();
    String str = "?idnum=182016";
    byte postmsg[] = str.getBytes();
    for(int i=0;i<postmsg.length;i++) {
    os.writeByte(postmsg);
    os.flush();
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1) {
    b.append((char) ch);
    System.out.println((char)ch);
    t = new TextBox("Final Grades", b.toString(), 1024, 0);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(c != null) {
    c.close();
    display.setCurrent(t);
    }>

    i create a program to send data back to ther server using j2me.
    its work well on emulator but when i install the application on sony ericsssin p910i or k700i or nokia 7710 then its not working and simply hang.
    here is sample code which is run well on emulator but not on mobile.
    what is the problem in that or how can this code run in mobile is there any mobile specific setting or internet setting.
    Pls reply asap.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * An example MIDlet to invoke a CGI script.
    public class ThirdExample extends MIDlet {
    private Display display;
    // String url = "http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016";
    String url = "http://sampler.infopro.stpn.soft.net/midletdata.asp?name=name";
    public ThirdExample() {
    display = Display.getDisplay(this);
    * Initialization. Invoked when we activate the MIDlet.
    public void startApp() {
    try {
    getGrade(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    * Pause, discontinue ....
    public void pauseApp() {
    * Destroy must cleanup everything.
    public void destroyApp(boolean unconditional) {
    * Retrieve a grade....
    void getGrade(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    TextBox t = null;
    int x = 5, y =7;
    try {
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    os = c.openOutputStream();
    String str = "?idnum=182016";
    byte postmsg[] = str.getBytes();
    for(int i=0;i<postmsg.length;i++) {
    os.writeByte(postmsg);
    os.flush();
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1) {
    b.append((char) ch);
    System.out.println((char)ch);
    t = new TextBox("Final Grades", b.toString(), 1024, 0);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(c != null) {
    c.close();
    display.setCurrent(t);
    }>

  • How to send data using serial Communication

    I want to make serial communication using RXTXcomm.jar file.I was written the code.From this I got the list of serial ports avilable on pc but then after when I was tring to send command to machine which is attached to port it didn't gave any reply.
    Tell me that how to send command to port?

    This is how I do it:// open port, get ownership
    SerialPort serialPort= (SerialPort)portId.open(APPLICATIONNAME, timeout);
    // no framing and no threshold
    serialPort.disableReceiveFraming();
    serialPort.disableReceiveThreshold();
    // communication speed, parity, stopbits and databits
    serialPort.setSerialPortParams(BAUDRATE, SerialPort.DATABITS_8,
         SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
    // no handshaking or other flow control
    serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);
    // timer on any read of the serial port
    serialPort.enableReceiveTimeout(TIMEOUT);
    // open streams for reading and writing
    InputStream is= serialPort.getInputStream();
    OutputStream os= serialPort.getOutputStream();... then you use the 'os' stream for writing and the 'is' stream for reading.
    kind regards,
    Jos

  • How to send data one row at a time from xml to flex

    I want to setTimerEvent while sending data from xml to flex, one row at a time.
    I have attached the xml.
    Thanks in advance.

    Hi Greg,
    Thanks for the reply. You must have seen the xml which i have attached.Here is the .mxml code which i have written:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="accountData.send()">
    <mx:Script>
    <![CDATA[
    import mx.controls.*;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var AccountInformation:ArrayCollection;
    private function AccountHandler(evt:ResultEvent):void
        AccountInformation = evt.result.xml.AccInfo;
    private function faultHandler(evt:FaultEvent):void
        var faultMessage:String = "Could not connect with XML file";
        Alert.show(faultMessage, "Error opening file");
    ]]>
    </mx:Script>
    <mx:HTTPService id="accountData" url="pgm1.xml" result="AccountHandler(event)" fault="faultHandler(event)"  />
    <mx:DataGrid x="20" y="24" width="950" dataProvider="{AccountInformation}" />
    </mx:Application>
    This reads and displays all the rows. But I want to display single row at a time with sometime time gap between the display of two consecutive rows.I am new to flex and this is my first code, so need your help on this.
    I hope i have made myself clear. If there is anything else please let me know.
    Looking forward to some solution.
    Thanks in advance.
    Regards,
    praj58

  • How to send data to a RFC destination.

    Hai All,
      I am new to this forum.
      I want to know how to push data from infocube(SEM) into a BAPI in SAP R/3.
    Arul Jothi.

    Hi,
    This process is known as 'Retractor' in BPS.
    Please follow the below topic/thread exactly on the same topic:
    Re: Developing a custom retractor
    HTH,
    Regards,
    Nataraj.

Maybe you are looking for

  • Remote Desktop and Intel processors

    Does Remote Desktop work well on Intel processors working as a VNC server? I do not see a Universal icon on the Remote Desktop website so this would run through Rosetta if I am correct. Dual 2.7 Ghz G5   Mac OS X (10.4.6)  

  • Access SAP Data Archival file from outside SAP

    Hello Everyone, I have a requirement to archive the SAP data, dump that outside SAP in some other system like ILM or BI and build a reporting tool on top of that data. So, basically customer want to shutdown the SAP and want to retain data for legal

  • Difference between Business Analyst SAP SD and SAP SD consultant

    Hi friends I need openion about what is difference between Business Analyst SAP SD and SAP SD consultant. Raj

  • InDesign CS2 (4.0.5) freezes on dragging from one window to another

    Using CS2 on Mac 10.4.11, 2.5GB, if I stay within InDesign, works fine, no issues. If I drag from Illustrator or another CS2 app, computer locks up, curser still moves, but apps, keyboard unresponsive. Have to reboot to clear. Have run disk check uti

  • IDvd won't display thumbnails of slideshow photos

    Hi, I'm having trouble with my iDvd. All works fine, music, themes, and the like, but when I want to make a slideshow, with selected photos, idvd does not display the photos in the thumbnail view. All it does is try to load it. I've waited and waited


HashFlare