Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22222 #60

Open
wants to merge 51 commits into
base: Favorite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0f6dc55
Merge pull request #1 from songdongdong123/navigator
songdongdong123 Mar 11, 2019
7546643
Merge pull request #2 from songdongdong123/react-redux
songdongdong123 Mar 11, 2019
f3b9400
Merge pull request #3 from songdongdong123/react-redux-@connect
songdongdong123 Mar 12, 2019
4e495d7
Merge pull request #4 from songdongdong123/react-redux-@connect
songdongdong123 Mar 12, 2019
69ef94d
Merge pull request #5 from songdongdong123/react-native-for-axios
songdongdong123 Mar 12, 2019
88aa627
Merge pull request #6 from songdongdong123/react-native-for-axios
songdongdong123 Mar 12, 2019
fae0ca9
Merge pull request #7 from songdongdong123/AsyncStorage
songdongdong123 Mar 12, 2019
bb1ce7f
Merge pull request #8 from songdongdong123/AsyncFrame
songdongdong123 Mar 13, 2019
d811dc6
Merge pull request #9 from songdongdong123/Popular
songdongdong123 Mar 15, 2019
7095453
Merge pull request #10 from songdongdong123/Popular
songdongdong123 Mar 18, 2019
bfbf103
Merge pull request #11 from songdongdong123/Trending
songdongdong123 Mar 20, 2019
17cab04
Merge pull request #12 from songdongdong123/Trending
songdongdong123 Mar 20, 2019
ae3d374
Merge pull request #13 from songdongdong123/Trending
songdongdong123 Mar 21, 2019
5634073
Merge pull request #14 from songdongdong123/Trending
songdongdong123 Mar 22, 2019
e909968
Merge pull request #15 from songdongdong123/Favorite
songdongdong123 Mar 26, 2019
6c0d5cb
usercenter
songdongdong123 Mar 27, 2019
f0d5e0f
Merge pull request #16 from songdongdong123/UserCenter
songdongdong123 Mar 27, 2019
41c882e
usercenter
songdongdong123 Mar 28, 2019
b61df61
Merge pull request #17 from songdongdong123/UserCenter
songdongdong123 Mar 28, 2019
b955e82
Assembler mode
songdongdong123 Apr 1, 2019
db218e9
Merge pull request #18 from songdongdong123/UserCenter
songdongdong123 Apr 1, 2019
989598e
languageDao
songdongdong123 Apr 2, 2019
77db7ca
Merge pull request #19 from songdongdong123/UserCenter
songdongdong123 Apr 2, 2019
4e90bf3
theme
songdongdong123 Apr 4, 2019
ad48fee
themecolor
songdongdong123 Apr 4, 2019
0f9c0d0
Merge pull request #20 from songdongdong123/UserCenter
songdongdong123 Apr 4, 2019
064b485
Search
songdongdong123 Apr 6, 2019
63ce4b2
Search
songdongdong123 Apr 6, 2019
3f25209
Merge pull request #21 from songdongdong123/Search
songdongdong123 Apr 6, 2019
1c0634b
全面屏配置&打包apk
songdongdong123 Apr 9, 2019
8a3db67
Merge pull request #22 from songdongdong123/Search
songdongdong123 Apr 9, 2019
79b0175
readme
songdongdong123 Apr 9, 2019
10ef556
Merge pull request #23 from songdongdong123/Search
songdongdong123 Apr 9, 2019
7da37f8
readme
songdongdong123 Apr 9, 2019
a73e8cc
Merge pull request #24 from songdongdong123/Search
songdongdong123 Apr 9, 2019
8821793
readme
songdongdong123 Apr 9, 2019
58bfd29
Merge pull request #25 from songdongdong123/Search
songdongdong123 Apr 9, 2019
abd2789
modify readme
songdongdong123 Apr 9, 2019
4ade07d
Merge pull request #26 from songdongdong123/Search
songdongdong123 Apr 9, 2019
c90491d
codepush
songdongdong123 Apr 10, 2019
5f6414f
Merge pull request #27 from songdongdong123/Search
songdongdong123 Apr 10, 2019
772a643
集成umeng统计SDK
songdongdong123 Apr 10, 2019
0e8e7b1
Merge pull request #28 from songdongdong123/Search
songdongdong123 Apr 10, 2019
9472c81
修改umeng统计
songdongdong123 Apr 11, 2019
5d49f38
Merge pull request #29 from songdongdong123/Search
songdongdong123 Apr 11, 2019
3a8531a
Update package.json
songdongdong123 Aug 21, 2019
9013296
Update package.json
songdongdong123 Aug 21, 2019
4c03cae
Bump acorn from 5.7.3 to 5.7.4
dependabot[bot] Mar 14, 2020
a7283b5
Merge pull request #31 from songdongdong123/dependabot/npm_and_yarn/a…
songdongdong123 Mar 14, 2020
e92c220
Create LICENSE
songdongdong123 Mar 18, 2022
23a7141
Merge pull request #53 from songdongdong123/add-license-1
songdongdong123 Mar 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 songdongdong123

