-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Run ZeroNet on Seperate Service. - Bug Fixed for UI lag on initial setup of App Settings. - Packages Upgrade to latest versions. - Added Third Party Purchase Manager. - InApp Purchases Fix. - Bug Fixes and UX changes.
- Loading branch information
Showing
31 changed files
with
835 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,74 @@ | ||
# zeronet | ||
# ZeroNet Mobile | ||
[![Codemagic build status](https://api.codemagic.io/apps/5f755f0647fecf7a4f25751a/5f75609747fecf958ea171b0/status_badge.svg)](https://codemagic.io/apps/5f755f0647fecf7a4f25751a/5f75609747fecf958ea171b0/latest_build) | ||
|
||
A new Flutter project. | ||
ZeroNet Mobile is an Android Client for [ZeroNet](https://zeronet.io), a platform for decentralized websites using Bitcoin crypto and the BitTorrent network. you can learn more about ZeroNet at https://zeronet.io/. | ||
|
||
## Getting Started | ||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" | ||
alt="Download from Google Play" | ||
height="80">](https://play.google.com/store/apps/details?id=in.canews.zeronet) | ||
|
||
This project is a starting point for a Flutter application. | ||
## Installation | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
### From Google PlayStore : | ||
#### Android (arm, arm64, x86) | ||
- minimum Android version supported 16 (JellyBean). | ||
- Google Play Store Link https://play.google.com/store/apps/details?id=in.canews.zeronet | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
#### Compiling Source : | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
You need Flutter Framework to compile this App from Source. | ||
|
||
#### Installing Flutter : https://flutter.dev/docs/get-started/install | ||
|
||
``` | ||
git clone https://github.com/canewsin/zeronet_mobile.git | ||
cd zeronet_mobile | ||
flutter packages get | ||
``` | ||
|
||
After that create a file named `key.properties` in `android` directory | ||
and fill the below details, which are in capital letters, with your details. | ||
``` | ||
storeFile=ANDROID_KEY_STORE_FILE_PATH | ||
storePassword=KEY_STORE_PASSWORD | ||
keyAlias=KEY_ALIAS | ||
keyPassword=KEY_PASSWORD | ||
``` | ||
|
||
in root folder | ||
|
||
to build apk | ||
``` | ||
flutter build apk --no-shrink | ||
``` | ||
|
||
to build appbundle | ||
``` | ||
flutter build appbundle --no-shrink | ||
``` | ||
|
||
to run the app in Android Device / Emulator | ||
|
||
``` | ||
flutter run | ||
``` | ||
|
||
## Donate | ||
BTC(Preferred) : | ||
|
||
`35NgjpB3pzkdHkAPrNh2EMERGxnXgwCb6G` | ||
|
||
ETH : | ||
|
||
`0xa81a32dcce8e5bcb9792daa19ae7f964699ee536` | ||
|
||
UPI(Indian Users) : | ||
|
||
`pramukesh@upi` | ||
|
||
Liberapay : | ||
|
||
`https://liberapay.com/canews.in/donate` | ||
|
||
## Contribute | ||
If you want to support project's further development, you can contribute your time or money, If you want to contribute money you can send bitcoin or other supported crypto currencies to above addresses or buy in-app purchases, if want to contribute translations or code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 20 additions & 2 deletions
22
android/app/src/main/kotlin/in/canews/zeronet/MyApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,32 @@ | ||
package `in`.canews.zeronet | ||
|
||
import android.app.Activity | ||
import android.content.Context | ||
import io.flutter.app.FlutterApplication | ||
import com.google.android.play.core.splitcompat.SplitCompat | ||
import com.google.android.play.core.splitcompat.SplitCompatApplication | ||
import io.flutter.FlutterInjector | ||
|
||
|
||
internal class MyApplication : SplitCompatApplication(){ | ||
internal class MyApplication : SplitCompatApplication() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
FlutterInjector.instance().flutterLoader().startInitialization(this) | ||
} | ||
|
||
private var mCurrentActivity: Activity? = null | ||
|
||
fun getCurrentActivity(): Activity? { | ||
return mCurrentActivity | ||
} | ||
|
||
fun setCurrentActivity(mCurrentActivity: Activity?) { | ||
this.mCurrentActivity = mCurrentActivity | ||
} | ||
|
||
override fun attachBaseContext(base: Context?) { | ||
super.attachBaseContext(base) | ||
SplitCompat.install(base!!) | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
android/app/src/main/res/drawable-anydpi-v24/ic_bg_service_small.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<vector android:height="24dp" android:viewportHeight="512" | ||
android:viewportWidth="512" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z"/> | ||
<path android:fillColor="#8663ff" | ||
android:pathData="M79.443,144.457C77.102,162.428 119.095,235.227 234.554,305.703C341.917,371.238 417.752,375.869 432.208,366.721C434.549,348.749 392.556,275.95 277.097,205.474C169.734,139.94 93.899,135.309 79.443,144.457M43.51,124.185C68.586,78.947 181.959,99.367 298.459,170.479C416.115,242.296 492.407,338.621 468.861,385.626C468.63,386.088 468.39,386.543 468.141,386.992C443.065,432.23 329.693,411.81 213.192,340.699C95.536,268.881 19.244,172.557 42.79,125.552C43.021,125.09 43.262,124.634 43.51,124.185Z" android:strokeColor="#00000000"/> | ||
<path android:fillColor="#8663ff" | ||
android:pathData="M260.204,47.135C243.6,54.383 202.852,127.849 201.923,263.062C201.06,388.795 236.142,456.153 251.424,463.827C268.028,456.579 308.776,383.114 309.704,247.901C310.568,122.168 275.485,54.81 260.204,47.135M259.069,5.91C310.74,4.1 351.624,111.75 350.688,248.182C349.742,385.969 306.499,500.935 254.101,504.966C253.586,505.006 253.072,505.035 252.559,505.053C200.888,506.863 160.004,399.213 160.94,262.78C161.886,124.994 205.129,10.028 257.527,5.996C258.041,5.957 258.556,5.928 259.069,5.91Z" android:strokeColor="#00000000"/> | ||
<path android:fillColor="#8663ff" | ||
android:pathData="M436.391,150.75C422.423,141.092 346.225,143.081 236.355,204.938C117.586,271.806 73.069,343.715 75.207,360.39C89.023,370.093 165.281,368.184 275.301,306.242C393.821,239.515 438.4,167.768 436.391,150.75M472.89,131.633C473.121,132.087 473.342,132.544 473.555,133.009C495.419,180.715 415.663,274.27 295.415,341.969C176.342,409.007 62.209,425.554 38.766,379.547C38.535,379.094 38.314,378.637 38.101,378.171C16.238,330.465 95.994,236.911 216.241,169.211C335.314,102.173 449.447,85.626 472.89,131.633Z" android:strokeColor="#00000000"/> | ||
<path android:fillColor="#9963f9" android:pathData="M256.188,314.308 L217,288.662L217,268.515L235.975,257.602 276.256,233.09 256.188,220.834 235.975,233.09L235.975,253.741L217,265.157L217,222.177L256.188,198 295.231,222.177L295.231,243.667L235.975,277.749 255.283,289.67 276.256,277.749l-0,-21.49L295.231,247.025L295.231,288.662Z"/> | ||
</group> | ||
</vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
flutter.versionName=0.7.3 | ||
flutter.versionCode=4125 | ||
flutter.versionName=v 0.7.5 - beta 1 | ||
flutter.versionCode=4149 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import 'package:mobx/mobx.dart'; | ||
import 'package:purchases_flutter/purchases_flutter.dart' as purchases_flutter; | ||
|
||
// Include generated file | ||
part 'purchasesstore.g.dart'; | ||
|
||
// This is the class used by rest of your codebase | ||
final purchasesStore = PurchasesStore(); | ||
|
||
class PurchasesStore = _PurchasesStore with _$PurchasesStore; | ||
|
||
// The store-class | ||
abstract class _PurchasesStore with Store { | ||
@observable | ||
ObservableList<purchases_flutter.Package> oneTimePurchases = | ||
ObservableList<purchases_flutter.Package>(); | ||
|
||
@observable | ||
ObservableList<purchases_flutter.Package> subscriptions = | ||
ObservableList<purchases_flutter.Package>(); | ||
|
||
@action | ||
void addOneTimePuchases(List<purchases_flutter.Package> details) { | ||
for (var item in details) { | ||
bool exists = oneTimePurchases | ||
.any((element) => element.identifier == item.identifier); | ||
if (!exists) { | ||
oneTimePurchases.add(item); | ||
} | ||
} | ||
} | ||
|
||
@action | ||
void addSubscriptions(List<purchases_flutter.Package> details) { | ||
for (var item in details) { | ||
bool exists = | ||
subscriptions.any((element) => element.identifier == item.identifier); | ||
if (!exists) { | ||
subscriptions.add(item); | ||
} | ||
} | ||
} | ||
|
||
@observable | ||
ObservableList<String> purchases = ObservableList(); | ||
|
||
@action | ||
void addPurchases(String purchaseIds) { | ||
if (!purchases.contains(purchaseIds)) { | ||
purchases.add(purchaseIds); | ||
} | ||
} | ||
|
||
@observable | ||
ObservableList<String> consumedPurchases = ObservableList(); | ||
|
||
@action | ||
void addConsumedPurchases(String purchaseIds) { | ||
if (!consumedPurchases.contains(purchaseIds)) { | ||
consumedPurchases.add(purchaseIds); | ||
} | ||
} | ||
} |
Oops, something went wrong.