Is it possible to respond to the volume and power buttons while the app is not in the foreground? Much like the screen capture capability when holding volume down and the power button. What api calls are necessary to do that? How do I get my app to listen to hardware key events of the entire system regardless of the current app in the foreground?
You can't remove that option from the system settings interface.
However, if you don't want cached data (files) to be deleted, don't store them in the cache. I'm assuming that you're working on an app of your own so that you have control over where your app data is being stored. Use of the cache doesn't happen arbitrarily... it's something that the app developer must implement.
When all else fails reading the docs is worth a try. It's no harder than reading anything somebody may post on this forum!
I have an rotated textview and I want to drag and drop this view.
The problem is that the drag shadow has no rotation.
I found a solution for android in java but this does not work for me.
Maybe I translate the code wrong
<a href="https://stackoverflow.com/questions/17049938/how-to-drag-a-rotated-dragshadow"></a>[<a href="https://stackoverflow.com/questions/17049938/how-to-drag-a-rotated-dragshadow" target="_blank" title="New Window">^</a>]
class CustomDragShdowBuilder : View.DragShadowBuilder
private View _view;
public CustomDragShdowBuilder(View view)
_view = view;
public override void OnDrawShadow(Canvas canvas)
double rotationRad = Math.ToRadians(_view.Rotation);
int w = (int)(_view.Width * _view.ScaleX);
int h = (int)(_view.Height * _view.ScaleY);
double s = Math.Abs(Math.Sin(rotationRad));
double c = Math.Abs(Math.Cos(rotationRad));
int width = (int)(w * c + h * s);
int height = (int)(w * s + h * c);
canvas.Scale(_view.ScaleX, _view.ScaleY, width / 2, height / 2);
canvas.Rotate(_view.Rotation, width / 2, height / 2);
canvas.Translate((width - _view.Width) / 2, (height - _view.Height) / 2);
public override void OnProvideShadowMetrics(Point shadowSize, Point shadowTouchPoint)
shadowTouchPoint.Set(shadowSize.X / 2, shadowSize.Y / 2);
I once read an article on how to extract the letters and numbers from a picture of a license plate. It was a fun read but was completely beyond me. I suppose the same would be true in this case. Image processing is a huge and complicated field. I did stumble across this as maybe a starting point.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I am looking for a command-utility that will tell me if a particular device is connected to the home network. (TV and Home Theatre in particular). These devices are not responding to a Ping, so that does not help. NMap does not find them either (not sure why), even with its most intense scan. Fing finds them OK, but only seems to be available in with a GUI, and I need to be able to capture the response in Tasker. They do also appear on my routers' "Attached Devices" pages.
Note that my programming skills have deteriorated significantly over recent months due to my brain injury, so I am unable to write anything from scratch (Its taken me 5 days to even set up tasker to a point that would have taken me 2 hours a couple of years ago).
If anyone is able to help, it would be very much appreciated.
A programmer is a person who always checks both ways when crossing a one-way street.
Last Visit: 24-Feb-20 14:55 Last Update: 24-Feb-20 14:55