The method startActivity(Activity) from the type StartsActivity is deprecated

Please help me out with an issue. I am getting this message “The method startActivity(Activity) from the type StartsActivity is deprecated”. I am trying to start the activity but it shows the method is deprecated. Could you please help me with an alternative? Below is the java-client version that I am using.

image

io.appium java-client 8.5.0
1 Like

There can be 2 conditions that might be causing this issue.

  1. driver that you are using might be not initialized with desired capabilities, i.e. it is showing a cross over the startActivity(), you might have used the AndroidDriver class but not initialized it.
  2. I believe startActivity() method is now deprecated and soon will not be present in upcoming new java-client updates. I am also looking for a new implementation for this.

This issue still persists. Did anyone find any solution or alternative to the startActivity method, or any way around the issue?

You can always check the changelog of the client on GitHub :

  • Removed startActivity method from AndroidDriver. Use ‘mobile: startActivity’ extension method instead