cant get senbroadcast to work

15 views
Skip to first unread message

arnewas...@gmail.com

unread,
Apr 10, 2015, 9:18:11 AM4/10/15
to codenameone...@googlegroups.com

IDE: Eclipse
Desktop Windows

Hello i am developing an application for my thesis work. I want to broadcast an intent with sendbroadcast in my native interface but i cant for the life of me get it to work....

this is my code:

package com.bth.thesis;


import android.app.Activity.*;
import android.os.Bundle.*;
import android.content.Intent.*;
import android.content.Context.*;
import com.codename1.impl.android.*;
import com.codename1.system.NativeLookup.*;

public class MybImpl implements Myb{
    public void sendBcast(String param, String param2, String param3 ) {
   
   
    android.content.Intent stateUpdate = new android.content.Intent(param3);
        stateUpdate.putExtra(param2,param);
        sendBroadcast(stateUpdate);
    
    }

    public boolean isSupported() {
        return true;
    }

}

i get the error:

  [javac] Compiling 496 source files to /tmp/build8064951985847418897xxx/MyApplication/bin/classes
    [javac] /tmp/build8064951985847418897xxx/MyApplication/src/com/bth/thesis/MybImpl.java:17: error: cannot find symbol
    [javac]         sendBroadcast(stateUpdate);
    [javac]         ^
    [javac]   symbol:   method sendBroadcast(Intent)
    [javac]   location: class MybImpl
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error

i have created a text application in android and there the code works.

arnewas...@gmail.com

unread,
Apr 10, 2015, 9:40:03 AM4/10/15
to codenameone...@googlegroups.com, arnewas...@gmail.com
I solved it
Reply all
Reply to author
Forward
0 new messages