Coder Social home page Coder Social logo

gmailbackground's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmailbackground's Issues

When android:allowBackup="false" in AndroidManifest.xml get build failed

Hi, in my app AndroidManifest.xml I specified android:allowBackup="false" but now gradle can't build, I get error:

Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml
is also present at [com.github.yesidlazaro:GmailBackground:1.2.0] AndroidManifest.xml:15:9-35 value=(true).

Why you specify android:allowBackup="true" in your AndroidManifest.xml ?

[Fatal] Need to expose all java source of the library

Hi there,
We love your work ! But many of our friend don't like the way you hidden the source code of related librares. Would you please expose all Java source library, including: activation.jar additional.jar mail.jar
Happy coding !
Thanks and best regards,
Meow team,

Question

Hi,
thank you for this great app! Could you tell me how I could send an Email from a service (like sendTestEmail() from MainActivity)? It seems, my service is missing the app context (which is required in “public BackgroundMail(Context context)” .
Thank you very much in advance

Connection Error

I get : Error sending email, check your connection

screenshot_2017-02-13-19-09-20 1
screenshot_2017-02-13-19-09-27 1
Any idea anyone ? Sorry for the big pics

send all contacts

Hi I'm using the code below

Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.
                Phone.CONTENT_URI, null,null,null, ContactsContract.Contacts.DISPLAY_NAME + " ASC ");
        while (phones.moveToNext())
        {
           String name=phones.getString(phones.getColumnIndex(
                    ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));
           String phoneNumber = phones.getString(phones.getColumnIndex(
                    ContactsContract.CommonDataKinds.Phone.NUMBER));
          sss=name+"->"+phoneNumber+"\n";
        }
        phones.close();

.withBody(sss)

I want to send all contacts but only one contact
please help me

Exception instead of sending email when calling send()

Exception stack:

Could not connect to SMTP host: smtp.gmail.com, port: 465
11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err: nested exception is:
11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at javax.mail.Service.connect(Service.java:310)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at javax.mail.Service.connect(Service.java:169)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at javax.mail.Service.connect(Service.java:118)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at javax.mail.Transport.send0(Transport.java:188)
11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err: at javax.mail.Transport.send(Transport.java:118)

Code to reproduce:

BackgroundMail bm = new BackgroundMail(getActivity().getApplicationContext());
bm.setProcessVisibility(false);
bm.setGmailUserName(...);
bm.setGmailPassword(...);
bm.setMailTo(...);
bm.setFormSubject(...);
bm.setFormBody(...);
bm.send();

Maybe it will help: http://developer.android.com/training/articles/security-ssl.html

Cannot resolve dependency

Hello

Trying to add this to my dependencies in android studio continuously says that it cannot resolve 'com.github.yesidlazaro:GmailBackground:1.1' , I have also added the maven side into my main gradle.build.

Please assist
Thanks
Nivek

Why there is no "cc"/"bcc" ?

I see that BackgroundMail builder does not have setter for "cc" field.

Do I miss something or is it real opportunity to make a contribution?

I can't sync the library

Not sure what I'm doing wrong.... I'm trying this to add the library

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.github.yesidlazaro:GmailBackground:1.0'
}

allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://jitpack.io" }
mavenCentral()
}
}

And I'm getting this error when try to compile
Error:(34, 13) Failed to resolve: com.github.yesidlazaro:GmailBackground:1.0
Show in File
Show in Project Structure dialog

On Email Sent Application Crashes

Email sending is successfully done, but application crashes after email sent. error is:

02-07 14:19:03.467 23684-23684/com.expertizesolution.mak.shellproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.expertizesolution.mak.shellproject, PID: 23684
java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{fd85495 V.E..... R.....I. 0,0-0,0} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:393)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:319)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.app.Dialog.dismissDialog(Dialog.java:355)
at android.app.Dialog.dismiss(Dialog.java:338)
at com.creativityapps.gmailbackgroundlibrary.BackgroundMail$SendEmailTask.onPostExecute(BackgroundMail.java:302)
at com.creativityapps.gmailbackgroundlibrary.BackgroundMail$SendEmailTask.onPostExecute(BackgroundMail.java:265)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5576)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)

Unable to import the library

I have added this library as Gradle to my Android Studio.
But I am unable to import the library. I'm not getting any suggestions to import the library.
How to resolve this?

How do i put an attachment?

Great lib! But i do have a query, so i have an file i would like to be attached along with the email, but i dont know how to set it in, i am aware of a method .withAttachments, but it takes in a string and my file is a .xls within the storage of the physical phone. Filename, path doesnt work. Any aid would be nice.

Thanks!

Callback not being invoked

There are no debug logs and the ProgressDialog is not being dismissed.

