The method ParseAnalytics.trackAppOpened(getIntent()), generally used in the OnCreate has been replaced by the ParseAnalytics.trackAppOpenedInBackground(getIntent()). Already the method PushService.setDefaultPushCallback, used within the application class (extends Application) did not have a method to replace it, but rather an implementation of the class ParsePushBroadcastReceiver, as follows in the example below:
public class Receiver extends ParsePushBroadcastReceiver {
@Override
public void onPushOpen(Context context, Intent intent){
Log.e("Push", "Aberto");
Intent i = new Intent(context, MainActivity.class);
i.putExtras(intent.getExtras());
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
Create this class, remembering to replace MainActivity.class by the class you want to call when opening the notification.
Now, finally, the Ardroidmanifest:
Where was:
<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>
Now it gets:
<receiver
android:name="pacote.Receiver"
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>
This is the substitution of methods deprecated.