Question: I am changing text size in the button when user selects prefered text size in the settings. I am doing it like that:

```
UIFont *font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];

self.button.font = font;

```

It does work, but I get an error:

> 
> font is deprecated:first deprecated in IOS 3.0
> 
> 
> 

I wonder if there is another, more proper way to achieve it.

Answer: 
I've re-read the question (sorry) and it seems you have a typo in your package names:

```
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="nhq.fashlight"

shortcutIntent.setAction("nhq.intent.flashlight"); 

```

That maybe why the shortcut doesn't work.
i think that need addAction for ACTION\_SCREEN\_OFF, ON, PRESENT.

like this

```
IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);

```

also add ACTION\_SCREEN\_ON,ACTION\_USER\_PRESENT filter.addAction too.
then receive intent action

```
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
                Log.v("$$$$$$", "In Method:  ACTION_SCREEN_OFF");
                // onPause() will be called.
            }

```