Set Loudspeaker mode "Active" on call starts, Please help me

You should do context.getSystemService(Context.AUDIO_SERVICE) after initializing the variable.

Here’s how to do it: Context error while develope extension - #6 by hammerhai