GithubHelp home page GithubHelp logo

broakenmedia / multicontactpicker Goto Github PK

View Code? Open in Web Editor NEW
143.0 143.0 53.0 217 KB

Launch a multi-select contact picker activity, useful for importing and inviting contacts to apps.

License: Apache License 2.0

Java 100.00%

multicontactpicker's People

Contributors

atholbro avatar broakenmedia avatar roni-castro avatar sebwoz avatar

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

multicontactpicker's Issues

Please add the following features

To be able to fully use your application, the following features are missing:

  1. I would like to be able to change the text on the buttons. My project is localized in many languages ​​and without this opportunity it is impossible to use your add-on.
  2. I would like to be able to change the color of texts and backgrounds. So I can completely customize the interface for yourself. In particular, I need to replace the color of the buttons and the background under the buttons. It would be ideal to be able to load a custom template.
  3. I would like to be able to limit the number of selectable contacts.
  4. Add support for AndroidX.

Loading - Too Much Wait Time

Even With 3 Contacts (Emulator) It is taking a Long time to display them. (Activity Where one Selects Contacts)
Verified With Real Device Also.

Feature request : Allow only contacts with phone numbers, email or both.

Also, Asynchronously loading the contacts is not letting us select them until all of them are loaded...and with 3000+ contacts in some lists, this is practically unusable for a good 5-10 seconds till the load is complete. Any plans to add a progress dialog/bar and prevent user interaction until the load is complete?

Force close on android oreo

FATAL EXCEPTION: main Process: com.sajorahasan.eventify, PID: 19170 java.lang.NoSuchFieldError: No static field action_search of type I in class Lcom/wafflecopter/multicontactpicker/R$id; or its superclasses (declaration of 'com.wafflecopter.multicontactpicker.R$id' appears in /data/app/com.sajorahasan.eventify-zvpFl1zeiv66euaVibwe5Q==/split_lib_slice_8_apk.apk) at com.wafflecopter.multicontactpicker.MultiContactPickerActivity.onCreateOptionsMenu(MultiContactPickerActivity.java:166)

Disable "Select All"

Hello I was wondering if there is any way to disable "Select All" option in the MultiContactPicker. I could not find a way to do so. If there is a way, can you please show me how to do that.

Fatal Erro when pick +7 contacts

FATAL EXCEPTION: main Process: br.com.apppacke, PID: 22203 java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.wafflecopter.multicontactpicker.ContactResult) at android.os.Parcel.writeSerializable(Parcel.java:1527) at android.os.Parcel.writeValue(Parcel.java:1475) at android.os.Parcel.writeList(Parcel.java:812) at android.os.Parcel.writeValue(Parcel.java:1424) at android.os.Parcel.writeArrayMapInternal(Parcel.java:724) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1417) at android.os.Bundle.writeToParcel(Bundle.java:1157) at android.os.Parcel.writeBundle(Parcel.java:764) at android.content.Intent.writeToParcel(Intent.java:8703) at android.app.ActivityManagerProxy.finishActivity(ActivityManagerNative.java:3398) at android.app.Activity.finish(Activity.java:5212) at android.app.Activity.finish(Activity.java:5230) at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$2.onClick(MultiContactPickerActivity.java:79) at android.view.View.performClick(View.java:5637) at android.view.View$PerformClick.run(View.java:22433) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6186) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) Caused by: java.io.NotSerializableException: android.net.Uri$StringUri at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1224) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1584) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1549) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1472) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1218) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346) at android.os.Parcel.writeSerializable(Parcel.java:1522) at android.os.Parcel.writeValue(Parcel.java:1475)  at android.os.Parcel.writeList(Parcel.java:812)  at android.os.Parcel.writeValue(Parcel.java:1424)  at android.os.Parcel.writeArrayMapInternal(Parcel.java:724)  at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1417)  at android.os.Bundle.writeToParcel(Bundle.java:1157)  at android.os.Parcel.writeBundle(Parcel.java:764)  at android.content.Intent.writeToParcel(Intent.java:8703)  at android.app.ActivityManagerProxy.finishActivity(ActivityManagerNative.java:3398)  at android.app.Activity.finish(Activity.java:5212)  at android.app.Activity.finish(Activity.java:5230)  at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$2.onClick(MultiContactPickerActivity.java:79)  at android.view.View.performClick(View.java:5637)  at android.view.View$PerformClick.run(View.java:22433)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6186)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Can't see any contact.

When I click the button for multiple contact select task, it shows the "Select Contacts" activity empty. I have several contacts in my address book and everything works perfect if I use the contact selector by Android.

Here is the screenshot of the empty contact list
image

limitToColumn

.limitToColumn(LimitColumn.NONE) //Optional - default NONE (Include phone + email, limiting to one can improve loading time)

How can add both Email and Mobile No

Migration to AndroidX

This plugin still uses the old Android Support namespaces instead of Android X, please update.

java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference

Device
Brand: samsung
Model: Galaxy J6 +
Orientation: Vertical
Available RAM: 1.47 GB
Free disk space: 3.28 GB
Operating system
Version: 8.1.0
Orientation: Vertical
With administrator access: No
Abnormal shutdown
Date: April 17, 2019, 22:38:00

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at com.wafflecopter.multicontactpicker.MultiContactPickerAdapter.getItemPosition(MultiContactPickerAdapter.java:140)
at com.wafflecopter.multicontactpicker.MultiContactPickerAdapter.setContactSelected(MultiContactPickerAdapter.java:134)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$4.onNext(MultiContactPickerActivity.java:220)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$4.onNext(MultiContactPickerActivity.java:211)
at io.reactivex.internal.operators.observable.ObservableFilter$FilterObserver.onNext(ObservableFilter.java:52)
at io.reactivex.internal.observers.DisposableLambdaObserver.onNext(DisposableLambdaObserver.java:58)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

