March Security Update for AT&T
- By slabruna96
- Smartphones
- 0 Replies
Anyone with a Galaxy S10+ on AT&T should check for a new update. Just got the March security update. No notable changes.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
su
speedmod
password.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus){
ShowList();
}
}
});
private void ShowList(){
List.setVisibility(View.VISIBLE);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
ScrollViewList.post(new Runnable() {
public void run()
{
ScrollViewList.smoothScrollTo(0, ScrollViewList.getBottom());
}
});
}
},250);
}
package com.example.sample123;
import android.app.Notification;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import com.android_examples.com.webbrowser.R;
import java.net.InetAddress;
import java.util.Timer;
import java.util.TimerTask;
import static com.example.sample123.NotificationService.CHANNEL_ID;
public class ExampleService extends Service {
int flag=0;
[USER=1021285]@override[/USER]
public void onCreate() {
super.onCreate();
}
[USER=1021285]@override[/USER]
public int onStartCommand(Intent intent, int flags, int startId) {
Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this,
0, notificationIntent, 0);
Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("Fire Alarm Service")
.setContentText("Alarm system is functional")
.setSmallIcon(R.mipmap.ic_launcher)
.setContentIntent(pendingIntent)
.build();
startForeground(1, notification);
Timer repeatTask = new Timer();
repeatTask.scheduleAtFixedRate(new TimerTask() {
[USER=1021285]@override[/USER]
public void run() {
if (isInternetAvailable()){
flag = 1;
}else{
flag = 0;
}
System.out.println("pingHost flag: " + flag );
new Thread(new Runnable() {
[USER=1021285]@override[/USER]
public void run() {
if (flag == 1) {
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
v.vibrate(VibrationEffect.createOneShot(5000, VibrationEffect.DEFAULT_AMPLITUDE));
} else {
//deprecated in API 26
v.vibrate(5000);
}
}
}
});
}
}, 0, 10000);
return START_NOT_STICKY;
}
[USER=1021285]@override[/USER]
public void onDestroy() {
super.onDestroy();
}
[USER=1996173]@nullable[/USER]
[USER=1021285]@override[/USER]
public IBinder onBind(Intent intent) {
return null;
}
public boolean isInternetAvailable() {
try {
InetAddress ipAddr = InetAddress.getByName("google.com");
//You can replace it with your name
return !ipAddr.equals("");
}
catch (Exception e) {
return false;
}
}
}