app crashes after pressing positive button in alert dialogHow do I display an alert dialog on Android?How to prevent a dialog from closing when a button is clickedStarting Dialog from QuickAction ButtonHow can I display a list view in an Android Alert Dialog?Alert dialog is opening two times results crash of applicationApp crashing while trying to display a Toast on AlertDialog button click (in a Fragment)How to Delete item in ListView and Database - Android StudioHow to dismiss android alert dialog itself via setOnEditorActionListener?when mesg box exits it returns to prevoius activytyApp crashes after dismissing an Alert Dialog (gets stuck in loop())

Does Nitrogen inside commercial airliner wheels prevent blowouts on touchdown?

Defining the standard model of PA so that a space alien could understand

Where is the logic in castrating fighters?

Count rotary dial pulses in a phone number (including letters)

Is the Indo-European language family made up?

How to make a villain fall in love?

Writing with dry erase marker on Shabbos, is it permitted?

Compactness of finite sets

Did people go back to where they were?

Why does the 6502 have the BIT instruction?

Should I disclose a colleague's illness (that I should not know) when others badmouth him

How to use " shadow " in pstricks?

Adding spaces to string based on list

Pirate democracy at its finest

Binary Search in C++17

What is quasi-aromaticity?

Are these reasonable traits for someone with autism?

Why does this if-statement combining assignment and an equality check return true?

Employer asking for online access to bank account - Is this a scam?

How to pull out the underlying query syntax being used by dataset?

Should breaking down something like a door be adjudicated as an attempt to beat its AC and HP, or as an ability check against a set DC?

Line of lights moving in a straight line , with a few following

Is real public IP Address hidden when using a system wide proxy in Windows 10?

Using credit/debit card details vs swiping a card in a payment (credit card) terminal



app crashes after pressing positive button in alert dialog


How do I display an alert dialog on Android?How to prevent a dialog from closing when a button is clickedStarting Dialog from QuickAction ButtonHow can I display a list view in an Android Alert Dialog?Alert dialog is opening two times results crash of applicationApp crashing while trying to display a Toast on AlertDialog button click (in a Fragment)How to Delete item in ListView and Database - Android StudioHow to dismiss android alert dialog itself via setOnEditorActionListener?when mesg box exits it returns to prevoius activytyApp crashes after dismissing an Alert Dialog (gets stuck in loop())






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















whenever i am pressing my positive button of alert dialog by simply writing toast it is working fine and toast is visible but if i am performing any action on positive button then the action is getting performed but in the meanwhile my app also crashes.



  • In my app basically after clicking positive button it has to send on link of forgotten password to respective mail id.

  • code is working fine for sending link of forgotten password.

  • whenever i am pressing positive button of alert dialogue i am able to get the link in my mail but i don't know why my app crashes just after hitting the positive button of alert dialogue


disire:- I just want to run my app smoothly that is after pressing positive button it should show the required toast message and just close the alert dialogue by performing the required action.




below is the error shown in logcat.



 java.lang.RuntimeException: Performing stop of activity that is not resumed:
com.android.launcher3/com.android.launcher2.Launcher


code snippet is like this.



sendingPassword=FirebaseAuth.getInstance();

AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
LayoutInflater inflater=getActivity().getLayoutInflater();
final View view=inflater.inflate(R.layout.dialogue_layout,null);

builder.setView(view)
.setTitle("forget password")
.setNegativeButton("cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)


)
.setPositiveButton("send", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
forgetEmail=view.findViewById(R.id.forgetpasswordarea);

sendingPassword.sendPasswordResetEmail(forgetEmail.getText().toString().trim())
.addOnCompleteListener(new OnCompleteListener<Void>()
@Override
public void onComplete(@NonNull Task<Void> task)

if(task.isSuccessful())

Toast.makeText(getActivity(),"check your email for link",Toast.LENGTH_LONG).show();

else

Toast.makeText(getActivity(),task.getException().getMessage(),Toast.LENGTH_LONG).show();


);



);


return builder.create();
}









share|improve this question



















  • 1





    You need to provide stacktrace of crash?

    – Vinay Avasthi
    Mar 24 at 5:57











  • it is very bulky

    – RAVI KUMAR SHARMA CSE16
    Mar 24 at 6:07

















0















whenever i am pressing my positive button of alert dialog by simply writing toast it is working fine and toast is visible but if i am performing any action on positive button then the action is getting performed but in the meanwhile my app also crashes.



  • In my app basically after clicking positive button it has to send on link of forgotten password to respective mail id.

  • code is working fine for sending link of forgotten password.

  • whenever i am pressing positive button of alert dialogue i am able to get the link in my mail but i don't know why my app crashes just after hitting the positive button of alert dialogue


disire:- I just want to run my app smoothly that is after pressing positive button it should show the required toast message and just close the alert dialogue by performing the required action.




below is the error shown in logcat.



 java.lang.RuntimeException: Performing stop of activity that is not resumed:
com.android.launcher3/com.android.launcher2.Launcher


code snippet is like this.



sendingPassword=FirebaseAuth.getInstance();

AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
LayoutInflater inflater=getActivity().getLayoutInflater();
final View view=inflater.inflate(R.layout.dialogue_layout,null);

