Skip to main content

Posts

How do I change the Android SMS tone despite of current SMS tone setting?

I have developed an Android application for changing ringtones. It works quite well, but one thing bothers me. When I set a ringtone as a notification tone, it plays when I receive an SMS message. However, if I have chosen a custom SMS tone earlier (ie. anything else than "Default ringtone" which is active by default) in the SMS settings, the new notification tone will not play when I receive an SMS. This might lead to a situation in which someone installs the ringtone app from the Android market, sets the notification tone and gets disappointed because the chosen notification will not play when (s)he receives an SMS. The solution is quite easy (SMS -> Settings -> Select ringtone -> Default ringtone), but it's truly a nuisance if (s)he doesn't know this. This is what I use to set the notification tone: values.put(MediaStore.Audio.Media.IS_RINGTONE, true); values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true); values.put(MediaStore.Audio.Media.IS_AL

How do I change the Android SMS tone despite of current SMS tone setting?

I have developed an Android application for changing ringtones. It works quite well, but one thing bothers me. When I set a ringtone as a notification tone, it plays when I receive an SMS message. However, if I have chosen a custom SMS tone earlier (ie. anything else than "Default ringtone" which is active by default) in the SMS settings, the new notification tone will not play when I receive an SMS. This might lead to a situation in which someone installs the ringtone app from the Android market, sets the notification tone and gets disappointed because the chosen notification will not play when (s)he receives an SMS. The solution is quite easy (SMS -> Settings -> Select ringtone -> Default ringtone), but it's truly a nuisance if (s)he doesn't know this. This is what I use to set the notification tone: values.put(MediaStore.Audio.Media.IS_RINGTONE, true); values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true); values.put(MediaStore.Audio.Media.IS_AL

App Bypassing the Login-screen, even though it shouldn"t

Whenever I launch my App, even from a new emulator with now files created it still executes the bit of code, that says if the file has been created do this intent, I don't understand, it shouldn't, I have no way of testing, because I have an iPhone not an Android phone, in theory the code should not be called, only on the second time loading the app. Thanks! Code: Public class LogIn extends Activity implements OnClickListener { Button send; EditText user; EditText pass; CheckBox staySignedIn; FileOutputStream Fos; String a; String b; String string = a; String string2 = b; String DANNYISREALLLLYYYGAAYYYYYIMNOTBS; String FILENAME = "userandpass"; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.login); send = (Button) findViewById(R.id.bLogIn); user = (EditText) find

Fetching a large number of contacts

I'm trying to fetch all the Phone numbers and Emails in Android.by using this code. enter code here String KEY_NAME = "Name"; String KEY_NO = "No"; String selection = ContactsContract.CommonDataKinds.Phone.IN_VISIBLE_GROUP + " = 1"; String sortOrder = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE LOCALIZED ASC"; String data=""; String name=""; ContactEntry contactObj; String id; List<String> temp = new ArrayList<String>(); final String[] projection = new String[]{ContactsContract.Contacts._ID , ContactsContract.Contacts.DISPLAY_NAME , ContactsContract.Contacts.HAS_PHONE_NUMBER}; final String[] email_projection = new String[] {ContactsContract.CommonDataKinds.Email.DATA , ContactsContract.CommonDataKinds.Email.TYPE}; final String[] phone_projection = new String[] {ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.