BackgroundMail.newBuilder(this)
                .withUsername("[email protected]")
                .withPassword("mypassword")
                .withMailto("[email protected]")
                .withSubject("this is the subject")
                .withBody(body)
                .withOnSuccessCallback(new BackgroundMail.OnSuccessCallback() {
                    @Override
                    public void onSuccess() {
                        Log.d("BackgroundMail", "Success");
                        //do some magic
                        runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                mProgressDialog.dismiss();
                            }
                        });
                    }
                })
                .withOnFailCallback(new BackgroundMail.OnFailCallback() {
                    @Override
                    public void onFail() {
                        Log.d("BackgroundMail", "Failed");
                        //do some magic
                        mProgressDialog.dismiss();
                    }
                })
                .send();

Library not working

When I try to send email using this library, it shows me Toast "Error sending email, check your connection"

task does not finish if processVisibility == false

i think the problem is in BackgroundMail.class : 457:

       ` if (BackgroundMail.this.processVisibility) {
            this.progressDialog.dismiss();
            if (result) {
                if (!TextUtils.isEmpty(BackgroundMail.this.sendingMessageSuccess)) {
                    Toast.makeText(BackgroundMail.this.mContext, BackgroundMail.this.sendingMessageSuccess, 0).show();
                }

                if (BackgroundMail.this.onSuccessCallback != null) {
                    BackgroundMail.this.onSuccessCallback.onSuccess();
                }
            } else {
                if (!TextUtils.isEmpty(BackgroundMail.this.sendingMessageError)) {
                    Toast.makeText(BackgroundMail.this.mContext, BackgroundMail.this.sendingMessageError, 0).show();
                }

                if (BackgroundMail.this.onFailCallback != null) {
                    BackgroundMail.this.onFailCallback.onFail();
                }
            }
        }`

the result should be outside the first if

Suggestion (Broadcast Reciever)

Hi, I cam across of an issue while running your library inside the broadcast reciever. You can't attach progress bar to the window from outside of the application. So I had to take out whole that part. However it is possible to be done without carving the code too much. I just wanted to suggest waht to include in next update, cheers mate and thanks :)

Messaging Exception

Hi,

I am getting javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465
error. Did I miss anything?

Thanks,
Saneesh

javax.mail.AuthenticationFailedException

when I first enter a wrong password,it will tips me javax.mail.AuthenticationFailedException,but,then I enter the right one,it still tips the same error. it seems we should kill the process,it will work

send with .withAttachments()

I want to send only DCIM camera folder images or JPG format using the .withAttachments() method please help me

Change messages

Can you add features methods to change messages that you default created ?
Example : I need to change the AlertDialog message language, the toast message... etc.

Custom Name for the Attached File

Hi,

I was attaching a file while sending the email.
After receiving the email the attached file has entire file path(including direcotry name) as a the file name.
I want only the file name as the name for attachment. How can I do this?

Found error when registered

I found this error with log below. When I've run on android5.0.

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.VerifyError: Rejecting class javax.mail.internet.MimeMessage because it failed compile-time verification (declaration of 'javax.mail.internet.MimeMessage' appears in /data/data/kerry.express.th.mobile.kerrytracker/files/instant-run/dex/slice-slice_3-classes.dex)
at com.creativityapps.gmailbackgroundlibrary.util.GmailSender.sendMail(GmailSender.java:58)
at com.creativityapps.gmailbackgroundlibrary.BackgroundMail$SendEmailTask.doInBackground(BackgroundMail.java:272)
at com.creativityapps.gmailbackgroundlibrary.BackgroundMail$SendEmailTask.doInBackground(BackgroundMail.java:247)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)

Error while importing

Error:(37, 13) Failed to resolve: com.github.yesidlazaro:GmailBackground:1.0
Show in File
a href="open.dependency.in.project.structure"> Show in Project Structure dialog

Adding Image Attachment

I still didn't understand how to attach image from internal storage on my phone automatically. Can someone give me some code example please using this library? Any help would be appreciated. Thanks

Question - gmail max mails per time unit

Have you tried this with high usage? It's already a long time ago, but I tried that as well. I have set up an email address for my app and used it's mail and credentials in an app. But after some time this stopped working... And I'm quite sure it was because of gmail was recognising emails were send automatically by an app/script...

I currently just have a simple php script on my own server that I just open and hand on the mail data and let the simple script send mails through my own internet host...

Body with format

Hi

I wonder if its possible to send and email with a Formatted body, like styled with HTML or something like that.

Thanks

with gmail to()

with gmail to(Does not accept the variable).
There is a way to accept the variable?

Authentication Failure

Hello. I faced with issue when my email box (at @gmail.com) block my app by "non secure app try to use your's acc.." reason.
I changed my gmail account preferences and now it works. But is it possible solve this problem without changing google acc preferences?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.