Used this code on previous app and all seems ok - but today im getting a
call requires permission which may be rejected by user
I have added
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
to manifest and have read several threads on the subject, but still having issues. Could you guys helps out.
public class MainActivity extends AppCompatActivity implements LocationListener
{
    private LocationManager locationManager;
    public static String locationlong;
    public static String locationlati;
    @SuppressWarnings("deprecation")
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView tv = (TextView)findViewById(R.id.pig);
        TextView cow = (TextView)findViewById(R.id.cow);
        locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10000, 1, this);
    }
}