Discuss Scratch

-Excelsior-
New Scratcher
8 posts

Convert .sb2 to .apk

NitroDragon147 wrote:

Okay, after copious amounts of research, I have found the following. The way I converted *.sb2 to *.apk, requires you to compile it with phosphorus (at phosphorus.github.io), put it into a GitHub repository, then run it through Adobe PhoneGap. It will create an *.apk file that you can then either sideload to your Android/Amazon device or post to the Amazon/Google Play Store.
It works, I tried it. The only reason my game isn't up is because I used sprites from an old Zelda game.

I'm interested in doing this, but I'm not certain about 2 things:
1) What exactly needs to go into my Github repo? Just the source code copied from a compiled phosphorus page such as http://phosphorus.github.io/app.html?id=103064412&turbo=false&full-screen=true ?
1b) If so, should my Github repo look like https://github.com/MetaKor/PhosphorusToAppTest ?
2) Would I compile the app on PhoneGap from https://build.phonegap.com/apps after signing into an Adobe account?

Help would be appreciated.
Link tags don't seem to be working…

Last edited by -Excelsior- (May 30, 2016 01:08:28)

NitroDragon147
Scratcher
84 posts

Convert .sb2 to .apk

-Excelsior- wrote:

NitroDragon147 wrote:

Okay, after copious amounts of research, I have found the following. The way I converted *.sb2 to *.apk, requires you to compile it with phosphorus (at phosphorus.github.io), put it into a GitHub repository, then run it through Adobe PhoneGap. It will create an *.apk file that you can then either sideload to your Android/Amazon device or post to the Amazon/Google Play Store.
It works, I tried it. The only reason my game isn't up is because I used sprites from an old Zelda game.

I'm interested in doing this, but I'm not certain about 2 things:
1) What exactly needs to go into my Github repo? Just the source code copied from a compiled phosphorus page such as http://phosphorus.github.io/app.html?id=103064412&turbo=false&full-screen=true ?
1b) If so, should my Github repo look like https://github.com/MetaKor/PhosphorusToAppTest ?
2) Would I compile the app on PhoneGap from https://build.phonegap.com/apps after signing into an Adobe account?

Help would be appreciated.
Link tags don't seem to be working…

Answer to question 1: Yes-ish. You would be copying the code of the full-screen page of your project on Phosphorus.
Answer to question 1b: Currently, I have not tried just putting in the HTML code into the repository (as you did), I actually have the source code of nathan/phosphorous in my repo. Here is my repository for reference.
And your link tags aren't working because you're a New Scratcher. New Scratchers can't have link tags in forums or use cloud variables, I believe.
Answer to question two: Yeah, you'll need an Adobe Account.

Last edited by NitroDragon147 (May 31, 2016 23:52:09)

-Excelsior-
New Scratcher
8 posts

Convert .sb2 to .apk

NitroDragon147 wrote:

-Excelsior- wrote:

NitroDragon147 wrote:

Okay, after copious amounts of research, I have found the following. The way I converted *.sb2 to *.apk, requires you to compile it with phosphorus (at phosphorus.github.io), put it into a GitHub repository, then run it through Adobe PhoneGap. It will create an *.apk file that you can then either sideload to your Android/Amazon device or post to the Amazon/Google Play Store.
It works, I tried it. The only reason my game isn't up is because I used sprites from an old Zelda game.

I'm interested in doing this, but I'm not certain about 2 things:
1) What exactly needs to go into my Github repo? Just the source code copied from a compiled phosphorus page such as http://phosphorus.github.io/app.html?id=103064412&turbo=false&full-screen=true ?
1b) If so, should my Github repo look like https://github.com/MetaKor/PhosphorusToAppTest ?
2) Would I compile the app on PhoneGap from https://build.phonegap.com/apps after signing into an Adobe account?

Help would be appreciated.
Link tags don't seem to be working…

Answer to question 1: Yes-ish. You would be copying the code of the full-screen page of your project on Phosphorus.
Answer to question 1b: Currently, I have not tried just putting in the HTML code into the repository (as you did), I actually have the source code of nathan/phosphorous in my repo. Here is my repository for reference.
And your link tags aren't working because you're a New Scratcher. New Scratchers can't have link tags in forums or use cloud variables, I believe.
Answer to question two: Yeah, you'll need an Adobe Account.

Thanks for the info!
I forgot about not being able to use links as a New Scratcher. I'm used to using them on my other account.
zafzaf
Scratcher
1000+ posts

Convert .sb2 to .apk

what is an exe.?
liam48D
Scratcher
1000+ posts

Convert .sb2 to .apk

zafzaf wrote:

what is an exe.?
An EXE is a program that you can run on Windows. It's like a normal file, such as your photos or songs, but instead of storing data that explains a picture or audio, it explains what the OS - that's Windows, in this case - should do when you open the program (file).
JTA_Craft
Scratcher
12 posts

Convert .sb2 to .apk

I have been trying this for the past month… Here
karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

How do I import a github repo into Phonegap?
karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

karatebuilderboy wrote:

How do I import a github repo into Phonegap?
Nevermind! I figured it out, but it says “Error index.html not found”. What should my index.html say in it?

Edit: Nevermind, figured it out, too! Sorry if this is bothering you…

Last edited by karatebuilderboy (June 29, 2016 22:51:05)

AppLab
Scratcher
100+ posts

Convert .sb2 to .apk

jacquesimo wrote:

blob8108 wrote:

You could bundle Phosphorus inside Crosswalk.
How do you bundle it?
You really wouldn't want to go this way…

But I'll tell you anyways!
1. First run your project in phosphorus and press package.
2. Save a copy of the resulting webpage.
3. Save a .sb2 copy of your project. (Easy so far)
4. Rewrite phosphorous to deal with the local copy of the .sb2 file. (The hard bit)
5. Somehow manage to scale it into phonegap/cordova/cocoonjs/intelXDK to fit on mobile devices. (Hard again)
5. Build apk
cs377310
Scratcher
100+ posts

Convert .sb2 to .apk

HSHtypci wrote:

Please put more specific words.
liam48D
Scratcher
1000+ posts

Convert .sb2 to .apk

cs377310 wrote:

HSHtypci wrote:

Please put more specific words.
They “deleted” their own post by editing out the content. Probably they realized they posted in the wrong section, or something.
karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

What Android emulator should I use for testing?

EDIT: I am using Andyroid

Last edited by karatebuilderboy (July 3, 2016 19:58:42)

karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

What should go in the repo?

Specifically?

Last edited by karatebuilderboy (July 3, 2016 19:58:25)

NitroDragon147
Scratcher
84 posts

Convert .sb2 to .apk

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!

Last edited by NitroDragon147 (July 3, 2016 23:09:59)

karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

NitroDragon147 wrote:

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!
I've already put all of the phosphorus source in my repo. How do I attach my project?
NitroDragon147
Scratcher
84 posts

Convert .sb2 to .apk

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!
I've already put all of the phosphorus source in my repo. How do I attach my project?

Did you use phosphorus to bundle your project in full-screen and copy the HTML code?
That should be your index.html, and it attaches your project.
If you didn't do that, you can always go into the index.html that you already have (if one comes with the phosphorus source (can't remember if it does or not) and switch “var ProjectID” to your Project ID (the number in your project's URL).
karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

NitroDragon147 wrote:

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!
I've already put all of the phosphorus source in my repo. How do I attach my project?

Did you use phosphorus to bundle your project in full-screen and copy the HTML code?
That should be your index.html, and it attaches your project.
If you didn't do that, you can always go into the index.html that you already have (if one comes with the phosphorus source (can't remember if it does or not) and switch “var ProjectID” to your Project ID (the number in your project's URL).
I wasn't able to get my project to run as an apk, so, for kicks, took your index.html and put it in a repo with the phosphorus source. When I compiled to an apk with Phonegap Build and ran it in Android Studio, I got this error, which makes me think that I'm not compiling to apk properly. Here's what I do:
Go to PhoneGap Build
Create new app and link my github repo (I don't enter a branch or tag…)
Build app to android (I don't enter a key…)
Download
Run with Android Studio/Andy/Mayanmo

I've tried multiple times, and I always get this error page. What am I doing wrong?
NitroDragon147
Scratcher
84 posts

Convert .sb2 to .apk

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!
I've already put all of the phosphorus source in my repo. How do I attach my project?

Did you use phosphorus to bundle your project in full-screen and copy the HTML code?
That should be your index.html, and it attaches your project.
If you didn't do that, you can always go into the index.html that you already have (if one comes with the phosphorus source (can't remember if it does or not) and switch “var ProjectID” to your Project ID (the number in your project's URL).
I wasn't able to get my project to run as an apk, so, for kicks, took your index.html and put it in a repo with the phosphorus source. When I compiled to an apk with Phonegap Build and ran it in Android Studio, I got this error, which makes me think that I'm not compiling to apk properly. Here's what I do:
Go to PhoneGap Build
Create new app and link my github repo (I don't enter a branch or tag…)
Build app to android (I don't enter a key…)
Download
Run with Android Studio/Andy/Mayanmo

I've tried multiple times, and I always get this error page. What am I doing wrong?
The branch would be ‘master’. I'll take a look at the key…
NitroDragon147
Scratcher
84 posts

Convert .sb2 to .apk

NitroDragon147 wrote:

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

NitroDragon147 wrote:

karatebuilderboy wrote:

What should go in the repo?

Specifically?

The second post on this page (mine) has a repository for reference.
Hope that helps, and good luck!
I've already put all of the phosphorus source in my repo. How do I attach my project?

Did you use phosphorus to bundle your project in full-screen and copy the HTML code?
That should be your index.html, and it attaches your project.
If you didn't do that, you can always go into the index.html that you already have (if one comes with the phosphorus source (can't remember if it does or not) and switch “var ProjectID” to your Project ID (the number in your project's URL).
I wasn't able to get my project to run as an apk, so, for kicks, took your index.html and put it in a repo with the phosphorus source. When I compiled to an apk with Phonegap Build and ran it in Android Studio, I got this error, which makes me think that I'm not compiling to apk properly. Here's what I do:
Go to PhoneGap Build
Create new app and link my github repo (I don't enter a branch or tag…)
Build app to android (I don't enter a key…)
Download
Run with Android Studio/Andy/Mayanmo

I've tried multiple times, and I always get this error page. What am I doing wrong?
The branch would be ‘master’. I'll take a look at the key…

A key is only required for iOS. Android/Windows works absolutely fine for me. When you linked your repo, did you include “.git” on the end of the URL?
Also, I haven't tested this with Android Studio, only BlueStacks and a Kindle Fire HD.

Last edited by NitroDragon147 (July 5, 2016 20:05:22)

karatebuilderboy
Scratcher
100+ posts

Convert .sb2 to .apk

When building, should I enable hydration or debugging?

EDIT: Nevermind! Got everything working when I enabled hydration. Thanks a ton for all the support, everybody!

Last edited by karatebuilderboy (July 7, 2016 21:55:50)

Powered by DjangoBB