Splash screen, discover and file Pages #30

Merged
akinwale merged 14 commits from react-ui into master 2018-03-11 16:32:14 +01:00
9 changed files with 4578 additions and 22 deletions
Showing only changes of commit a34b20b512 - Show all commits

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.buildozer .buildozer
app/node_modules/
bin bin
buildozer.spec buildozer.spec
build.log build.log

View file

@ -8,28 +8,31 @@ install:
- export PATH=/usr/bin:$PATH - export PATH=/usr/bin:$PATH
- sudo dpkg --add-architecture i386 - sudo dpkg --add-architecture i386
- sudo apt-get -qq update - sudo apt-get -qq update
- sudo apt-get -qq install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386 - sudo apt-get -qq install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386 npm
- sudo pip install --upgrade cython==0.25.2 pip setuptools - sudo pip install --upgrade cython==0.25.2 pip setuptools
- git clone https://github.com/kivy/buildozer.git - git clone https://github.com/akinwale/buildozer.git
- cd app
- npm install --save react@16.2.0 react-native
- cd ..
- cd buildozer - cd buildozer
- sudo python setup.py install - sudo python setup.py install
- cd .. - cd ..
- mv buildozer.spec.travis buildozer.spec - mv buildozer.spec.travis buildozer.spec
- mkdir -p cd ~/.buildozer/android/platform/ - mkdir -p cd ~/.buildozer/android/platform/
- wget 'https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip' -P ~/.buildozer/android/platform/ - wget 'https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip' -P ~/.buildozer/android/platform/
- wget 'https://dl.google.com/android/android-sdk_r21-linux.tgz' -P ~/.buildozer/android/platform/ - wget 'https://dl.google.com/android/android-sdk_r23-linux.tgz' -P ~/.buildozer/android/platform/
- wget 'https://dl.google.com/android/repository/android-21_r02.zip' -P ~/.buildozer/android/platform/ - wget 'https://dl.google.com/android/repository/android-23_r02.zip' -P ~/.buildozer/android/platform/
- wget 'https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip' -P ~/.buildozer/android/platform/ - wget 'https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip' -P ~/.buildozer/android/platform/
- unzip -qq ~/.buildozer/android/platform/android-ndk-r13b-linux-x86_64.zip -d ~/.buildozer/android/platform/ - unzip -qq ~/.buildozer/android/platform/android-ndk-r13b-linux-x86_64.zip -d ~/.buildozer/android/platform/
- tar -xf ~/.buildozer/android/platform/android-sdk_r21-linux.tgz -C ~/.buildozer/android/platform/ - tar -xf ~/.buildozer/android/platform/android-sdk_r23-linux.tgz -C ~/.buildozer/android/platform/
- mv ~/.buildozer/android/platform/android-sdk-linux ~/.buildozer/android/platform/android-sdk-21 - mv ~/.buildozer/android/platform/android-sdk-linux ~/.buildozer/android/platform/android-sdk-23
- unzip -qq ~/.buildozer/android/platform/android-21_r02.zip -d ~/.buildozer/android/platform/android-sdk-21/platforms - unzip -qq ~/.buildozer/android/platform/android-23_r02.zip -d ~/.buildozer/android/platform/android-sdk-23/platforms
- mv ~/.buildozer/android/platform/android-sdk-21/platforms/android-5.0.1 ~/.buildozer/android/platform/android-sdk-21/platforms/android-21 - mv ~/.buildozer/android/platform/android-sdk-23/platforms/android-6.0.0 ~/.buildozer/android/platform/android-sdk-23/platforms/android-23
- mkdir -p ~/.buildozer/android/platform/android-sdk-21/build-tools - mkdir -p ~/.buildozer/android/platform/android-sdk-23/build-tools
- unzip -qq ~/.buildozer/android/platform/build-tools_r26.0.1-linux.zip -d ~/.buildozer/android/platform/android-sdk-21/build-tools - unzip -qq ~/.buildozer/android/platform/build-tools_r26.0.1-linux.zip -d ~/.buildozer/android/platform/android-sdk-23/build-tools
- mv ~/.buildozer/android/platform/android-sdk-21/build-tools/android-8.0.0 ~/.buildozer/android/platform/android-sdk-21/build-tools/26.0.1 - mv ~/.buildozer/android/platform/android-sdk-23/build-tools/android-8.0.0 ~/.buildozer/android/platform/android-sdk-23/build-tools/26.0.1
- mkdir -p ~/.buildozer/android/platform/android-sdk-21/licenses - mkdir -p ~/.buildozer/android/platform/android-sdk-23/licenses
- echo $'\nd56f5187479451eabf01fb78af6dfcb131a6481e' > ~/.buildozer/android/platform/android-sdk-21/licenses/android-sdk-license - echo $'\nd56f5187479451eabf01fb78af6dfcb131a6481e' > ~/.buildozer/android/platform/android-sdk-23/licenses/android-sdk-license
script: script:
- buildozer android debug | grep -v 'working:' --line-buffered - buildozer android debug | grep -v 'working:' --line-buffered
- cp bin/*.apk /dev/null - cp bin/*.apk /dev/null

25
app/index.js Normal file
View file

@ -0,0 +1,25 @@
import React from 'react';
import {AppRegistry, StyleSheet, Text, View} from 'react-native';
class InfoComponent extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>LBRY Info</Text>
</View>
);
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
title: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
AppRegistry.registerComponent('LBRYApp', () => InfoComponent);

4504
app/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

12
app/package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "LBRYApp",
"version": "0.0.1",
"private": "true",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "^16.2.0",
"react-native": "^0.51.0"
}
}

View file

@ -89,13 +89,13 @@ fullscreen = 0
android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
# (int) Android API to use # (int) Android API to use
android.api = 21 android.api = 23
# (int) Minimum API required # (int) Minimum API required
#android.minapi = 9 android.minapi = 16
# (int) Android SDK version to use # (int) Android SDK version to use
android.sdk = 21 android.sdk = 23
# (str) Android NDK version to use # (str) Android NDK version to use
android.ndk = 13b android.ndk = 13b
@ -139,13 +139,15 @@ android.ndk = 13b
# directory containing the files) # directory containing the files)
android.add_src = ./src/main/java android.add_src = ./src/main/java
android.react_src = ./app
# (list) Android AAR archives to add (currently works only with sdl2_gradle # (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap) # bootstrap)
#android.add_aars = #android.add_aars =
# (list) Gradle dependencies to add (currently works only with sdl2_gradle # (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap) # bootstrap)
android.gradle_dependencies = com.android.support:appcompat-v7:21.0.3 android.gradle_dependencies = com.android.support:appcompat-v7:23.4.0, com.facebook.react:react-native:+
# (str) python-for-android branch to use, defaults to master # (str) python-for-android branch to use, defaults to master
#p4a.branch = stable #p4a.branch = stable

View file

@ -89,13 +89,13 @@ fullscreen = 0
android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
# (int) Android API to use # (int) Android API to use
android.api = 21 android.api = 23
# (int) Minimum API required # (int) Minimum API required
#android.minapi = 9 android.minapi = 16
# (int) Android SDK version to use # (int) Android SDK version to use
android.sdk = 21 android.sdk = 23
# (str) Android NDK version to use # (str) Android NDK version to use
android.ndk = 13b android.ndk = 13b
@ -139,13 +139,15 @@ android.ndk = 13b
# directory containing the files) # directory containing the files)
android.add_src = ./src/main/java android.add_src = ./src/main/java
android.react_src = ./app
# (list) Android AAR archives to add (currently works only with sdl2_gradle # (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap) # bootstrap)
#android.add_aars = #android.add_aars =
# (list) Gradle dependencies to add (currently works only with sdl2_gradle # (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap) # bootstrap)
android.gradle_dependencies = com.android.support:appcompat-v7:21.0.3 android.gradle_dependencies = com.android.support:appcompat-v7:23.4.0, com.facebook.react:react-native:+
# (str) python-for-android branch to use, defaults to master # (str) python-for-android branch to use, defaults to master
#p4a.branch = stable #p4a.branch = stable

View file

@ -2,6 +2,7 @@ package org.kivy.android;
import android.app.Service; import android.app.Service;
import android.os.IBinder; import android.os.IBinder;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.content.Intent; import android.content.Intent;
import android.content.Context; import android.content.Context;
@ -94,7 +95,9 @@ public class PythonService extends Service implements Runnable {
Intent contextIntent = new Intent(context, PythonActivity.class); Intent contextIntent = new Intent(context, PythonActivity.class);
PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent, PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent,
PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT);
/*if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent); notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent);
}*/
startForeground(1, notification); startForeground(1, notification);
} }

View file

@ -11,6 +11,10 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter() jcenter()
maven {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/react/node_modules/react-native/android"
}
flatDir { flatDir {
dirs 'libs' dirs 'libs'
} }