I am trying for a code that sends message using WhatsApp Application. I found a useful code at this post.

When I paste the code into my eclipse it start showing me error for undefined method getSherlockActivity().

I tired import library files using ctrl+shift+o key and ctrl+space key. But it seems this method requires any special kind of library ( .jar ) file. I tried to search on google, but could not successed init.

Can anyone please where can I get this method ?

有帮助吗?

解决方案

You need to include the Sherlock library. You can find it Here: http://actionbarsherlock.com/

其他提示

Use getActivity() instead, if you are not using Sherlock Library and you are inside Fragment. If you are using this code inside an Activity then you can just start with getContentResolver()....

include the Sherlock library and use extend SherlockActivity not extend Activity

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top