builder.setView(view)
.setTitle("forget password")
.setNegativeButton("cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)


)
.setPositiveButton("send", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
forgetEmail=view.findViewById(R.id.forgetpasswordarea);

sendingPassword.sendPasswordResetEmail(forgetEmail.getText().toString().trim())
.addOnCompleteListener(new OnCompleteListener<Void>()
@Override
public void onComplete(@NonNull Task<Void> task)

if(task.isSuccessful())

Toast.makeText(getActivity(),"check your email for link",Toast.LENGTH_LONG).show();

else

Toast.makeText(getActivity(),task.getException().getMessage(),Toast.LENGTH_LONG).show();


);



);


return builder.create();
}









share|improve this question



















  • 1





    You need to provide stacktrace of crash?

    – Vinay Avasthi
    Mar 24 at 5:57











  • it is very bulky

    – RAVI KUMAR SHARMA CSE16
    Mar 24 at 6:07













0












0








0








whenever i am pressing my positive button of alert dialog by simply writing toast it is working fine and toast is visible but if i am performing any action on positive button then the action is getting performed but in the meanwhile my app also crashes.



  • In my app basically after clicking positive button it has to send on link of forgotten password to respective mail id.

  • code is working fine for sending link of forgotten password.

  • whenever i am pressing positive button of alert dialogue i am able to get the link in my mail but i don't know why my app crashes just after hitting the positive button of alert dialogue


disire:- I just want to run my app smoothly that is after pressing positive button it should show the required toast message and just close the alert dialogue by performing the required action.




below is the error shown in logcat.



 java.lang.RuntimeException: Performing stop of activity that is not resumed:
com.android.launcher3/com.android.launcher2.Launcher


code snippet is like this.



sendingPassword=FirebaseAuth.getInstance();

AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
LayoutInflater inflater=getActivity().getLayoutInflater();
final View view=inflater.inflate(R.layout.dialogue_layout,null);

builder.setView(view)
.setTitle("forget password")
.setNegativeButton("cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)


)
.setPositiveButton("send", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
forgetEmail=view.findViewById(R.id.forgetpasswordarea);

sendingPassword.sendPasswordResetEmail(forgetEmail.getText().toString().trim())
.addOnCompleteListener(new OnCompleteListener<Void>()
@Override
public void onComplete(@NonNull Task<Void> task)

if(task.isSuccessful())

Toast.makeText(getActivity(),"check your email for link",Toast.LENGTH_LONG).show();

else

Toast.makeText(getActivity(),task.getException().getMessage(),Toast.LENGTH_LONG).show();


);



);


return builder.create();
}









share|improve this question
















whenever i am pressing my positive button of alert dialog by simply writing toast it is working fine and toast is visible but if i am performing any action on positive button then the action is getting performed but in the meanwhile my app also crashes.



  • In my app basically after clicking positive button it has to send on link of forgotten password to respective mail id.

  • code is working fine for sending link of forgotten password.

  • whenever i am pressing positive button of alert dialogue i am able to get the link in my mail but i don't know why my app crashes just after hitting the positive button of alert dialogue


disire:- I just want to run my app smoothly that is after pressing positive button it should show the required toast message and just close the alert dialogue by performing the required action.




below is the error shown in logcat.



 java.lang.RuntimeException: Performing stop of activity that is not resumed:
com.android.launcher3/com.android.launcher2.Launcher


code snippet is like this.



sendingPassword=FirebaseAuth.getInstance();

AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
LayoutInflater inflater=getActivity().getLayoutInflater();
final View view=inflater.inflate(R.layout.dialogue_layout,null);

builder.setView(view)
.setTitle("forget password")
.setNegativeButton("cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)


)
.setPositiveButton("send", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
forgetEmail=view.findViewById(R.id.forgetpasswordarea);

sendingPassword.sendPasswordResetEmail(forgetEmail.getText().toString().trim())
.addOnCompleteListener(new OnCompleteListener<Void>()
@Override
public void onComplete(@NonNull Task<Void> task)

if(task.isSuccessful())

Toast.makeText(getActivity(),"check your email for link",Toast.LENGTH_LONG).show();

else

Toast.makeText(getActivity(),task.getException().getMessage(),Toast.LENGTH_LONG).show();


);



);


return builder.create();
}






java android android-alertdialog






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 5:57







RAVI KUMAR SHARMA CSE16

















asked Mar 24 at 5:49









RAVI KUMAR SHARMA CSE16RAVI KUMAR SHARMA CSE16

1178




1178







  • 1





    You need to provide stacktrace of crash?

    – Vinay Avasthi
    Mar 24 at 5:57











  • it is very bulky

    – RAVI KUMAR SHARMA CSE16
    Mar 24 at 6:07












  • 1





    You need to provide stacktrace of crash?

    – Vinay Avasthi
    Mar 24 at 5:57











  • it is very bulky

    – RAVI KUMAR SHARMA CSE16
    Mar 24 at 6:07







1




1





You need to provide stacktrace of crash?

– Vinay Avasthi
Mar 24 at 5:57





You need to provide stacktrace of crash?

– Vinay Avasthi
Mar 24 at 5:57













it is very bulky

– RAVI KUMAR SHARMA CSE16
Mar 24 at 6:07





it is very bulky

– RAVI KUMAR SHARMA CSE16
Mar 24 at 6:07












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321076%2fapp-crashes-after-pressing-positive-button-in-alert-dialog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321076%2fapp-crashes-after-pressing-positive-button-in-alert-dialog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript