WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
b74c6fc
removed empty icon
niccokunzmann Jan 10, 2016
8ee1330
added icon
niccokunzmann Jan 10, 2016
b018700
removed contents of the gh-pages branch
niccokunzmann Jan 10, 2016
af10db5
Update README.md
niccokunzmann Jan 10, 2016
04255c7
Added alert messages(issue #28)
antoniomdk Jan 11, 2016
02b39e8
Update en-us.md
niccokunzmann Jan 11, 2016
16ad0e9
Added alert messages and Restart button.
antoniomdk Jan 11, 2016
5ff6d61
Added new APK
antoniomdk Jan 11, 2016
6f33eb9
Merge pull request #31 from antoniomdk/gh-pages
niccokunzmann Jan 11, 2016
ebc2f47
Added new update message.
antoniomdk Jan 11, 2016
4bb552e
added apk
antoniomdk Jan 11, 2016
13f21eb
Added progress bar and messages.
antoniomdk Jan 12, 2016
022b675
Uploaded QR code
antoniomdk Jan 12, 2016
ffb763f
Merge pull request #33 from antoniomdk/gh-pages
niccokunzmann Jan 12, 2016
c111982
Added description
antoniomdk Jan 13, 2016
ee196ea
Merge pull request #35 from antoniomdk/patch-1
jigyasa-grover Jan 13, 2016
b064914
Update en-us.md
niccokunzmann Jan 13, 2016
4df2911
Added click
niccokunzmann Jan 13, 2016
f71f463
added German translation
niccokunzmann Jan 13, 2016
0e7c6f2
Merge pull request #37 from fossasia/niccokunzmann-addd-german-transl…
jigyasa-grover Jan 13, 2016
b691310
Merge pull request #36 from fossasia/niccokunzmann-en-us-read-through
jigyasa-grover Jan 13, 2016
8ed632c
Added spanish description.
antoniomdk Jan 14, 2016
80fa9b2
Merge pull request #39 from antoniomdk/patch-2
jigyasa-grover Jan 14, 2016
9561d01
Update README.md
antoniomdk Jan 15, 2016
2745143
Merge pull request #41 from antoniomdk/master
jigyasa-grover Jan 15, 2016
3eaee10
added license, title and project links to icon
niccokunzmann Jan 16, 2016
97df3bb
Merge pull request #42 from fossasia/niccokunzmann-icon-license-and-r…
niccokunzmann Jan 16, 2016
595dd34
Added SBZ to contributors list
Jan 19, 2016
1bb972a
Merge pull request #52 from toxicdeath32/master
jigyasa-grover Jan 24, 2016
d6dcc43
Update Contributing.md
niccokunzmann Jan 25, 2016
87fcbd5
Added link to rotoscopes to contributors file
niccokunzmann Jan 31, 2016
ff0af98
Adding myself to contributors list
Feb 1, 2016
31473bc
Merge pull request #59 from alan-aipe/patch-1
niccokunzmann Feb 1, 2016
4fb3f4a
Create Deutsch.md
niccokunzmann Feb 6, 2016
cbcb0e2
Create English.md
niccokunzmann Feb 6, 2016
7dff2d0
Create English.md
niccokunzmann Feb 6, 2016
f3ef18b
Create Deutsch.md
niccokunzmann Feb 6, 2016
74caf3e
Create English.md
niccokunzmann Feb 6, 2016
f6ea0a6
Create Deutsch.md
niccokunzmann Feb 6, 2016
26e0fc5
moved English.md
niccokunzmann Feb 6, 2016
3ebe8f0
added tasks
niccokunzmann Feb 6, 2016
cf101ed
we moved the Contributors.md file to credits.html
niccokunzmann Feb 7, 2016
791e366
Update README.md
niccokunzmann Feb 7, 2016
64b9109
added credits.html link to tasks
niccokunzmann Feb 7, 2016
46a1fc8
added task: learn git
niccokunzmann Feb 7, 2016
a43b69e
added link to git the simepl guide
niccokunzmann Feb 7, 2016
380588e
corrected German spelling
niccokunzmann Feb 7, 2016
0ef86ba
redirected to credits.html
SilentFlame Feb 9, 2016
4d4437d
removed contributors.md
SilentFlame Feb 9, 2016
bd0b815
Merge pull request #82 from SilentFlame/master
niccokunzmann Feb 9, 2016
9cb9c8e
Google Code-In comment removed
niccokunzmann Feb 9, 2016
1cf30df
Merge pull request #83 from niccokunzmann/patch-1
jigyasa-grover Feb 9, 2016
faff1e7
added link to tasks.
niccokunzmann Feb 12, 2016
27eff47
Update README.md
niccokunzmann Feb 12, 2016
b0ac170
Update Contributing.md
niccokunzmann Jul 30, 2016
f3e522e
Update Contributing.md
niccokunzmann Jul 30, 2016
ed72cc5
changed order: first contribute
niccokunzmann Aug 9, 2016
dc3c5be
Update English.md
niccokunzmann Dec 1, 2016
7e48be0
added descriptions for fast merge
niccokunzmann Dec 1, 2016
316bc62
Merge pull request #119 from fossasia/updated-task-descriptions
niccokunzmann Dec 3, 2016
0d625c6
Added instructions in Romanian and fixed some typos of the English ve…
oanarosca Dec 6, 2016
5ffca2e
Merge pull request #120 from oanarosca/master
niccokunzmann Dec 6, 2016
9957044
Added Windows version of FlappySVG
idealadarsh Dec 7, 2016
04a54af
Removed useless files
idealadarsh Dec 7, 2016
9901bef
Add executable
idealadarsh Dec 8, 2016
c4c4ab9
Merge pull request #132 from adarsh-ideal/master
niccokunzmann Dec 8, 2016
090f5f3
fixes #135
niccokunzmann Dec 8, 2016
0973073
Merge pull request #136 from fossasia/niccokunzmann-patch-1
niccokunzmann Dec 8, 2016
1114682
Added Custom Android App
yvars Dec 10, 2016
7e852b4
Merge pull request #146 from yvars/master
niccokunzmann Dec 10, 2016
8c182d9
Added .app for Mac OS X
rhemon Dec 10, 2016
aa30745
Added a built version of FlappySVG_Custom (apk)
yvars Dec 10, 2016
a82f2b2
Merge pull request #149 from rhemon/master
niccokunzmann Dec 10, 2016
42aff7a
Merge pull request #152 from yvars/master
niccokunzmann Dec 10, 2016
e7c19df
Moved the FlappySVG_Custom built (apk) to its FlappySVG_Custom folder
yvars Dec 10, 2016
74ce2ee
Merge pull request #155 from yvars/master
niccokunzmann Dec 10, 2016
bff63ec
Delete README.md~
jigyasa-grover Dec 11, 2016
86ae824
Merge pull request #162 from fossasia/jig08-patch-1
niccokunzmann Dec 11, 2016
72fa582
Replacing .app with .dmg (#178)
rhemon Dec 13, 2016
c1a28cc
Added app to the master branch. (#205)
abishekvashok Dec 20, 2016
494c897
Added my app's download link (#210)
abishekvashok Dec 20, 2016
4945943
Added new code update (#215)
abishekvashok Dec 21, 2016
9622248
Added the new link (#217)
abishekvashok Dec 21, 2016
eceff32
Add Mac app (#229)
Dec 26, 2016
895cde7
Updated Binary and Source of Windows Flappy SVG (#249)
adarsh-ideal Jan 11, 2017
bafdab7
adding travis-ci badge
JimFung Jan 17, 2017
91814ea
Merge pull request #265 from JimFung/master
jigyasa-grover Jan 18, 2017
8340b0c
re-structured task menu to be consistent with other pages (#271)
mayonnaise-is-an-instrument Jun 13, 2018
f51261f
Added new character (#280)
Akashd7 Oct 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 11 additions & 2 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
How to Contribute
=================

- You should add your name with a link to your website to the [Contributors.md](./Contributors.md).
Start
-----

To start developing Flappy SVG, there is a variety of repeatable [tasks](tasks#tasks) for you and one time [Issues](https://github.com/fossasia/flappy-svg/issues) you can solve.

Hints
-----

- You should add your name with a link to your website to the [credits.html](http://fossasia.github.io/flappy-svg/credits.html).
- Have a look at the [implementation hints](./hints).
- When you claim an issue, you need to comment. We can not let you do all the [easy](https://github.com/fossasia/flappy-svg/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Aeasy+label%3Agci) issues because they are for people who first contribute to the project, unless we have a lot of them.
- Create [new branches](http://www.git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) for pull requests if you do several pull requests or issues at a time, so they can be reviewed independently.
- If reasonable, each issue should have an own pull request.
- You can add issues yourself if you want specific improvements of the game. We categorize them into `easy`, `middle` and `hard`.
- When the issue is tagged as [GCI](https://github.com/fossasia/flappy-svg/labels/GCI), it is possible to solve google codein tasks with it.
- All works must be your own creation or you must give proper, license-dependent attribution to the creator. See the [LICENSE](LICENSE) file and [credits.html](http://fossasia.github.io/flappy-svg/credits.html) and the [Developer Certificate](http://developercertificate.org/).
- This must work online and offline and without internet connection.
- This all is possible to be discussed.
14 changes: 0 additions & 14 deletions Contributors.md

This file was deleted.

Binary file added FlappySVG_Android/Flappy-SVG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified FlappySVG_Android/app-release.apk
Binary file not shown.
23 changes: 9 additions & 14 deletions FlappySVG_Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,31 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:screenOrientation="portrait"
android:name=".Game"
android:configChanges="orientation|keyboardHidden|screenSize"
android:name=".SplashScreen"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" >
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.EMBED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:screenOrientation="portrait"
android:name=".SplashScreen"
android:label="@string/app_name">
android:name=".GameActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.EMBED" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
/*
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc/4.0/.
*/

package fossasia.flappysvg;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Window;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

import java.io.BufferedInputStream;
import java.io.File;
Expand All @@ -28,7 +25,8 @@

import fossasia.flappysvg.util.DecompressZip;

public class Game extends Activity {
public class GameActivity extends AppCompatActivity {

private WebView myWebView;

//URL of online game page.
Expand All @@ -40,44 +38,77 @@ public class Game extends Activity {
//Name of the root folder inside the packaged game.
private final String game_folder_name = "flappy-svg-gh-pages";

private String local_game_path;
private boolean isUpdating;

private ProgressDialog progress;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_game);
setContentView(R.layout.game_activity);

myWebView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();

myWebView.setWebViewClient(new WebViewClient());
webSettings.setJavaScriptEnabled(true);
webSettings.setAllowFileAccess(true);

myWebView.setWebViewClient(new WebViewClient());

//Path where the game html page is saved(locally)
String local_game_path = "file:///" + getCacheFolder(this).getPath() + File.separator + game_folder_name + "/index.html";
local_game_path = getCacheFolder(this).getPath() + File.separator + game_folder_name + "/index.html";
LoadGame();
}

//Checking network connection. If there is connection, it downloads the game to use later locally.
if(isNetworkAvailable()){
myWebView.loadUrl(game_web_url);
new DownloadTask().execute(download_file_path);
}
else {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_game, menu);
return super.onCreateOptionsMenu(menu);
}

void LoadGame(){
if (isThereAPreviousVersion()) {
Log.d("Loading Game", local_game_path);
myWebView.loadUrl(local_game_path);
myWebView.loadUrl("file:///" + local_game_path);
}
else{
if(isNetworkAvailable()){
new DownloadTask().execute(download_file_path);
}
else
Toast.makeText(GameActivity.this, "Please, connect to internet to download the game", Toast.LENGTH_LONG).show();

}
}

private class DownloadTask extends AsyncTask<String,Void,Exception> {
boolean isFirstTime = !isThereAPreviousVersion();

@Override
protected void onPreExecute() {
//Put here, alert messages(on download starts)
if(isFirstTime) {
Toast.makeText(GameActivity.this, "Downloading game", Toast.LENGTH_LONG).show();
}

progress = new ProgressDialog(GameActivity.this);
progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progress.setIndeterminate(false);
progress.setProgress(0);

if(isUpdating) {
progress.setMessage("Updating game");
}
else
progress.setMessage("Downloading game");
progress.show();

}

@Override
protected Exception doInBackground(String... params) {
String url = params[0];

try {
downloadAssets(url);
} catch ( Exception e ) { return e; }
Expand All @@ -87,9 +118,24 @@ protected Exception doInBackground(String... params) {

@Override
protected void onPostExecute(Exception result) {
if ( result == null ) { return; }
// something went wrong, post a message to user - you could use a dialog here or whatever
//Toast.makeText(Game.this, result.getLocalizedMessage(), Toast.LENGTH_LONG).show();
if (progress.isShowing()) {
progress.dismiss();
}

if(isFirstTime){
if ( result == null )
Toast.makeText(GameActivity.this, "Game downloaded", Toast.LENGTH_LONG).show();
else {
Toast.makeText(GameActivity.this, "A problem occurs, connect to internet and use Update button", Toast.LENGTH_LONG).show();
}
}
if(result == null){
myWebView.loadUrl("file:///" + local_game_path);
if(isUpdating){
Toast.makeText(GameActivity.this, "Game updated", Toast.LENGTH_LONG).show();
isUpdating = false;
}
}
}
}

Expand All @@ -98,18 +144,20 @@ private void downloadAssets(String url) {
URL gameURL = new URL(url);
URLConnection connection = gameURL.openConnection();
InputStream inputStream = new BufferedInputStream(gameURL.openStream(), 10240);
File cacheDir = getCacheFolder(Game.this);
File cacheDir = getCacheFolder(GameActivity.this);
File cacheFile = new File(cacheDir, "game.zip");
FileOutputStream outputStream = new FileOutputStream(cacheFile);

byte buffer[] = new byte[1024];
int fileLength = connection.getContentLength();
int dataSize;
int loadedSize = 0;
while ((dataSize = inputStream.read(buffer)) != -1) {
loadedSize += dataSize;
outputStream.write(buffer, 0, dataSize);
if(fileLength > 0)
progress.setProgress(loadedSize * 100 / fileLength);

//Progress bar code here(use loaded size)
}

outputStream.close();
Expand Down Expand Up @@ -149,8 +197,33 @@ public File getCacheFolder(Context context) {

return cacheDir;
}
}

boolean isThereAPreviousVersion(){
File file = new File(local_game_path);
return file.exists();
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();

if (id == R.id.update_button) {
if(!isNetworkAvailable()) {
Toast.makeText(GameActivity.this, "Could not update game", Toast.LENGTH_LONG).show();
return true;
}

Toast.makeText(GameActivity.this,"Updating game", Toast.LENGTH_SHORT).show();
isUpdating = true;
new DownloadTask().execute(download_file_path);
return true;
}

if (id == R.id.restart_button) {
LoadGame();
return true;
}

return super.onOptionsItemSelected(item);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void run() {
/* Create an Intent that will start the Menu-Activity. */
Intent mainIntent = new Intent(SplashScreen.this, Game.class);
Intent mainIntent = new Intent(SplashScreen.this, GameActivity.class);
SplashScreen.this.startActivity(mainIntent);
SplashScreen.this.finish();
}
Expand Down
32 changes: 0 additions & 32 deletions FlappySVG_Android/app/src/main/res/layout/activity_game.xml

This file was deleted.

20 changes: 20 additions & 0 deletions FlappySVG_Android/app/src/main/res/layout/game_activity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="fossasia.flappysvg.GameActivity"
android:background="@android:color/background_dark"
android:theme="@style/AppTheme">

<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView"
android:layout_gravity="right|top"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="false"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="@android:color/background_dark" />

</RelativeLayout>
15 changes: 15 additions & 0 deletions FlappySVG_Android/app/src/main/res/menu/menu_game.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="fossasia.flappysvg.GameActivity">

<item android:id="@+id/restart_button"
android:title="Restart"
android:orderInCategory="100"
app:showAsAction="ifRoom" />

<item android:id="@+id/update_button"
android:title="Update"
android:orderInCategory="100"
app:showAsAction="ifRoom" />
</menu>
4 changes: 0 additions & 4 deletions FlappySVG_Android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<resources>
<string name="app_name">Flappy-SVG</string>
<string name="title_activity_splash_screen">SplashScreen</string>

<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
</resources>
Loading