Feature Request: Addresses

If would be great if the ContactResult also contained address information in addition to phone numbers and email addresses.

Function of Searching

I admire your good job!
Just give you an advice after I used it.
My phone have hundreds of contacts, and it is a little hard for me to find the target.
So can you add the funciton of Searching?

Dos not work with 'com.android.support:appcompat-v7:26.+'

this is the error

10-24 07:57:14.809 710-710/app.craze.screenshop E/AndroidRuntime: FATAL EXCEPTION: main
Process: app.craze.screenshop, PID: 710
java.lang.NoSuchFieldError: No static field mcp_action_search of type I in class Lcom/wafflecopter/multicontactpicker/R$id; or its superclasses (declaration of 'com.wafflecopter.multicontactpicker.R$id' appears in /data/app/app.craze.screenshop-2/split_lib_slice_5_apk.apk)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity.onCreateOptionsMenu(MultiContactPickerActivity.java:166)
at android.app.Activity.onCreatePanelMenu(Activity.java:2823)
at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:320)
at android.support.v7.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:95)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.onCreatePanelMenu(AppCompatDelegateImplBase.java:333)
at android.support.v7.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:95)
at android.support.v7.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:454)
at android.support.v7.app.ToolbarActionBar$1.run(ToolbarActionBar.java:61)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

show all selected contacts

Hi,
Thanks for this library Saved my time.

But,
I am new to android.
Can you help me out to show the selected contacts list with comma separated as Toast message?

Contacts not showing on Huawey P10 lite

MultiContactPicker works really fine on each device I've tried, but on the Huawei P10 lite, with android N it doesn't works.

The Dialog shows up but no contact is showing.

Here's my code:

new MultiContactPicker.Builder(getActivity()) .hideScrollbar(false) .showTrack(false) .handleColor(ContextCompat.getColor(getActivity(), R.color.colorAccent)) .bubbleColor(ContextCompat.getColor(getActivity(), R.color.colorPrimary)) .textColor(Color.WHITE) .showPickerForResult(CONTACT_PICKER_CLIENTI);

Contacts loading too slow

Good morning @broakenmedia , I have the latest version of the library and when I press to load the contacts, I have about 1000 contacts, it takes about 10 seconds to load. During that time I am not allowed to select any contacts. Is there a way to fix that?

Thanks

Loading time

Is there a way to start loading contacts and not wait till you get them all i have 500 contacts it is taking over 10 sec to load??

Selected contacts on the top

It's a great Library. But In my project there is a requirement to show the selected contacts that's why I am using the setSelectedContacts and I want to show the selected contacts on the top of my list. How can I do that. Is there any way I can put the selected contacts on the top of unselected ones.

Does not work when used for a fragment

When the MultiContactPicker Builder is being initialized using the fragment constructor, the this.acc variable will never be set, the code in showPickerForResult will therefore never be called (see below).

public void showPickerForResult(int requestCode) {
            if (acc == null) {
                return;
            }

Next to the above, I would propose to make use of android.support.v4.app.Fragment instead of 'normal' Fragments.

Caused by java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1

Brand: samsung
Model: Galaxy S6
Orientation: Vertical
Available RAM: 759.2 MB
Free disk space: 1.48 GB
Operating system
Version: 7.0
Orientation: Vertical
With administrator access: No
Abnormal shutdown
Date: April 17, 2019, 8:28 pm

Caused by java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at java.util.ArrayList.get(ArrayList.java:413)
at com.wafflecopter.multicontactpicker.MultiContactPickerAdapter.setContactSelected(MultiContactPickerAdapter.java:135)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$4.onNext(MultiContactPickerActivity.java:220)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity$4.onNext(MultiContactPickerActivity.java:211)
at io.reactivex.internal.operators.observable.ObservableFilter$FilterObserver.onNext(ObservableFilter.java:52)
at io.reactivex.internal.observers.DisposableLambdaObserver.onNext(DisposableLambdaObserver.java:58)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

java.lang.RuntimeException: on Android 4.1, Api 16

04-18 01:22:13.881 3063-3063/com.cuiet.blockCalls E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity /com.wafflecopter.multicontactpicker.MultiContactPickerActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:555)
at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:466)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.wafflecopter.multicontactpicker.MultiContactPickerActivity.onCreate(MultiContactPickerActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 
at android.app.ActivityThread.access$600(ActivityThread.java:130) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4745) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
at dalvik.system.NativeStart.main(Native Method) 

Crash

Just add a null check please

Fatal Exception: java.lang.NullPointerException
Attempt to invoke interface method 'boolean android.database.Cursor.moveToFirst()' on a null object reference
keyboard_arrow_up
arrow_right
com.onegravity.contactpicker.core.ContactPickerActivity.readContacts (ContactPickerActivity.java:603)
com.onegravity.contactpicker.core.ContactPickerActivity.onLoadFinished (ContactPickerActivity.java:551)
com.onegravity.contactpicker.core.ContactPickerActivity.onLoadFinished (ContactPickerActivity.java:69)
android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished (LoaderManager.java:476)
android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete (LoaderManager.java:444)
android.support.v4.content.Loader.deliverResult (Loader.java:126)
android.support.v4.content.CursorLoader.deliverResult (CursorLoader.java:105)
android.support.v4.content.CursorLoader.deliverResult (CursorLoader.java:37)
android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete (AsyncTaskLoader.java:255)
android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute (AsyncTaskLoader.java:80)
android.support.v4.content.ModernAsyncTask.finish (ModernAsyncTask.java:487)
android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage (ModernAsyncTask.java:504)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:210)
android.app.ActivityThread.main (ActivityThread.java:5833)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1113)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:879)

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.