Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdac63a299 | ||
|
|
0a210b6e09 | ||
|
|
945308dfbc | ||
|
|
aa285f90ae | ||
|
|
64bf12718a | ||
|
|
dd9677ea3b | ||
|
|
ea60df592f | ||
|
|
9d6cf369d6 |
No files matched your search
@@ -0,0 +1,69 @@
|
||||
# Introduction
|
||||
The purpose of this guide is to help whomever is interested in running the LBRY Android application from scratch on their device, but they're main computing platform is not Linux but macOS.
|
||||
|
||||
## Estimated build time
|
||||
25 - 40 minutes (depending on Internet connection speeds)
|
||||
|
||||
## What do you need?
|
||||
* A computer running the latest OS
|
||||
* Internet access to download modules and packages
|
||||
* At least 15GB of free disk space
|
||||
* Docker
|
||||
* Patience
|
||||
|
||||
## Step 1/6
|
||||
Create an application on [Firebase](https://console.firebase.google.com). In the **Android package name** field, input `io.lbry.browser`. Download the resulting `google-services.json` file and keep it safe, you'll be needing it later.
|
||||
|
||||
## Step 2/6
|
||||
Start the docker application and paste all of these lines into Terminal:
|
||||
|
||||
```bash
|
||||
docker run -it lbry/android-base:latest /bin/bash
|
||||
wget "https://www.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz" -P ~/.buildozer/android/
|
||||
tar -xvf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/
|
||||
rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
ln -s ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21 ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
git clone https://github.com/lbryio/lbry-android
|
||||
cd lbry-android;cp buildozer.spec.sample buildozer.spec
|
||||
cd app;npm i;cd ..
|
||||
cp scripts/build-target-python.sh ~/.buildozer/android/crystax-ndk-10.3.2/build/tools/build-target-python.sh
|
||||
cp scripts/mangled-glibc-syscalls.h ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21/arch-arm/usr/include/crystax/bionic/libc/include/sys/mangled-glibc-syscalls.h
|
||||
cd p4a/pythonforandroid/bootstraps/lbry/build/templates
|
||||
apt install nano -y
|
||||
```
|
||||
|
||||
## Step 3/6
|
||||
Copy the contents of the `google-services.json` you downloaded earlier and paste them into Terminal after running the next command:
|
||||
|
||||
```bash
|
||||
nano google-services.json
|
||||
```
|
||||
|
||||
Type `^X` to save and exit.
|
||||
|
||||
## Step 4/6
|
||||
Paste more lines and I guess check your email, this will take some time:
|
||||
|
||||
```bash
|
||||
cd /lbry-android/app
|
||||
./bundle.sh
|
||||
cd ..
|
||||
buildozer android debug
|
||||
```
|
||||
|
||||
When the build is complete, you should see a message like: `[INFO]: # APK renamed to browser-0.7.3-debug.apk`. You will need this filename for the next step.
|
||||
|
||||
## Step 5/6
|
||||
In a separate Terminal window:
|
||||
|
||||
```bash
|
||||
docker ps # get container name
|
||||
docker cp CONTAINER_NAME:/lbry-android/bin/STEP_4_FILENAME ~/Desktop/ # copies STEP_4_FILENAME to your Desktop
|
||||
```
|
||||
|
||||
## Step 6/6
|
||||
- Download [Android File Transfer](https://www.android.com/filetransfer) and install it.
|
||||
- On your Android device, install [File Explorer](https://play.google.com/store/apps/details?id=com.mauriciotogneri.fileexplorer).
|
||||
- Plug in your Android device and swipe down from the top into the "USB for file transfer" settings (or similar name on your device) and make sure "Transfer files" is selected.
|
||||
- Open **Android File Transfer** on your computer and drag and drop `STEP_4_FILENAME` from your Desktop to the `Downloads` folder on the Android device.
|
||||
- Back on the Android device, navigate to `STEP_4_FILENAME` in the `Downloads` folder and tap it to begin installation.
|
||||
@@ -1,7 +1,4 @@
|
||||
import { connect } from 'react-redux';
|
||||
import Button from './view';
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
null
|
||||
)(Button);
|
||||
export default connect()(Button);
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Text, TouchableOpacity } from 'react-native';
|
||||
import buttonStyle from '../../styles/button';
|
||||
import Colors from '../../styles/colors';
|
||||
import buttonStyle from 'styles/button';
|
||||
import Colors from 'styles/colors';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
|
||||
export default class Button extends React.PureComponent {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { regexAddress } from 'lbry-redux';
|
||||
import { Alert, TextInput, Text, View } from 'react-native';
|
||||
import Button from '../button';
|
||||
import walletStyle from '../../styles/wallet';
|
||||
import { Alert, Clipboard, TextInput, Text, View } from 'react-native';
|
||||
import Button from 'component/button';
|
||||
import Colors from 'styles/colors';
|
||||
import walletStyle from 'styles/wallet';
|
||||
|
||||
type DraftTransaction = {
|
||||
address: string,
|
||||
@@ -99,10 +100,16 @@ class WalletSend extends React.PureComponent<Props> {
|
||||
onBlur={this.handleAddressInputBlur}
|
||||
onSubmitEditing={this.handleAddressInputSubmit}
|
||||
placeholder={'bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs'}
|
||||
underlineColorAndroid={Colors.NextLbryGreen}
|
||||
value={this.state.address}
|
||||
returnKeyType={'next'}
|
||||
style={[walletStyle.input, walletStyle.addressInput, walletStyle.bottomMarginMedium]}
|
||||
/>
|
||||
<Button
|
||||
icon={'paste'}
|
||||
style={walletStyle.button}
|
||||
onPress={() => Clipboard.getString().then(value => this.setState({ address: value, addressChanged: true }))}
|
||||
/>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>Amount</Text>
|
||||
<View style={walletStyle.row}>
|
||||
@@ -112,6 +119,7 @@ class WalletSend extends React.PureComponent<Props> {
|
||||
onChangeText={value => this.setState({ amount: value })}
|
||||
keyboardType={'numeric'}
|
||||
placeholder={'0'}
|
||||
underlineColorAndroid={Colors.NextLbryGreen}
|
||||
value={this.state.amount}
|
||||
style={[walletStyle.input, walletStyle.amountInput]}
|
||||
/>
|
||||
|
||||
@@ -865,14 +865,15 @@ class FilePage extends React.PureComponent {
|
||||
/>
|
||||
</View>
|
||||
<View style={filePageStyle.subscriptionRow}>
|
||||
{false && ((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
|
||||
<Button
|
||||
style={[filePageStyle.actionButton, filePageStyle.saveFileButton]}
|
||||
theme={'light'}
|
||||
icon={'download'}
|
||||
onPress={this.onSaveFilePressed}
|
||||
/>
|
||||
)}
|
||||
{false &&
|
||||
((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
|
||||
<Button
|
||||
style={[filePageStyle.actionButton, filePageStyle.saveFileButton]}
|
||||
theme={'light'}
|
||||
icon={'download'}
|
||||
onPress={this.onSaveFilePressed}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
style={[filePageStyle.actionButton, filePageStyle.tipButton]}
|
||||
theme={'light'}
|
||||
|
||||
@@ -43,7 +43,7 @@ class EmailCollectPage extends React.PureComponent {
|
||||
const { onEmailViewLayout } = this.props;
|
||||
|
||||
const content = (
|
||||
<View onLayout={onEmailViewLayout}>
|
||||
<View onLayout={() => onEmailViewLayout('collect')}>
|
||||
<Text style={firstRunStyle.title}>Setup account</Text>
|
||||
<TextInput
|
||||
style={firstRunStyle.emailInput}
|
||||
|
||||
@@ -20,7 +20,7 @@ class EmailVerifyPage extends React.PureComponent {
|
||||
const { onEmailViewLayout, email } = this.props;
|
||||
|
||||
const content = (
|
||||
<View onLayout={onEmailViewLayout}>
|
||||
<View onLayout={() => onEmailViewLayout('verify')}>
|
||||
<Text style={firstRunStyle.title}>Verify Email</Text>
|
||||
<Text style={firstRunStyle.paragraph}>
|
||||
An email has been sent to{' '}
|
||||
|
||||
@@ -24,7 +24,9 @@ class FirstRunScreen extends React.PureComponent {
|
||||
state = {
|
||||
currentPage: null,
|
||||
email: null,
|
||||
emailCollectTracked: false,
|
||||
emailSubmitted: false,
|
||||
enterPasswordTracked: false,
|
||||
isFirstRun: false,
|
||||
launchUrl: null,
|
||||
showSkip: false,
|
||||
@@ -44,7 +46,10 @@ class FirstRunScreen extends React.PureComponent {
|
||||
|
||||
if (NativeModules.FirstRun) {
|
||||
NativeModules.FirstRun.isFirstRun().then(firstRun => {
|
||||
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
|
||||
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
|
||||
this.setState({ isFirstRun: firstRun });
|
||||
|
||||
if (firstRun) {
|
||||
this.setState({ currentPage: FirstRunScreen.pages[0] });
|
||||
} else {
|
||||
@@ -118,6 +123,7 @@ class FirstRunScreen extends React.PureComponent {
|
||||
handleLeftButtonPressed = () => {
|
||||
// Go to setup account page when "Setup account" is pressed
|
||||
if (Constants.FIRST_RUN_PAGE_SKIP_ACCOUNT === this.state.currentPage) {
|
||||
this.setState({ emailCollectTracked: false }); // reset tracked flag
|
||||
return this.showPage(Constants.FIRST_RUN_PAGE_EMAIL_COLLECT);
|
||||
}
|
||||
|
||||
@@ -128,6 +134,7 @@ class FirstRunScreen extends React.PureComponent {
|
||||
|
||||
// Go to email collection page if user cancels from email verification
|
||||
if (Constants.FIRST_RUN_PAGE_EMAIL_VERIFY === this.state.currentPage) {
|
||||
this.setState({ emailCollectTracked: false }); // reset tracked flag
|
||||
this.showPage(Constants.FIRST_RUN_PAGE_EMAIL_COLLECT);
|
||||
}
|
||||
};
|
||||
@@ -228,10 +235,19 @@ class FirstRunScreen extends React.PureComponent {
|
||||
}
|
||||
};
|
||||
|
||||
onEmailViewLayout = () => {
|
||||
onEmailViewLayout = phase => {
|
||||
if ('collect' === phase) {
|
||||
if (!this.state.emailCollectTracked) {
|
||||
// we only want to track this once
|
||||
this.setState({ emailCollectTracked: true }, () =>
|
||||
NativeModules.Firebase.track('first_run_email_collect', null)
|
||||
);
|
||||
}
|
||||
} else if ('verify' === phase) {
|
||||
NativeModules.Firebase.track('first_run_email_verify', null);
|
||||
}
|
||||
|
||||
this.setState({ showBottomContainer: true, showSkip: true });
|
||||
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
|
||||
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
|
||||
};
|
||||
|
||||
onWalletPasswordChanged = password => {
|
||||
@@ -239,6 +255,11 @@ class FirstRunScreen extends React.PureComponent {
|
||||
};
|
||||
|
||||
onWalletViewLayout = () => {
|
||||
if (!this.state.enterPasswordTracked) {
|
||||
this.setState({ enterPasswordTracked: true }, () =>
|
||||
NativeModules.Firebase.track('first_run_enter_password', null)
|
||||
);
|
||||
}
|
||||
this.setState({ showBottomContainer: true });
|
||||
};
|
||||
|
||||
@@ -246,6 +267,11 @@ class FirstRunScreen extends React.PureComponent {
|
||||
this.setState({ showBottomContainer: true });
|
||||
};
|
||||
|
||||
onSkipAccountViewLayout = () => {
|
||||
NativeModules.Firebase.track('first_run_skip_account', null);
|
||||
this.setState({ showBottomContainer: true });
|
||||
};
|
||||
|
||||
onSkipSwitchChanged = checked => {
|
||||
this.setState({ skipAccountConfirmed: checked });
|
||||
};
|
||||
|
||||
@@ -214,7 +214,7 @@ class SplashScreen extends React.PureComponent {
|
||||
|
||||
setTimeout(() => {
|
||||
this.updateStatus();
|
||||
}, 500);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
@@ -101,7 +101,11 @@ class WalletPage extends React.PureComponent {
|
||||
return (
|
||||
<View style={walletStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<ScrollView style={walletStyle.scrollContainer} keyboardShouldPersistTaps={'handled'}>
|
||||
<ScrollView
|
||||
style={walletStyle.scrollContainer}
|
||||
keyboardShouldPersistTaps={'handled'}
|
||||
removeClippedSubviews={false}
|
||||
>
|
||||
<WalletSyncDriver navigation={navigation} />
|
||||
{!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />}
|
||||
<WalletBalance />
|
||||
|
||||
@@ -138,6 +138,7 @@ const walletStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
fontSize: 16,
|
||||
letterSpacing: 1.5,
|
||||
marginRight: 8,
|
||||
},
|
||||
warning: {
|
||||
backgroundColor: Colors.Orange,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__version__ = "0.7.4"
|
||||
__version__ = "0.7.5"
|
||||
|
||||
class ServiceApp(App):
|
||||
def build(self):
|
||||
|
||||
Reference in new issue
Block a user