Permission is hereby granted, free of charge, to any person obtaining a copy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test pending

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test pending reply

of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# Github_RN
nothing
# GitHub Popular

这是一个用来查看GitHub最受欢迎与最热项目的App,它基于React Native支持Android和iOS双平台。

## 目录

* [下载](#下载)
* [功能](#功能)
* [运行调试](#运行调试)

## 下载
![APP QRcode](https://github.com/songdongdong123/Github_RN/blob/master/assets/qrcode.png)

## 功能

* 支持订阅多种编程语言;
* 支持添加/删除编程语言;
* 支持自定义语言/标签,排序;
* 支持收藏喜欢的项目;
* 支持多种颜色主题自由切换;
* 支持搜索,并自持自定义订阅关键字;

## 运行调试

1. 准备React Native环境,可参考: [getting-started](https://reactnative.cn/docs/0.51/getting-started.html)。
2. Clone [GitHub Popular](https://github.com/songdongdong123/Github_RN.git),然后终端进入项目根目录。
3. 终端运行 `npm install`||`yarn install`。
4. 然后运行 `react-native run-android` || `react-native run-ios`。
26 changes: 25 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ project.ext.react = [
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

/**
* Set this to true to create two separate APKs instead of one:
Expand All @@ -102,7 +103,15 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionName "1.0.0"
}
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
Expand All @@ -113,11 +122,19 @@ android {
}
}
buildTypes {
releaseStaging {
buildConfigField "String", "CODEPUSH_KEY", '"<INSERT_STAGING_KEY>"'
}
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '"<INSERT_PRODUCTION_KEY>"'
}
}
lintOptions {
checkReleaseBuilds false
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
Expand All @@ -134,11 +151,18 @@ android {
}

dependencies {
implementation project(':react-native-code-push')
implementation project(':react-native-webview')
implementation project(':react-native-splash-screen')
implementation project(':react-native-vector-icons')
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.umeng.umsdk:common:2.0.0'
implementation 'com.umeng.umsdk:utdid:1.1.5.3'
implementation 'com.umeng.umsdk:analytics:8.0.0'
implementation 'com.umeng.umsdk:push:5.0.2'
}

// Run this once to be able to run the application with BUCK
Expand Down
19 changes: 18 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<application
android:name=".MainApplication"
android:label="@string/app_name"
Expand All @@ -22,6 +29,16 @@
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data
android:name="UMENG_APPKEY"
android:value="5caac8a63fc1955789000d88" />
<meta-data
android:name="UMENG_CHANNEL"
android:value="Github_RN" />
</application>

<!-- android全面屏适配 -->
<meta-data
android:name="android.max_aspect"
android:value="2.2"
/>
</manifest>
31 changes: 31 additions & 0 deletions android/app/src/main/java/com/github_rn/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
package com.github_rn;

import android.nfc.Tag;
import android.os.Bundle; // here
import android.util.Log;


import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

import org.devio.rn.splashscreen.SplashScreen; // here

import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

public class MainActivity extends ReactActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this); // 添加这一句
super.onCreate(savedInstanceState);
// 注意:如果您已经在AndroidManifest.xml中配置过appkey和channel值,可以调用此版本初始化函数。
UMConfigure.init(this, "5caac8a63fc1955789000d88", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, null);
// interval: 单位是毫秒,默认Session间隔时间是30秒
UMConfigure.setLogEnabled(true);
UMConfigure.setProcessEvent(true);
MobclickAgent.setSessionContinueMillis(30000);
}

public void onResume() {
super.onResume();
MobclickAgent.onResume(this);
}
public void onPause() {
super.onPause();
MobclickAgent.onPause(this);
}

/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
Expand Down
23 changes: 22 additions & 1 deletion android/app/src/main/java/com/github_rn/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.microsoft.codepush.react.CodePush;
import com.reactnativecommunity.webview.RNCWebViewPackage;
import org.devio.rn.splashscreen.SplashScreenReactPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import com.github_rn.invokenative.DplusReactPackage;
import com.github_rn.invokenative.RNUMConfigure;
import com.umeng.commonsdk.UMConfigure;


import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {

@Override
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}

@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
Expand All @@ -25,8 +39,12 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
new RNCWebViewPackage(),
new SplashScreenReactPackage(),
new VectorIconsPackage(),
new RNGestureHandlerPackage()
new RNGestureHandlerPackage(),
new DplusReactPackage()
);
}

Expand All @@ -45,5 +63,8 @@ public ReactNativeHost getReactNativeHost() {
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
// UMConfigure.setLogEnabled(true);
// UMConfigure.setProcessEvent(true);
// RNUMConfigure.init(this, "5caac8a63fc1955789000d88", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, null);
}
}
Loading