No, because your code would never compile.
When you call a method from another package's class, you must import that class to do so. The entire class, and all of its dependencies, must be part of your project for you to be able to compile the code successfully.
As you do not have access to the other developer's source code, you cannot import his class. And if you can import his class, then your app will be his code as a library project or something, and hence the code will ship with your app, making your question irrelevant.