Is it possible to start a method of a specific class from a preference instead of creating the object of the class?
<PreferenceCategory
android:key="facebook_cat"
android:title="Σύνδεση με Facebook" >
<PreferenceScreen
android:key="facebook_screen"
android:summary="Δεν έχετε συνδεθεί στο Facebook. Πατήστε κλικ εδώ για να συνδεθήτε."
android:title="Αποσυνδεδεμένος" >
<intent
-->android:targetClass="com.testproject.facebook.FacebookConnectActivity" <--
android:targetPackage="com.testproject" />
</PreferenceScreen>
</PreferenceCategory>
facebookConnectActivity
is a class. Inside that class I have created a public void called log()
.
Is it possible to start that instead of creating a whole object of FacebookActivity
(hence starting the log()
instead of onCreate()
)?