Parse.com - Push Notifications configuration problems in Android - android

I am trying to setup Parse.com push notifications as per the documentation:
My manifest xml has following related entries:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hello.world"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
....
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- NOTE THIS NEXT LINE -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.hello.world.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.hello.world.permission.C2D_MESSAGE" />
....
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.hello.world" />
</intent-filter>
</receiver>
</application>
After adding the parse.com push related configurations in manifest as above - The application has stopped working - it simply hangs on startup, i do not see the first screen.
EDIT 1
After debugging i found that application hangs here when it tries to make the first call to Parse:
ParseQuery<ParseObject> query = ParseQuery.getQuery("myclass");
List<ParseObject> myclassresult = query.find();//App Hangs at THIS line
Why would this happen only when Parse.com push configurations are added?
This line and App works fine without Parse.com push configs
(Also note that i have not done any specific configuration at Parse.com for the application to enable Push, and i am using the normal Parse.com sdk, not any special sdk for push notifications)
EDIT 2
When i look at the relevant Threads (AsyncTask#1) Stack Trace i see the following:
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:364)
at bolts.Task.waitForCompletion(Task.java:119)
at com.parse.Parse.waitForTask(Parse.java:721)
at com.parse.ParseUser.getCurrentUser(ParseUser.java:1044)
at com.parse.ParseQuery.getUser(ParseQuery.java:298)
at com.parse.ParseQuery.findInBackground(ParseQuery.java:892)
at com.parse.ParseQuery.find(ParseQuery.java:529)
at com.hello.world.MyQueryClass.getDataFromParse(MyQueryClass.java:..)
...

The solution was to uninstall and then install the application again.
Just re-installing on top of existing application was not working - and instead causing the odd behavior!
If anyone knows the reason for this - please post a comment.

Related

Check if GcmReceiver works

I have some problems with my Android application when my test smartphone cleans cache: my app does not receive any messages any more (more details here).
At the beginning I thought that my gcm listener service is also cleared with memory but in fact the problem can be deeper: the GcmReceiver (which should receive a message and give it further to MyListenerService) could be cleaned from RAM (see one of the comments here)
How can I check if my GcmReceiver still works. What can I do to support it?
Can I set it to run in foreground or to be always activated?
Traditionally: my manifest about GCM (MyGcmLister.class extends GcmListenerService.class)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.app.path" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- ... other permissions -->
<permission
android:name="my.app.path.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="my.app.path.permission.C2D_MESSAGE" />
<application
...>
<!-- ... activites... -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="my.app.path" />
</intent-filter>
</receiver>
<service
android:name=".MyGcmListener"
android:exported="false"
android:enabled="true" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
</application>
</manifest>

OUTDATED DEVICE: Parse Push Notification to Android devices

Hi have worked with parse for saving data. But notification is something i am stuck with. I am not able figure out what's going wrong.
I have done all the receiver registrations and so my device also gets registered in the installation table but while sending push from web console it says "push sent 0" looking into the description of each push it shows that "OUTDATED DEVICE - The records on this installation are outdated, the user might have uninstalled the app." But I just did the registration.
I am going mad with this...no clue in what am I doing wrong, I am using eclipse IDE, Can anyone please suggest me any Solution??
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.parsecomlogin"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.example.parsecomlogin.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.parsecomlogin.permission.C2D_MESSAGE" />
<permission
android:name="com.example.parsecomlogin.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.parsecomlogin.permission.MAPS_RECEIVE" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />
<application
android:name=".ParseApp"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Added for Parse push notifications -->
<!-- My custom receiver -->
<receiver
android:name=".ParseReceiver"
android:enabled="true"
android:exported="false" >
<intent-filter>
<action android:name="com.example.parsecomlogin.RECEIVE_PUSH" />
</intent-filter>
</receiver>
<!-- END my custom receiver -->
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.parsecomlogin" />
</intent-filter>
</receiver>
<activity
android:name=".Welcome"
android:label="#string/title_activity_welcome" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_login" >
</activity>
<activity
android:name=".LoginSignupActivity"
android:label="#string/title_activity_login_signup" >
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDZ5TG28QJnN5zMyIdezPllvrfrwg7ElQs" />
</application>
</manifest>
I faced exactly the same problem and I fixed it a few minutes ago by coincidence. I hope the problem can be solved with the same touch-up for you as well.
In my situation, I used one of the older projects I worked and I have changed manifest package name manually in a way. In AndroidManifest.xml file, the manifest package name was changed to "com.myprojectname". There was no problem and app can run without any error with this package name. Also, all of Parse features run problem-free except push notification service. Then I checked other paths with Ctrl + Shift + R and searched whether R.java uses the same name. Unsurprisingly, the package name was identical in this file but I realized that in the lines below R.java uses the pattern of "net.myprojectname.app" instead of "com.myprojectname". I replaced "com.myprojectname" with "net.myprojectname.app" in all files by using Ctrl + Shift + R again. I think it was not the cause of the problem but I tried to send a last push notification desperately. It is hard to believe but it is worked. I got the notification successfully after all.
I answered the question in a highly informal and non-technical way but I have no idea about the underlying cause, I just want to help. Maybe it works for you. Good luck.

