Skip to content

Commit

Permalink
implements publish install for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
FreshTiti committed May 28, 2013
1 parent e9c9d5b commit 2e1f7af
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,41 @@

import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREInvalidObjectException;
import com.adobe.fre.FREObject;
import com.adobe.fre.FRETypeMismatchException;
import com.adobe.fre.FREWrongThreadException;
import com.facebook.Settings;
import com.freshplanet.ane.AirFacebook.AirFacebookExtension;

public class PublishInstallFunction implements FREFunction {

@Override
public FREObject call(FREContext arg0, FREObject[] arg1) {


String applicationId = null;

try {
applicationId = arg1[0].getAsString();
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (FRETypeMismatchException e) {
e.printStackTrace();
} catch (FREInvalidObjectException e) {
e.printStackTrace();
} catch (FREWrongThreadException e) {
e.printStackTrace();
}

if (applicationId != null)
{
Settings.publishInstallAsync(arg0.getActivity(), applicationId);
} else
{
AirFacebookExtension.log("cannot start publish install, applicationId is null");
}

return null;
}

Expand Down
Binary file modified bin/AirFacebook.ane
Binary file not shown.

0 comments on commit 2e1f7af

Please sign in to comment.