I am trying to Compose tweets using Twitter kit for Android from here and I am facing issues in receiving broadcasts in Intent.
Below is my code for it
For sending Tweets
TweetComposer.Builder builder = new TweetComposer.Builder(getContext())
.text(“Sample text”);
builder.show();
For receiving broadcasts
public class MyResultReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (TweetUploadService.UPLOAD_SUCCESS.equals(intent.getAction())) {
// success
final Long tweetId = intentExtras.getLong(TweetUploadService.EXTRA_TWEET_ID);
} else if (TweetUploadService.UPLOAD_FAILURE.equals(intent.getAction())) {
// failure
final Intent retryIntent = intentExtras.getParcelable(TweetUploadService.EXTRA_RETRY_INTENT);
} else if (TweetUploadService.TWEET_COMPOSE_CANCEL.equals(intent.getAction())) {
// cancel
}
}
}
Added BroadcastReceiver to the application manifest.
But I am not able to receive BroadcastReceiver.
Is there any sample implementation to which I can refer or you can tell where I am doing wrong?