Parse GCM push notifications not working on Android 6.0 Marshmallow Developer Preview 3

I have registered the necessary permissions, services, and broadcast receivers in my AndroidManifest.xml and I have Parse push notifications working on pre Android M devices. I am getting an error (posted below) in the Android 6.0 Marshmallow Developer Preview 3 running on my Nexus 5. The user is successfully registering and I can view it in the Parse dashboard on Parse.com, but the pushType and deviceLastTokenModified are undefined. I can't help but think this is an issue with the Parse SDK considering this is working fine on Pre Android M devices. It could be an issue with Android M's permission changes, except none of the permissions I am requesting fall under the category that ask the user to grant it.
Here is the error::
08-30 19:29:19.671 11848-11848/com.example.app V/com.parse.ManifestInfo﹕ Cannot use GCM for push because the app manifest is missing some required declarations. Please make sure that these permissions are declared as children of the root <manifest> element:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.richardlucasapps.eaglescribe.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.richardlucasapps.eaglescribe.permission.C2D_MESSAGE" />
Also, please make sure that these services and broadcast receivers are declared as children of the <application> element:
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.richardlucasapps.eaglescribe" />
</intent-filter>
</receiver>
08-30 19:29:19.671 11848-11848/com.example.app V/com.parse.ManifestInfo﹕ Using none for push.
Here is how I am initializing Parse and setting it up for push notifications:
public class MyApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);
Parse.initialize(this, applicationId, clientId);
ParseUser.enableAutomaticUser();
ParseUser.getCurrentUser().increment("RunCount");
ParseUser.getCurrentUser().saveInBackground();
ParseInstallation parseInstallation = ParseInstallation.getCurrentInstallation();
parseInstallation.put("user", ParseUser.getCurrentUser());
parseInstallation.saveInBackground()
}
}
Here is a condensed version of my AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.app” >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission
android:name="com.example.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.app.permission.C2D_MESSAGE" />
<application
android:name=".global.MyApplication">
<!-- For Parse Notification Push Service -->
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.app” />
</intent-filter>
</receiver>
</application>
Update the Parse library you are using in your project. I was using 1.9.4 and updated to Parse 1.10.1 and now my Android Marshmallow device is successfully registering for and receiving push notifications.
Grab the most up to date Parse library here.

Not receiving any Parse Push whatsoever

I've followed every step outlined on Parse.com. I was first attempting to use a custom BroadcastReceiver (subclassing ParsePushBroadcastReceiver), but even without so, Parse Push doesn't seem to work. Here is a look at my AndroidManifest.xml (snippet just before closing <application> tag):
<!-- For Parse Push -->
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="my.package.name" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
...and right before I open the <application> tag:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
android:name="my.package.name.permission.C2D_MESSAGE" />
<uses-permission android:name="my.package.name.permission.C2D_MESSAGE" />
I have tried pushing in all sorts of combinations, but absolutely no push seems to be going through.
All help greatly appreciated! :-)
Well I'll be arsed! Here's how I got it to work. First off, I switched to using the code in the Parse Push QuickStart guide for Android instead of an outdated tutorial by Parse. At the end of 4 wasted hours, I now see that an essential WAKE_LOCK permission is left out of the tutorial (Ikr?). (Presumably) More importantly, here's the change that seems to fix it, cerebral assassin as it may be - in your Application class:
public void onCreate() {
Parse.enableLocalDatastore(getApplicationContext());
Parse.initialize(this, "fo00", "b4r");
ParseFacebookUtils.initialize(this);
ParseInstallation.getCurrentInstallation().saveInBackground();
super.onCreate(); // Moved this from right at the top, to right at the bottom
}

Registering a content provider

