Call getLayoutInflater() in places not in activity

What does need to be imported or how can I call the Layout inflater in places other than activity? public static void method(Context context){ //this doesn’t work the getLayoutInflater method could not be found LayoutInflater inflater = getLayoutInflater(); // this also doesn’t work LayoutInflater inflater = context.getLayoutInflater(); } I am able to call getLayoutInflater only … Read more

startForeground fail after upgrade to Android 8.1

After upgrading my phone to 8.1 Developer Preview my background service no longer starts up properly. In my long-running service I’ve implemented a startForeground method to start the ongoing notification which is called in on create. @TargetApi(Build.VERSION_CODES.O) private fun startForeground() { // Safe call, handled by compat lib. val notificationBuilder = NotificationCompat.Builder(this, DEFAULT_CHANNEL_ID) val notification … Read more

Starting ssh-agent on Windows 10 fails: “unable to start ssh-agent service, error :1058”

When I try to start the ssh-agent on Windows 10 via PowerShell (with elevated right or without) by entering Start-Service ssh-agent I get the error unable to start ssh-agent service, error :1058 When I check of the service is running via Get-Service ssh-agent is returns that the service is stopped. How can I get the … Read more