broakenmedia / multicontactpicker Goto Github PK
View Code? Open in Web Editor NEWLaunch a multi-select contact picker activity, useful for importing and inviting contacts to apps.
License: Apache License 2.0
Launch a multi-select contact picker activity, useful for importing and inviting contacts to apps.
License: Apache License 2.0
To be able to fully use your application, the following features are missing:
In my logs I see this line : I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
After investigation I think it's these two lines of codes :
activity_multi_contact_picker.xml line 22
activity_multi_contact_picker.xml line 23
Can you test with android instead of app ? But it's not in a hurry it's just an information (not an error) from logs 😉
By default, these action items turn out as blue (i.e. Azure). Can I change these colors to colorAccent of my project?
Also, how can I change the text from 'Finish' to something else (such as 'Done' etc.)?
Even With 3 Contacts (Emulator) It is taking a Long time to display them. (Activity Where one Selects Contacts)
Verified With Real Device Also.
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?
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)
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.
Having the contact ID of selected contacts is required in order to be able to retrieve more details on the selected contacts.
im seeing a previous activity or fragment underneath the contact selector, any ideas why?
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)
The RxContact is only loading the first email from the contact. It seems to be looping though all the phone numbers but not the emails.
I'm showing the selected contacts in a Recyclerview
. But when I select another set of contacts, it adds them to the previous ones. how can i remove the previously selected contacts when I select new ones?
Hi,
Is there a way to change the loading spinner color?
Thanks.
Is there a plan to support addresses?
.limitToColumn(LimitColumn.NONE) //Optional - default NONE (Include phone + email, limiting to one can improve loading time)
How can add both Email and Mobile No
This plugin still uses the old Android Support namespaces instead of Android X, please update.
I like to set maximum number of contacts can be selected from the given contact list , example 100.
How can i achieve this?
This feature request is about providing a set of contact ID's to the builder. This set contains already selected contacts that should not be shown in the picker, or that should be 'unselectable'.
How do I limit the selection of contact to a particular number?
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)
If "xyz" user have multiple number stored like home,work etc. it should be shows multiple number too.
Nice work by the library, but It would be very help full if add a option (may be optional) to Select/Un select All contacts.
Hi,
Thank you for sharing a great piece of work. Is it possible to initialize the picker with previously selected list of contacts, so that the existing list can be edited.
Thanks
If would be great if the ContactResult also contained address information in addition to phone numbers and email addresses.
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?
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)
How to use your MultiContactPickerActivity in manifest to add option like android:screenOrientation
onActivityResult() doesn't get called in fragment after selecting 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?
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);
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
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??
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.
If the contact name spans two lines on the view then the contact number is not shown below the contact name
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.
How can i populate the "results" selected contacts into listview, i have added the listview with the same activity as open picker button
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)
Usually I use this method overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
after startActivity()
or startActivityForResult()
, and overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
after finish()
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)
Could you support this please ?
Maybe add an option for that.
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)
I want to change the botton text to full-fill my work, can you provide, thanks a lot !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.