Question

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 ?

Était-ce utile?

La solution

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

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top