Permalink
Browse files

updated docs for v1.6.2

  • Loading branch information...
jasonpolites committed Apr 10, 2012
1 parent 298e5e3 commit 6383fe0a311489d2f78a652841336e6de5e868fc
Showing with 254 additions and 2,578 deletions.
  1. +1 −0 sample/src/socialize_ui_mock_socialize_beans.xml
  2. +0 −199 sdk/deprecated/BaseShareClickListener.java
  3. +0 −62 sdk/deprecated/EmailShareClickListener.java
  4. +0 −120 sdk/deprecated/FacebookShareClickListener.java
  5. +0 −106 sdk/deprecated/InternalShareClickListener.java
  6. +0 −65 sdk/deprecated/OtherShareClickListener.java
  7. +0 −11 sdk/deprecated/ShareClickListener.java
  8. +0 −81 sdk/deprecated/SimpleShareClickListener.java
  9. +0 −60 sdk/deprecated/SmsShareClickListener.java
  10. +0 −130 sdk/deprecated/TwitterShareClickListener.java
  11. +0 −255 sdk/deprecated/fb/AsyncFacebookRunner.java
  12. +0 −51 sdk/deprecated/fb/DialogError.java
  13. +0 −724 sdk/deprecated/fb/Facebook.java
  14. +0 −50 sdk/deprecated/fb/FacebookError.java
  15. +0 −203 sdk/deprecated/fb/FbDialog.java
  16. +0 −75 sdk/deprecated/fb/RequestListener.java
  17. +0 −323 sdk/deprecated/fb/Util.java
  18. +11 −3 sdk/doc/sphinx/source/config.rst
  19. BIN sdk/doc/sphinx/source/images/direct_alerts.png
  20. +0 −1 sdk/doc/sphinx/source/push_notifications.rst
  21. +22 −0 sdk/doc/sphinx/source/whats_new.rst
  22. +4 −51 sdk/src/com/socialize/auth/AuthProviderInfoBuilder.java
  23. +81 −0 sdk/src/com/socialize/auth/DefaultAuthProviderInfoBuilder.java
  24. +4 −3 sdk/src/com/socialize/config/SocializeConfig.java
  25. +4 −1 sdk/src/com/socialize/ui/actionbar/ActionBarLayoutView.java
  26. +1 −1 sdk/src/socialize_core_beans.xml
  27. +5 −0 test/src/com/socialize/test/ui/integrationtest/actionbar/ActionBarLikeAutoTest.java
  28. +5 −0 test/src/com/socialize/test/ui/integrationtest/actionbar/ActionBarLikeManualTest.java
  29. +1 −1 test/src/com/socialize/test/ui/integrationtest/actionbar/ActionBarLikeStateTest.java
  30. +115 −2 test/src/com/socialize/test/ui/integrationtest/actionbar/ActionBarTestUtils2.java