I have been trying to create a copy of Android's ContactsProvider. I wanted to make minimal changes to the provider as most of my work will be in another app which will use the data. However, I want to ensure the real contacts are not accessible to the app I am making so I planned to create a copy of the provider. After successfully navigating though the process of creating a copy provider with a different authority, I tried to call my copied provider. At this point I got two errors.
The first one was in my own app where I got the error "Failed to find provider info for 'ContentProvider'" I read this answer for that but I had taken care of everything mentioned here already.
The second error happens in my provider: java.lang.NoClassDefFoundError: com.google.common.collect.ImmutableSet$Builder This is probably the reason why I am getting the first error. Because my provider is never able to access the classes that are internal to Android, it is not getting registered as a valid provider and thus my app is not able to "find" the provider.
Here is my Manifest file for the ContactManager:-
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.prajitdas.contactmanager"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.prajitdas.contactmanager.ContactManager"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="ContactAdder" android:label="#string/addContactTitle">
</activity>
</application>
</manifest>
and the manifest file for the ContactsProvider:-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.prajitdas.android.providers.contacts"
android:versionCode="2"
android:versionName="2.0">
<permission
android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL"
android:label="#string/read_write_all_voicemail_label"
android:description="#string/read_write_all_voicemail_description"
android:permissionGroup="android.permission-group.PERSONAL_INFO"
android:protectionLevel="system|signature"
/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BIND_DIRECTORY_SEARCH" />
<uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
<uses-permission android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL" />
<application android:process="android.process.acore"
android:label="#string/app_label"
android:icon="#drawable/app_icon"
android:allowBackup="true">
<!-- Modified provider authority -->
<provider android:name="ContactsProvider2"
android:authorities="fakecontacts;com.prajitdas.android.providers.contacts"
android:label="#string/provider_label"
android:multiprocess="false"
android:exported="true"
android:readPermission="android.permission.READ_CONTACTS"
android:writePermission="android.permission.WRITE_CONTACTS">
<path-permission
android:pathPrefix="/search_suggest_query"
android:readPermission="android.permission.GLOBAL_SEARCH" />
<path-permission
android:pathPrefix="/search_suggest_shortcut"
android:readPermission="android.permission.GLOBAL_SEARCH" />
<path-permission
android:pathPattern="/contacts/.*/photo"
android:readPermission="android.permission.GLOBAL_SEARCH" />
<grant-uri-permission android:pathPattern=".*" />
</provider>
<provider android:name="CallLogProvider"
android:authorities="fakecall_log"
android:syncable="false" android:multiprocess="false"
android:exported="true"
android:readPermission="android.permission.READ_CALL_LOG"
android:writePermission="android.permission.WRITE_CALL_LOG">
</provider>
<provider android:name="VoicemailContentProvider"
android:authorities="com.prajitdas.android.voicemail"
android:syncable="false" android:multiprocess="false"
android:exported="true"
android:permission="com.android.voicemail.permission.ADD_VOICEMAIL">
</provider>
<!-- Handles database upgrades after OTAs, then disables itself -->
<receiver android:name="ContactsUpgradeReceiver">
<!-- This broadcast is sent after the core system has finished
booting, before the home app is launched or BOOT_COMPLETED
is sent. -->
<intent-filter>
<action android:name="android.intent.action.PRE_BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<receiver android:name="PackageIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<receiver android:name="LocaleChangeReceiver">
<intent-filter>
<action android:name="android.intent.action.LOCALE_CHANGED"/>
</intent-filter>
</receiver>
<service android:name="VoicemailCleanupService"/>
<activity android:name=".debug.ContactsDumpActivity"
android:label="#string/debug_dump_title"
android:theme="#android:style/Theme.Holo.Dialog"
>
<intent-filter>
<action android:name="com.prajitdas.android.providers.contacts.DUMP_DATABASE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<provider android:name=".debug.DumpFileProvider"
android:authorities="com.prajitdas.android.providers.contacts.dumpfile"
android:exported="true">
</provider>
</application>
</manifest>
As you can see, I have basically copied the original manifest files and modified it to the new authorities for my provider. I have done the same for the java code, but it is too big to post here. If anyone can help me identify the steps to either make the android internal calls work or maybe resolve the first problem of "registering" the provider on a phone somehow, it would be much appreciated.
com.google.common.collect.ImmutableSet$Builder isn't actually an internal Android class. It is a part of the Google's Guava library. You need to add Guava's JAR as a dependency to your project to compile it (and, probably, some others dependencies, check the list for the ContactsProvider in its Android.mk).
The actual way of adding JAR dependency varies depending on what do you use for building your app (e.g. Ant, Maven, Gradle, or Eclipse).

Categories

Resources