Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:52:24+00:00 2026-06-16T09:52:24+00:00

I’m new in android world.. I want in my application to send an email

  • 0

I’m new in android world..

I want in my application to send an email once the user enter some sequence of numbers.. For example, if the user enter “*1234” and other numbers then he presses a button. After that directly the number will be sent using an email address

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:52:26+00:00Added an answer on June 16, 2026 at 9:52 am

    Don’t mind the haters on StackOverflow…here’s a super simple way to do it…use the android:onClick attribute for all of your buttons so they’d each look something like this in the layout XML (except with different tag/text):

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="checkSequence"
        android:tag="0"
        android:text="0"/>
    

    Then define this method and these fields in your Activity:

    private final String FIRST_DIGIT = "*";
    private final String SECOND_DIGIT = "1";
    private final String THIRD_DIGIT = "2";
    private final String FOURTH_DIGIT = "3";
    private int counter = 0;
    
    public void checkSequence(View button){
    
        String input = button.getTag().toString();
    
        switch (counter){
            case 0:
                if (input.equals(FIRST_DIGIT)){
                    counter++;
                }
                break;
            case 1:
                if (input.equals(SECOND_DIGIT)){
                    counter++;
                }else{
                    //reset the counter b/c they've screwed up the sequence
                    counter = 0;
                }
                break;
            case 2:
                if (input.equals(THIRD_DIGIT)){
                    counter++;
                }else{
                    counter = 0;
                }
                break;
            case 3:
                if (input.equals(FOURTH_DIGIT)){
                    //here you know that they've finished the sequence, so send the email
                    sendEmail();
                    counter = 0;
                }
                break;
        }
    }
    

    And then search StackOverflow/google for how to send an email using an Intent, and you’ll be able to write the sendEmail() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I'm interested in microtypography issues on the web. I want a tool to fix:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.