@@ -19,6 +19,7 @@
<proxy ref="alertDialogFactory" />
<proxy ref="actionButtonHandlers" />
+ <proxy ref="authProviderInfoBuilder" />
<proxy ref="authRequestDialogFactory" />
<bean id="initializationAsserter" class="com.socialize.test.mock.MockInitializationAsserter" />
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2011 Socialize Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.socialize.ui.share;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.view.View;
-import android.widget.EditText;
-
-import com.socialize.Socialize;
-import com.socialize.api.ShareMessageBuilder;
-import com.socialize.api.action.ShareType;
-import com.socialize.entity.Entity;
-import com.socialize.entity.Share;
-import com.socialize.error.SocializeErrorHandler;
-import com.socialize.error.SocializeException;
-import com.socialize.listener.share.ShareAddListener;
-import com.socialize.log.SocializeLogger;
-import com.socialize.ui.actionbar.ActionBarView;
-import com.socialize.ui.actionbar.OnActionBarEventListener;
-
-/**
- * @author Jason Polites
- *
- */
-@Deprecated
-public abstract class BaseShareClickListener implements ShareClickListener {
-
- private SocializeLogger logger;
- private ActionBarView actionBarView;
- private EditText commentView;
- private SocializeErrorHandler errorHandler;
-
- protected ShareMessageBuilder shareMessageBuilder;
- protected OnActionBarEventListener onActionBarEventListener;
-
- public BaseShareClickListener(ActionBarView actionBarView) {
- this(actionBarView, null, null);
- }
-
- public BaseShareClickListener(ActionBarView actionBarView, EditText commentView, OnActionBarEventListener onActionBarEventListener) {
- super();
- this.actionBarView = actionBarView;
- this.onActionBarEventListener = onActionBarEventListener;
- this.commentView = commentView;
- }
-
- protected Activity getActivity(View v) {
- Context context = v.getContext();
-
- if(context instanceof Activity) {
- return (Activity) context;
- }
- else {
- String warn = "Context instance in [" + getClass().getName() + "] is not an Activity";
-
- if(logger != null) {
- logger.warn(warn);
- }
- else {
- System.err.println(warn);
- }
- }
-
- return null;
- }
-
- @Override
- public final void onClick(View v) {
-
- try {
-
- Activity activity = getActivity(v);
-
- String comment = null;
-
- if(commentView != null) {
- comment = commentView.getText().toString();
- }
-
- Entity entity = actionBarView.getEntity();
-
- if(entity != null) {
-
- String text = comment;
-
- // Record the share in Socialize
- if(isDoShareInline()) {
- Socialize.getSocialize().addShare(activity, entity, text, getShareType(), getShareAddListener());
- }
-
- doShare(activity, entity, text, getShareAddListener());
- }
- else {
- if(logger != null) {
- logger.error("Unable to complete share. Entity key was not found in actionBarView.");
- }
- }
- }
- catch (Exception e) {
- if(errorHandler != null) {
- errorHandler.handleError(v.getContext(), e);
- }
- }
- }
-
- public void setLogger(SocializeLogger logger) {
- this.logger = logger;
- }
-
- public void setShareMessageBuilder(ShareMessageBuilder shareMessageBuilder) {
- this.shareMessageBuilder = shareMessageBuilder;
- }
-
- protected ShareAddListener getShareAddListener() {
- return new ShareAddListener() {
-
- @Override
- public void onError(SocializeException error) {
- if(logger != null) {
- logger.error("Error creating share", error);
- }
- else {
- error.printStackTrace();
- }
- }
-
- @Override
- public void onCreate(Share share) {
- // TOOD: Update UI?
- if(onActionBarEventListener != null) {
- onActionBarEventListener.onPostShare(actionBarView, share);
- }
- }
- };
- }
-
- protected abstract void doShare(Activity context, Entity entity, String comment, ShareAddListener listener);
-
- protected abstract boolean isHtml();
-
- protected abstract boolean isIncludeSocialize();
-
- /* (non-Javadoc)
- * @see com.socialize.ui.share.ShareClickListener#isAvailableOnDevice(android.app.Activity)
- */
- @Override
- public abstract boolean isAvailableOnDevice(Activity parent);
-
- /**
- * Returns true if this listener should do a share to Socialize.
- * Subclasses override.
- * @return
- */
- protected boolean isDoShareInline() {
- return true;
- }
-
- protected abstract ShareType getShareType();
-
- protected boolean isAvailable(Activity parent, Intent intent) {
- return parent.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null;
- }
-
- protected boolean isGenerateShareMessage() {
- return true;
- }
-
- public void setOnActionBarEventListener(OnActionBarEventListener onActionBarEventListener) {
- this.onActionBarEventListener = onActionBarEventListener;
- }
-
- public void setErrorHandler(SocializeErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
-
-}
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2011 Socialize Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.socialize.ui.share;
-
-import android.widget.EditText;
-
-import com.socialize.api.action.ShareType;
-import com.socialize.ui.actionbar.ActionBarView;
-import com.socialize.ui.actionbar.OnActionBarEventListener;
-
-
-/**
- * @author Jason Polites
- */
-@Deprecated
-public class EmailShareClickListener extends SimpleShareClickListener {
-
-
- public EmailShareClickListener(ActionBarView actionBarView) {
- super(actionBarView);
- }
-
-
- public EmailShareClickListener(ActionBarView actionBarView, EditText commentView, OnActionBarEventListener onActionBarEventListener) {
- super(actionBarView, commentView, onActionBarEventListener);
- }
-
-
- @Override
- protected String getMimeType() {
- return "message/rfc822";
- }
-
- @Override
- protected boolean isHtml() {
- return true;
- }
-
- @Override
- protected ShareType getShareType() {
- return ShareType.EMAIL;
- }
-}
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2011 Socialize Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.socialize.ui.share;
-
-import android.app.Activity;
-import android.app.ProgressDialog;
-import android.widget.EditText;
-
-import com.socialize.Socialize;
-import com.socialize.SocializeService;
-import com.socialize.api.action.ShareType;
-import com.socialize.auth.AuthProviderType;
-import com.socialize.entity.Entity;
-import com.socialize.listener.share.ShareAddListener;
-import com.socialize.networks.SocialNetwork;
-import com.socialize.networks.SocialNetworkListener;
-import com.socialize.networks.facebook.FacebookSharer;
-import com.socialize.ui.actionbar.ActionBarView;
-import com.socialize.ui.actionbar.OnActionBarEventListener;
-import com.socialize.ui.dialog.AlertDialogFactory;
-import com.socialize.ui.dialog.ProgressDialogFactory;
-
-/**
- * @author Jason Polites
- *
- */
-@Deprecated
-public class FacebookShareClickListener extends BaseShareClickListener {
-
- private ProgressDialogFactory progressDialogFactory;
- private AlertDialogFactory alertDialogFactory;
- private FacebookSharer facebookSharer;
-
- public FacebookShareClickListener(ActionBarView actionBarView) {
- super(actionBarView);
- }
-
- public FacebookShareClickListener(ActionBarView actionBarView, EditText commentView, OnActionBarEventListener onActionBarEventListener) {
- super(actionBarView, commentView, onActionBarEventListener);
- }
-
- @Override
- public boolean isAvailableOnDevice(Activity parent) {
- return getSocialize().isSupported(AuthProviderType.FACEBOOK);
- }
-
- @Override
- protected void doShare(Activity context, Entity entity, String comment, ShareAddListener listener) {
- facebookSharer.shareEntity(context, entity, comment, true, new SocialNetworkListener() {
- ProgressDialog dialog;
-
- @Override
- public void onBeforePost(Activity parent, SocialNetwork network) {
- dialog = progressDialogFactory.show(parent, "Share", "Sharing to Facebook...");
- }
-
- @Override
- public void onAfterPost(Activity parent, SocialNetwork network) {
- if(dialog != null) dialog.dismiss();
- alertDialogFactory.show(parent, "Success", "Share successful!");
- }
-
- @Override
- public void onError(Activity parent, SocialNetwork network, String message, Throwable error) {
- if(dialog != null) dialog.dismiss();
- alertDialogFactory.show(parent, "Error", "Share failed. Please try again");
- }
- });
- }
-
- @Override
- protected boolean isHtml() {
- return false;
- }
-
- @Override
- protected boolean isIncludeSocialize() {
- return true;
- }
-
- @Override
- protected ShareType getShareType() {
- return ShareType.FACEBOOK;
- }
-
- protected SocializeService getSocialize() {
- return Socialize.getSocialize();
- }
-
- public void setProgressDialogFactory(ProgressDialogFactory progressDialogFactory) {
- this.progressDialogFactory = progressDialogFactory;
- }
-
- public void setAlertDialogFactory(AlertDialogFactory alertDialogFactory) {
- this.alertDialogFactory = alertDialogFactory;
- }
-
- public void setFacebookSharer(FacebookSharer facebookSharer) {
- this.facebookSharer = facebookSharer;
- }
-}
Oops, something went wrong.

0 comments on commit 6383fe0

Please sign in to comment.