ANDROID APP

The right way to management audio or ringtone settings of your Android telephone remotely with out Web utilizing SMS?



This video explains the steps that how the audio settings of your android telephone might be managed utilizing an Android App from one other telephone. On this idea, you do not want web settings and the settings shall be managed utilizing SMS. So, mainly 2 steps are proven right here on this video. 1st is the best way to ship SMS to the telephone variety of managed machine. 2nd the best way to learn the SMS and do the respective operation as talked about within the SMS.

This sort of Apps are helpful, if you wish to make the sound of your Cellphone audible in case it’s misplaced someplace in your house or office. On this idea, you can too use any telephone to ship a SMS message of predefined template and the managed telephone will react accordingly.

We shall be glad to listen to from you concerning any question, strategies or appreciations at: [email protected]

https://programmerworld.co/android/how-to-control-audio-or-ringtone-settings-of-your-android-phone-remotely-without-internet-using-sms/

Supply Code:

bundle com.instance.myreingtoneremotecontrol;

import android.app.NotificationManager;
import android.content material.Context;
import android.content material.Intent;
import android.content material.pm.PackageManager;
import android.database.Cursor;
import android.media.AudioManager;
import android.web.Uri;
import android.os.Bundle;
import android.supplier.Settings;
import android.telephony.SmsManager;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import java.util.Timer;
import java.util.TimerTask;

import static android.Manifest.permission.ACCESS_NOTIFICATION_POLICY;
import static android.Manifest.permission.READ_SMS;
import static android.Manifest.permission.SEND_SMS;

public class MainActivity extends AppCompatActivity {

personal TextView textView;
personal Cursor cursor;

@Override
protected void onCreate(Bundle savedInstanceState) {
tremendous.onCreate(savedInstanceState);
setContentView(R.structure.activity_main);

textView = findViewById(R.id.textView);
ActivityCompat.requestPermissions(MainActivity.this,new String[]{ACCESS_NOTIFICATION_POLICY, SEND_SMS, READ_SMS}, PackageManager.PERMISSION_GRANTED);

NotificationManager notificationManager = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);

if (!notificationManager.isNotificationPolicyAccessGranted()){
//Ask the person permission
Intent intent = new Intent((Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS));
startActivity(intent);
}

Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {

cursor = getContentResolver().question(Uri.parse(“content material://sms”), null, null, null, null);
cursor.moveToFirst();

if (cursor.getString(12).equalsIgnoreCase(“Mute”)){
((AudioManager)getSystemService(Context.AUDIO_SERVICE)).setRingerMode(AudioManager.RINGER_MODE_SILENT);

runOnUiThread(new Runnable() {
@Override
public void run() {
textView.setText(“Audio MUTED”);
}
});

}

if (cursor.getString(12).equalsIgnoreCase(“UnMute”)){
((AudioManager)getSystemService(Context.AUDIO_SERVICE)).setRingerMode(AudioManager.RINGER_MODE_NORMAL);

runOnUiThread(new Runnable() {
@Override
public void run() {
textView.setText(“Audio UN-MUTED”);
}
});
}

}
}, 0 , 2000);

}

public void MuteButton(View view){

String quantity = “999999”;
String message = “Mute”;

SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(quantity, null, message, null, null);

}

public void UnMuteButton(View view){
String quantity = “999999”;
String message = “UnMute”;

SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(quantity, null, message, null, null);

}
}

source