My problem is, that I need to send an E-Mail with an attatchment. The problem doesn't lay here. The problem is, that when I click the button to send the email I want a dialoge box that tells the user, that the Email is sending/loading.
I saw examples with functions that run in the background. I tried that, but I'm a newbie in Java. If you have some examples or solutions for me I would appreciate that.
Related
I am trying to make a "Contact us" page where I am taking user comments/ Suggestions along with their name and email and want to send them to my gmail account. I don't want intents. I have read the documentation on Java API but they are sending a hard coded message "Hello World"
I don't want that. And I have no idea how to achieve the task I am trying to do. Any guidance and help would be appreciated.
Update: I have tried the tutorial http://www.edumobile.org/android/send-email-on-button-click-without-email-chooser/ which sends the automated email on button click. I dont want the hard coded message. I have made the layout and want to send the message entered by the user along with the email, name and phone number to my gmail account. I am new to android so I don't know how this will be achieved. I will appreciate any kind of suggestions and help
Contact us layout
Please refer this link http://www.edumobile.org/android/send-email-on-button-click-without-email-chooser/ again.
They are not sending only hard coded message but as an example they have taken TextView with 'Hello World' , you can use any controls that you want like EditText and when user will enter those details then get the values from EditText and do the concatenation of those values and make one string,store in a variable and use that string to send in a email as body.
You just have to change the value in below line in SendMail AsyncTask class' doInBackground method
m.setBody($body_variable);
I hope this will help you , Feel free to comment.
I have ShareActionProvider in my Application. it shares a photo I uploaded with a text I insert. When share is done, I want to show a popup message/dialog with a button OK, clicking on which I should return to my application. The question is: in my application how can I know if share is complete or no ? For example, if I share the photo and text in instagram, how can I know that post is already done.
in my application how can I know if share is complete or no ? For example, if I share the photo and text in instagram, how can I know that post is already done.
That is not possible for ACTION_SEND. What the user does with the shared content in the other app is between the user and the developers of the other app. The user might do something immediately, later, or never. The app might do something immediately or later (e.g., upload the content as part of a periodic sync operation with a server). There is no protocol for the receiving app to tell you that sharing is "done".
Specific apps may offer specific APIs, beyond ACTION_SEND, that offer capabilities in this area, but those will be unique to those apps.
Use a Toast like this: Toast.make(context "Uploaded", Toast.LENGTH_SHORT).show();
Toast is just tiny little "popup"
I have an android app, which lets people share content from other apps to it. When it receives the shared data, it looks for the URL in the shared text and fetches the page and does processing on the data fetched. This is designed with specific purpose and not a generic for all apps.
It works fine, except that people have to click the share icon and then choose our app name. With accessibility we can reduce this work for the users. We are able to get the text displayed in the app.
Is it possible to get the content which we would get if we were to click the share button.
Or
Is it possible to trigger the share button and choose our app without disturbing the user in anyway
You could try that if it's only for 1 specific app. See question How to click button in settings using AccessibilityService? which clicks a button. This will not scale if you want to do this for more apps. You could however parse the text that is on the screen and look for http links and process them in a background service and then show a floating button like Link Bubble Browser
You can simply trigger the share activity of your app when you detect the text from the other app; but the question is how will you know when user is done typing the text?!
One way is you can place a system-wide floating button similar to Facebook Messenger and after user clicks it, the text can be shared. This will reduce number of clicks user has to do.
So,
1) Yes, its possible to get text content via AccessibilityService.
2) No, you cannot automate this action.
I have a small problem. I want to somehowe invoke a button in a webpage from an android application and send some information to this page. This is the part of the webpage I want to interact with.
In this form you write your name, e-mail and a comment. By clicking the button "Изпрати коментар" (which means "Send your comment") you can post a comment in the webpage. So I want to make the same functionallity, but from an android application (to write comments into the webpage).
Does someone of you have any idea how can this be accomplish?
Thank you in advance!
I gave up the task of sending a background email...i've tried a lot of things but none of them seems to work.
I'm working for my dad's delivery restaurant. My app is supposed to send an email to our servers containing the order of the user.
I tried to send an email after pressing a button (without the gmail interface), directly from my activity. I wasn't able to achieve this, so i would like to ask you any other way to do something like this.
If there's no way, i'm thinking about using the default gmail interface. In this case i'd like to know if there's any option to avoid the user being able to modify the email content, adress and subject, just look it, and press send button.
Thank you.