0
votes

I'm new to android so I appreciate all the comments you have.

I want to call a new Intent from a BroadcastReceiver. Is it possible to set the displayed size of the new intent and position it?

Precisely, I would like to place a custom picture on top of the incoming call screen and still be able to answer or reject the call.

I could do it with toast, but it disappears after I while and I don't want that to happen.

Thanks in advance!

1

1 Answers

0
votes

I want to call a new Intent from a BroadcastReceiver

You do not "call a new Intent" in Android.

Is it possible to set the displayed size of the new intent and position it?

I am assuming that by "call a new Intent" you mean "start an activity", and by "set the displayed size of the new Intent" you mean "set the displayed size of the activity".

In that case, the code that is starting the activity has no control over the rendering of that activity. The implementer of the activity is the one that controls the rendering. It is possible for an activity to not fill the screen and have control over its size. I presume that it is possible for the activity to control where it is on the screen, though I haven't looked into that.

I would like to place a custom picture on top of the incoming call screen and still be able to answer or reject the call

That is both impossible and impractical.

It is impossible because only the foreground activity gets user input. Your activity that will "place a custom picture" will receive all input; the incoming-call screen will not receive input, and so the user cannot accept or reject the call.

It is impractical because across thousands of Android device models there are dozens, if not hundreds, of incoming-call screen implementations, none of which have to look the same. As a result, you have no way of knowing whether your "custom picture" will visually overlay important things in the incoming-call screen, such as the buttons to accept or reject the call.