A
AMAAAAAR
Guest
EDIT: I succeeded! All I had to do was change
I'm trying to create an Android extension that allows the user to share their score.
I found this code online, and put it in a Java extension. Here is the function:
The problem is that when the code gets to the startActivity line, it doesn't run and this appears in the log:
Can someone who is experienced in making Android extensions with Java help me please? Does anyone have the function startActivity working at all?
tostartActivity(intent)
I hope this helps others who get stuck on this.RunnerActivity.CurrentActivity.startActivity(intent)
I'm trying to create an Android extension that allows the user to share their score.
I found this code online, and put it in a Java extension. Here is the function:
Code:
public void share(String str)
{
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, str);
sendIntent.setType("text/plain");
startActivity(sendIntent);
}
When I put this code into an Android app (not with gamemaker, with AIDE (an android IDE)), it worked perfectly.Can't find method on external class:null
Can someone who is experienced in making Android extensions with Java help me please? Does anyone have the function startActivity working at all?
Last edited by a moderator: