Click here to Skip to main content
14,669,557 members
Home » Discussions » Android
   

Android

 
AnswerRe: attach .jar file to already running apk in emulator Pin
Leanbridge Technologies21-Nov-19 19:48
professionalLeanbridge Technologies21-Nov-19 19:48 
QuestionNullPointerException When Setting ClickListener on a RelativeLayout Pin
Django_Untaken12-Sep-19 0:52
MemberDjango_Untaken12-Sep-19 0:52 
AnswerRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
Richard MacCutchan12-Sep-19 1:40
mveRichard MacCutchan12-Sep-19 1:40 
GeneralRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
Django_Untaken12-Sep-19 1:44
MemberDjango_Untaken12-Sep-19 1:44 
GeneralRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
Richard MacCutchan12-Sep-19 2:24
mveRichard MacCutchan12-Sep-19 2:24 
SuggestionRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
David Crow12-Sep-19 9:22
MemberDavid Crow12-Sep-19 9:22 
QuestionUnRegister BroadcastReceiver Dynamically While Exiting App throws IllegalArgumentException Pin
Django_Untaken12-Sep-19 0:16
MemberDjango_Untaken12-Sep-19 0:16 
AnswerRe: UnRegister BroadcastReceiver Dynamically While Exiting App throws IllegalArgumentException Pin
Richard Deeming12-Sep-19 0:46
mveRichard Deeming12-Sep-19 0:46 
Does the exception say that the receiver is not registered?

At a guess, you're calling unregisterReceiver twice.

I don't "do" Android dev, but I suspect you'd want something more like this:
public void setOnHomePressedListener(OnHomePressedListener listener) {
    mListener = listener;
}

public void startWatch() {
    if (mListener != null && mReceiver == null) {
        mReceiver = new InnerReceiver();
        mContext.registerReceiver(mReceiver, mFilter);
    }
}

public void stopWatch() {
    if (mReceiver != null) {
        mContext.unregisterReceiver(mReceiver);
        mReceiver = null;
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

QuestionHow to get a email from gmail to Wordpress? Pin
Member 1456898626-Aug-19 5:42
MemberMember 1456898626-Aug-19 5:42 
AnswerRe: How to get a email from gmail to Wordpress? Pin
Richard Deeming27-Aug-19 3:09
mveRichard Deeming27-Aug-19 3:09 
AnswerRe: How to get a email from gmail to Wordpress? Pin
Leanbridge Technologies5-Nov-19 19:51
professionalLeanbridge Technologies5-Nov-19 19:51 
AnswerRe: How to get a email from gmail to Wordpress? Pin
CharlesRogers24-Dec-19 16:30
professionalCharlesRogers24-Dec-19 16:30 
QuestionImage Transfer from Raspberry Pi (in Python) to Android app (Java) Pin
Member 1453729921-Jul-19 19:57
MemberMember 1453729921-Jul-19 19:57 
AnswerRe: Image Transfer from Raspberry Pi (in Python) to Android app (Java) Pin
Richard MacCutchan21-Jul-19 21:29
mveRichard MacCutchan21-Jul-19 21:29 
Questionpython Pin
Member 1453431517-Jul-19 23:25
MemberMember 1453431517-Jul-19 23:25 
AnswerRe: python Pin
Richard MacCutchan18-Jul-19 0:37
mveRichard MacCutchan18-Jul-19 0:37 
AnswerRe: python Pin
Afzaal Ahmad Zeeshan18-Jul-19 0:56
mvaAfzaal Ahmad Zeeshan18-Jul-19 0:56 
QuestionQR camera scan with android phone using C# Pin
A.Shoman15-Jul-19 21:04
MemberA.Shoman15-Jul-19 21:04 
AnswerRe: QR camera scan with android phone using C# Pin
Richard MacCutchan15-Jul-19 21:15
mveRichard MacCutchan15-Jul-19 21:15 
Questiondownload sound file in android webview Pin
Member 1450174330-Jun-19 23:00
MemberMember 1450174330-Jun-19 23:00 
QuestionRe: download sound file in android webview Pin
David Crow3-Jul-19 4:11
MemberDavid Crow3-Jul-19 4:11 
AnswerRe: download sound file in android webview Pin
Member 145017433-Jul-19 4:27
MemberMember 145017433-Jul-19 4:27 
QuestionCan't make charge with stripe in android Fire base Pin
Saboor880220-Jun-19 6:21
MemberSaboor880220-Jun-19 6:21 
SuggestionRe: Can't make charge with stripe in android Fire base Pin
David Crow21-Jun-19 3:08
MemberDavid Crow21-Jun-19 3:08 
QuestionAll record from SQLite DB is not inserting properly by using PHP and Android. Loop is not working. Pin
PRASANTA KUMAR BISWAS5-May-19 19:33
MemberPRASANTA KUMAR BISWAS5-May-19 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.