What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-25 01:45:10
delphi do not allow form to be closed
type TForm1 = class(TForm) private fCloseButtonEnabled: Bool; procedure SetCloseButtonEnabled(const Value: Bool); public property CloseButtonEnabled: Bool read fCloseButtonEnabled write SetCloseButtonEnabled; end; procedure TForm1.S... Add solution -
Java 2022-02-19 07:05:01
android vibrate device
import android.os.Vibrator; ... Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); // Vibrate for 500 milliseconds if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.D... Add solution -
Java 2022-02-19 05:40:02
alert dialoge disappears in android after next page call
public void OnClickNearMe(View view) { LocationManager locManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (!locManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){ createGpsDisabledAlert(); } else { ... Add solution -
Java 2022-02-18 14:55:08
run code periodically android
/* USING HANDLER METHOD */ Handler myHandler = new Handler(); int delay = 1000; // 1000 milliseconds == 1 second myHandler.postDelayed(new Runnable() { public void run() { System.out.println("myHandler: here!"); // Do your work here... Add solution -
Java 2022-02-16 00:35:25
how to ask user for his location in android
public class MainActivity extends AppCompatActivity { //'LocationManager' manages location tracking /*'LocationListener' gives us updates about whenever the device moves, it gives us updates on all those */ LocationManager locationManager; ... Add solution -
Java 2022-02-11 16:35:08
check if service is running android
Create the method: private boolean isMyServiceRunning(Class<?> serviceClass) { ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_... Add solution -
Other 2022-02-05 10:45:02
get incoming call number android example
public class ServiceReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); t... Add solution
Best helpers
Erica Price
+5
Scoiattolo
+5
Vigrond
+5
Muazam
+5
Emmet
+5
A G Davey
+5
Arad
+5
Meital Regev
+5
Entrepreneur
+5
Majte
+5
JoshuaFicy
+5