Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; public class Main { public static final int RINGTONE_REQUESTCODE = 945; public static boolean isOkRingtoneResult(int requestCode, int resultCode) { return requestCode == RINGTONE_REQUESTCODE && resultCode == Activity.RESULT_OK; } }