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

Rewrite notification code to compile SDK 23+ #1

Open
wants to merge 277 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
277 commits
Select commit Hold shift + click to select a range
08573d2
Wrap problematic unregisterReceiver by try-catch
Dec 19, 2017
26349be
Remove redundant code. Refresh screen onResume.
Dec 19, 2017
b0de9c9
Actualize notification
Dec 19, 2017
8b5eabd
Change main application screen
Dec 19, 2017
1598dc3
Implement open in browser
Dec 19, 2017
2f33a3c
Reset document root preference to default if empty or absent
Dec 20, 2017
a7f498d
Make default home page mobile friendly
Dec 20, 2017
7caab93
Restart server if settings changed
Dec 20, 2017
5648d73
Lint inspection performed
Dec 20, 2017
f10da78
Allow fill backup
Dec 20, 2017
6f8b259
Fix deldeted permission INTERNET
Dec 20, 2017
02c9887
Bump version to v00.03.00b
Dec 20, 2017
cde3491
Directory listing.
Dec 20, 2017
6fc6c14
Sort directory listing
Dec 21, 2017
1e6ac58
Directory index page tweak
Dec 22, 2017
b8c3f7f
Handle directory not found
Dec 22, 2017
8c10453
Optimaze file/directory exists check code
Dec 22, 2017
33eaea7
New application icon
Dec 22, 2017
c56a031
Better application icon
Dec 22, 2017
a94fc72
Remove low resolution application icons
Dec 22, 2017
7ecc294
Bump version to v00.04.00b
Dec 22, 2017
929fb69
Tethering AP operation mode
Dec 22, 2017
18e68f9
File name to URL and back
Dec 23, 2017
f9dd111
Icons for web and type dependant
Dec 29, 2017
45da748
Bump version to v00.05.00b
Dec 29, 2017
0613e58
Add empty line for fdroid patch
Jan 8, 2018
b6cb5da
Use app icon for notification
Jan 8, 2018
975c3ac
Add general information to README
Jan 8, 2018
75a7899
Redisign start screen
Jan 8, 2018
94b8706
Change variable sring color to yellow
Jan 8, 2018
dcf8c92
Comment about F-Droid patch reserved strings
Jan 8, 2018
eccefcd
Correct patch reserved strings
Jan 8, 2018
84d4b7b
Add another empty line to patch reserved area
Jan 8, 2018
1cb6458
Correct application id
Jan 8, 2018
ae041c3
Bump version to v00.06.00b
Jan 8, 2018
ed51bf9
Update README
Jan 10, 2018
06f4f90
Bump version to 01.00.00
Jan 10, 2018
3bf40ba
Update LICENSE
mvbasov Jan 11, 2018
ef268fd
Personalize license
Jan 11, 2018
471ea51
Fix link to LICENSE
Jan 11, 2018
34a7fcc
Update README.md
mvbasov Jan 11, 2018
97ff16d
Change README title. Fix link to source code.
mvbasov Jan 11, 2018
2195143
Add Google Play badge to README
Jan 11, 2018
175ee7e
Change Google Play badge size
mvbasov Jan 11, 2018
5feb47a
Fix release v01.00.01
Jan 12, 2018
e5a6999
Fix release v01.00.01
Jan 12, 2018
fadcfa3
Optimize README for mobile view
mvbasov Jan 13, 2018
6b194cc
Set min SDK to 16
Jan 16, 2018
bee3ca5
Check DocumentRoot and Port before set
Jan 16, 2018
96d397f
Detect and dicable 0.0.0.0 IP address
Jan 16, 2018
7ab6155
Remove unused import
Jan 16, 2018
23b9f53
Display requested file in main screen log
Jan 16, 2018
6beb22d
Consolidate main screen log code in one place
Jan 17, 2018
44de2b7
Make notification persistent
Jan 17, 2018
cc8808f
Redesign screen log messages
Jan 17, 2018
9f6ecf5
Combine from mobile and desktop dev session
Jan 17, 2018
eafef81
Merge branch 'master' of ssh://gitolite@basov.net:2222/lWS
Jan 17, 2018
5d2e241
Merge branch 'master' of basov.net:lWS
Jan 17, 2018
7e83b59
Code cleanup
Jan 17, 2018
1390d83
Fix NPE
Jan 17, 2018
b8b8427
Fix Unable to find explicit activity class
Jan 17, 2018
67e5779
Fix set default preferences
Jan 17, 2018
5d2219b
Run service as started to fix stability issue
Jan 17, 2018
f2a66c1
Betta not debugable for GP betta testing
Jan 17, 2018
a889b46
Bump version to v01.01.00b
Jan 17, 2018
d20eaa0
Merge branch 'master' of https://github.com/mvbasov/lWS
Jan 17, 2018
382efbb
Fix NPE
Jan 18, 2018
eb84650
Run service in foreground
Jan 18, 2018
2513da0
Add stop service button to notification
Jan 18, 2018
1dd290f
Remove debug code
Jan 18, 2018
86e678b
Bump version to v01.02.00b
Jan 18, 2018
d463781
Fix NumberFormatException exception
Jan 18, 2018
722356c
Bump version to v01.03.00b
Jan 18, 2018
15f2a7d
Display app version at start
Jan 19, 2018
18bb960
Fix set default document root
Jan 19, 2018
6701c1e
Fix maximum port value
Jan 19, 2018
e80073f
Use canRead() to check document root
Jan 19, 2018
7bf53e8
Bump version to v01.04.00b
Jan 19, 2018
9bc4eb5
Fix stop service from notification
Jan 20, 2018
7e7c9ac
Make log selectable
Jan 20, 2018
28b9ddf
Remove redundant code
Jan 20, 2018
af73309
Add / to end of documentRoot path
Jan 20, 2018
f2bf5ea
Fix empty document root issue
Jan 20, 2018
69e3411
Move default document root index content to string resource
Jan 20, 2018
d287ac6
Simplify code
Jan 20, 2018
8fcb81b
Bump version to v01.05.00b
Jan 20, 2018
acf8b56
Display connection diagnostic on log screen
Jan 21, 2018
0645401
Merge branch 'master' of ssh://gitolite@basov.net:2222/lWS
Jan 21, 2018
f50a2ed
Fix default root creation on legacy devices
Jan 22, 2018
f666ffa
onActivityResult problem workarround
Jan 22, 2018
ca00cdb
Version bumped to v01.06.00b
Jan 22, 2018
e27edcd
Enable ProGuard for betta and release
Jan 22, 2018
8afa9c6
Add app/proguard-rules.txt
Jan 22, 2018
68e6e24
Bump version to v01.07.00b
Jan 22, 2018
7c6bf83
Fix issue with return from preferences
Jan 22, 2018
6a995d3
Bump version to v01.08.00b
Jan 22, 2018
92363d3
Code cleanup
Jan 23, 2018
61138c1
Remove not actual message
Jan 23, 2018
f3d5a70
New button 'Send URL'
Jan 23, 2018
5b9da2a
Bump version to v01.09.00b
Jan 23, 2018
d2546c5
Add subject to 'Send URL'
Jan 23, 2018
c8b392b
Write changelog for all published versions
Jan 23, 2018
5909b4d
Add ProGuard mapping files to .gitignore
Jan 23, 2018
59c6eae
Automaticaly copy GuardPro mapping file
Jan 23, 2018
4061e5a
Fix 'Use OI File Manager' preference issue
Jan 24, 2018
8c53bf8
Bump version to v01.10.00b
Jan 24, 2018
f389f52
Write previous version changeleog
Jan 24, 2018
58e4447
Add tethering mode switch off detection.
Jan 24, 2018
c1357fa
Supress multiply similar messages
Jan 24, 2018
0345662
Make log more informative
Jan 24, 2018
63a4a2d
Bump version to v01.11.00b
Jan 24, 2018
c88dbbe
Add current beta changelog
Jan 24, 2018
77d8e4a
Fix empty port strings issue
Jan 25, 2018
fe52ab8
Don't suppress toast about wifi connection
Jan 25, 2018
5eab1e9
Code cleanup.
Jan 25, 2018
0a0ec4a
Comment about 'Socket closed' message in sorce
Jan 25, 2018
5a6930e
Update github README
Jan 25, 2018
a3a31d3
Apdate CHANGELOG for release
Jan 25, 2018
36b7530
Bump version to v02.00.00
Jan 25, 2018
b8efb10
Add release commit info to CHANGELOG
Jan 25, 2018
0798c68
Fix service restart if configuration changed
Jan 25, 2018
575e391
Merge restart after configuration changed fix.
Jan 26, 2018
4ff6abf
Add QR Code URL function
Jan 26, 2018
a2077c8
Bump version to v02.02.00b
Jan 26, 2018
748e543
Make variable values on main screen clickable
Jan 27, 2018
b710d5e
Colorize IP address
Jan 27, 2018
5fd6388
Click on main screen values call specific setting
Jan 27, 2018
6c841fc
CHANGELOG. Commit information about v02.01.00b
Feb 1, 2018
1baeb12
Support QR code plugin call.
Feb 1, 2018
2b37592
Check both lWS QR and zxing barcode generators
Feb 1, 2018
e329d5f
Bump version to v02.02.00b
Feb 1, 2018
b8e6ca9
Add comiit v02.02.00b information
Feb 1, 2018
d1625f6
Make several variables name more meaningful
Feb 2, 2018
4baa0ca
Move QR plugin related id to string resource
Feb 2, 2018
0b77ff1
Offer to instull OI File manager
Feb 2, 2018
b285409
Use string resource to offer corresponding package
Feb 2, 2018
7fb3791
Bump version to v02.03.00b
Feb 2, 2018
39f4430
Update CHANGELOG before release
Feb 8, 2018
579b06e
Bump version to v03.00.00
Feb 8, 2018
e6f5161
Fix lWS QR instalation URL
Feb 9, 2018
98a7618
Update CHANGELOG
Feb 9, 2018
59d46e2
Bump version to v03.00.01
Feb 9, 2018
f9890b7
Add placeholder for fdroid patch
Feb 9, 2018
7b5c3f8
Use buffered I/O for files
Feb 19, 2018
9c9196e
Set default mime type to application/octet-stream
Feb 19, 2018
53f6419
Bump version to v03.00.02
Feb 19, 2018
928374e
Start support partial content implementation
Feb 20, 2018
b06ce4f
Provide charset only for text files
Feb 20, 2018
02d4634
Start 206 partial content implementation
Feb 20, 2018
7a3c7bd
Add multipart range.
Feb 20, 2018
3ee8c1d
Handle 404 error for multi part get
Feb 21, 2018
c91d6c3
Handle -xxx range
Feb 21, 2018
1e8d89b
Code cleanup
Feb 21, 2018
4924c19
Handle HTML error 416
Feb 21, 2018
6141abe
Bump version to v03.01.00b
Feb 21, 2018
e533b55
Add several MIME types for video
Feb 21, 2018
1ba148c
Add audio MIME types
Feb 22, 2018
1a641d7
Last-Modified HTML head field
Feb 26, 2018
4a2d4f1
mplement HEAD request
Feb 26, 2018
13af687
Bump version to v03.02.00b
Feb 26, 2018
71bdd39
Use CRLF in HTTP headers according to RFC 2616
Feb 26, 2018
edf3039
Size and date of files in directory listing
Feb 26, 2018
3d336cc
Better directory listing design.
Feb 26, 2018
2afc227
Google material design icons file names
Feb 27, 2018
b9099fd
Add reference to table-sort project
Feb 27, 2018
a1ad0ca
Implement directory listing sort
Feb 27, 2018
6897fe2
Bump version to v03.03.00b
Feb 27, 2018
ecfb875
Directory listing: Use vector graphics for icons
Feb 28, 2018
8d96763
Directory index design
Feb 28, 2018
0efab1b
Bump version to v03.04.00b
Feb 28, 2018
db0459c
Add MIME type for favicon.ico
Feb 28, 2018
530fea3
Optimize HTML
Feb 28, 2018
2506473
Black strock arround folder icon
Mar 3, 2018
e9feaf3
Fix print Infinity in file size
Mar 5, 2018
d950772
Use Feather project icons for directory listing
Mar 5, 2018
b0adb82
Merge conflict solve
Mar 5, 2018
790af9c
Fix directory with UTF-8 filenames listing issue
Mar 6, 2018
7f3ae3b
Tweak directory index design
Mar 6, 2018
6d43127
Code correction after lint analyzing
Mar 6, 2018
4ccb846
Bump version to v03.05.00b
Mar 6, 2018
97ffcaa
Default favicon.ico (draft)
Mar 7, 2018
fbfc2de
Default favicon.ico
Mar 7, 2018
89eadf2
icon for source code files
Mar 7, 2018
97bb392
et 2018 copyright note
Mar 7, 2018
52442d2
Code cleanup
Mar 7, 2018
c6718fa
Set code icon for .js and .css
Mar 7, 2018
3a1c437
Set icon for parent folder
Mar 7, 2018
cf99af0
Set original Feather project icons names
Mar 7, 2018
37049bd
Directory index, perent directory icon
Mar 7, 2018
372ca97
Bump verion to v03.06.00b
Mar 7, 2018
edcf433
Beta changelog update
Mar 7, 2018
d747f64
Bump version to v04.00.00
Mar 12, 2018
6fa77a0
Update changelog
Mar 12, 2018
de9cd93
Change lWS.QR call according to new API
Jul 9, 2018
63ea912
Bump verion to v04.01.00b
Jul 11, 2018
1bda4e4
Fix wrong version from v04.10.00b to v04.01.00b
Jul 11, 2018
3d02fb5
Increase target API from 21 to 26
Jul 11, 2018
a6960bc
Set dark app theme after switch to API 26
Jul 11, 2018
7a05764
Update beta change log. Bump verion to v04.02.00b
Jul 12, 2018
2145b67
Bump version to v05.00.00
Jul 12, 2018
36bbf88
Update gradle configuration for Android Studio 3.2
Oct 3, 2018
462fd90
Bump version to v05.01.00b
Oct 3, 2018
b1eef53
Add F-Droid badge
Oct 22, 2018
dd1eb00
Fix string resource for F-Droid build
Oct 22, 2018
9538229
Bump version to v05.01.01 for F-Droid build
Oct 22, 2018
64632fd
Fix gradle configuration for F-Droid build
Oct 22, 2018
bf50d54
Bump version to v06.00.00. This is fake version.
Oct 23, 2018
594ac2b
Enable Travis CI
Oct 29, 2018
2d700c4
Fix README images
Oct 29, 2018
405efcf
Crop F-Droid badge
Oct 29, 2018
57f1909
Make markets badgese the same size.
mvbasov Oct 29, 2018
b9d4bd2
Use external badges
Oct 29, 2018
2343cee
minSdk is 10
niccokunzmann Nov 6, 2018
bf9e2ea
use commit instead of apply
niccokunzmann Nov 4, 2018
c3f8d44
make notification optional
niccokunzmann Nov 4, 2018
2138583
Merge pull request #2 from niccokunzmann/master
mvbasov Nov 6, 2018
af0813c
Disable "QR CODE" button if run on SDK < 16
Nov 9, 2018
8915011
Fix notification for Android P (9)
May 9, 2019
05c6351
Bind to loopback as fallback
May 9, 2019
9342455
Set notification channel only if need
May 9, 2019
e539a9d
Update changelog. Bump version to v06.01.00b.
May 10, 2019
728324c
Update travis ci configuration
May 10, 2019
4f9205c
Fix UTF-8 encoded document root
May 10, 2019
141289b
Set FOREGROUND_SERVICE permission if need
May 10, 2019
901721c
Request permission if need
May 10, 2019
521f4fb
Update changelog. Bump version to v06.02.00b.
May 10, 2019
622503e
Get real IP of hotspot
May 11, 2019
eb7dada
Add Uri scheme to lWS.QR call
May 11, 2019
7b09fc4
Fix getAPIpAddress()
May 17, 2019
3e1a6df
Add ap0 as possible tethering interface
May 17, 2019
eb16c0c
Fix screen state when server stoped from notification
May 18, 2019
1b3161b
Update changelog. Bump version to v06.03.00b.
May 19, 2019
1dbe64e
Disable annoying notification sound
May 19, 2019
f48836a
Update CHANGELOG. Bump version to v07.00.00.
May 20, 2019
2f383be
Fix version name
May 20, 2019
d945b4b
Update (c) date.
May 20, 2019
e1ceaee
build.gradle fix typo
stokito Jul 23, 2020
31cb26d
ServerHandler: replace substring(0, n).equals() calls with startsWith()
stokito Jul 23, 2020
df760f9
Use primitive int and remove unused initializers
stokito Jul 23, 2020
4908183
Rename constructor params.
stokito Jul 23, 2020
efb7d61
PartialRange: migrate to primitive long
stokito Jul 23, 2020
195407e
Rename methods: abbreviations follows camel case
stokito Jul 23, 2020
9174074
Move MIME to Constants
stokito Jul 23, 2020
97602c8
MIME: remove non needed cloning to new ArrayList
stokito Jul 23, 2020
60209d2
MIME: extract MimeType class
stokito Jul 23, 2020
f846910
directoryHtmlIndex(): init array list woth capacity
stokito Jul 23, 2020
160af16
extract precompiled regexp patterns
stokito Jul 23, 2020
1e75cbb
Add first unit test
stokito Jul 23, 2020
4b26fde
Merge pull request #8 from stokito/cleanup
mvbasov Nov 12, 2020
2927de4
Update target SDK and adopt source for AndroidStudio 2024.1.1 Patch 1
Aug 9, 2024
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
9 changes: 0 additions & 9 deletions .classpath

This file was deleted.

43 changes: 31 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# Built application files
build/
app/apk/
app/debug/
app/release/
app/beta/

# Crashlytics configuations
/*/com_crashlytics_export_strings.xml

# Local configuration file (sdk path, etc)
local.properties
/*/local.properties

# Gradle generated files
.gradle/
gradlew.bat

# Signing files
/*/.signing/

.idea/

*.iml

# built application files
*.apk
*.ap_

# Files for the Dalvik VM
# files for the dex VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/
# built native files
*.o
*.so

# Local configuration file (sdk path, etc)
local.properties
# ProGuard mapping files
*_mapping.txt

# Proguard folder generated by Eclipse
proguard/
33 changes: 0 additions & 33 deletions .project

This file was deleted.

5 changes: 0 additions & 5 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: android
android:
components:
- tools
- platform-tools
# The BuildTools version used by your project
- build-tools-28.0.3
# The SDK version used to compile your project
- android-28
before_script:
- chmod ug+x ./gradlew
#- sed -i -e '/signingConfigs.debug/d' app/build.gradle
before_install:
- yes | sdkmanager "platforms;android-28"

26 changes: 0 additions & 26 deletions AndroidManifest.xml

This file was deleted.

138 changes: 138 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
#### v07.00.00 (g)
* Support Android O/P
* Fallback bind to loopback
* Several fixes

#### v06.03.00b (g1b3161b)
* Fix get AP IP address
* Fix screen state after switcing off service from notification

#### v06.02.00b (g521f4fb)
* Request permission if need
* FOREGROUND_SERVICE permission if need
* Fix UTF-8 encoded document root

#### v06.01.00b (g728324c)
* Fix notification for Android 9 (P) (API 28)
* Bind to loopback as fallback
* minSdk is 10

#### v06.00.00f (gbf50d54)
#### v05.01.02f (g64632fd)
#### v05.01.01f (g9538229)
* Fake versions to trigger F-Driod publish

#### v05.01.00b (g462fd90)
* Update gradle configuration for Android Studio 3.2

#### v05.00.00 (g2145b67)
* Change lWS.QR call according to new API

#### v04.02.00 (g7a05764)
* Increase target API from 21 to 26

#### v04.01.00 (g1bda4e4)
* Change lWS.QR call according to new API

### v04.00.00 (gd747f64)
* HEAD request and Last modified (incremental download)
* Multipart range (video seek)
* Directory index sort by name, date and size. New icons.
* Add MIME types for audio files
* Several fixes.

#### v03.06.00b (g372ca97)
* Default favicon.ico
* Prepare code for release

#### v03.05.00b (g4ccb846)
* New design of directory index page
* Fix bug with non ASCII file names v03.04.00b (g0efab1b)
* Tweak directory listing design

#### v03.03.00b (g6897fe2)
* Directory listing sort

#### v03.02.00b (g13af687)
Since this version incremental download is possible.
* Support Last-Modified
* Support HEAD request

#### v03.01.00b (g6141abe)
* Support partial content (allow to seek video).

### v03.00.00 (g579b06e)
* Add share URL by QR code.
* Offer to install external program if need
* Click on main screen variable values call corresponding settings.

#### v02.03.00b (g7fb3791)
* Offer to install OI File manager in attempt to use and it is not installed.

#### v02.02.00b (ge329d5f)
* support [QR code plugin](http://play.google.com/store/apps/details?id=net.basov.lws.qr.gpm")
* Interface tweaks

#### v02.01.00b (ga2077c8)
* Add QR Code URL function
* Fix service restart if configuration changed

### v02.00.00 (g36b7530)
* Another service model to stable run in background
* New 'Send URL' button
* Add button to stop service from notification
* More informative logging
* Minimal Android version is 4.1 now
* Check and fix wrong configuration values
* Fix several NPE, ANR and other bugs

#### v01.11.00b (g63a4a2d)
* Add tethering AP switch off detection
* More informative logging

#### v01.10.00b (g8c53bf8)
* Fix 'Use OI File Manager' preference issue
* Several build system tweaks

#### v01.09.00b (g5b9da2a)
* New 'Send URL' button

#### v01.08.00b (g6a995d3)
* Fix issue with return from preferences

#### v01.07.00b (g68e6e24)
* Beta release to test ProGuard settings

#### v01.06.00b (ca00cdb)
* Display connection diagnostic on log screen
* Fix default document root creation on legacy devices
* Fix restart on configuration changed on legacy devices

#### v01.05.00b (8fcb81b)
* Improve stop service from notification issue
* Make log selectable
* Fix several bugs

#### v01.04.00b (g7bf53e8)
* Display application version at start
* Fix configuration check and reset to default

#### v01.03.00b (g722356c)
* Fix NumberFormatException exception

#### v01.02.00b (g86e678b)
* Improve service stability
* Add button to stop service from notification
* Fix several NPE

#### v01.01.00b (ga889b46)
* Another service model to stable run in background
* Check and fix configuration values
* More informative logging
* Fix several bugs

### v00.01.01b (g9efcd5f)
* Fix 0 content length

### v01.00.00 (g06f4f90)
* 1-st public release.
13 changes: 8 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Expand Down Expand Up @@ -631,8 +631,9 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
lightweight Web Server (lWS) for Android.
Copyright (C) 2017,2018 Mikhail Basov
Copyright (C) 2009-2014 Markus Bode

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +653,9 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

{project} Copyright (C) {year} {fullname}
lWS Copyright (C) 2017,2018 Mikhail Basov
androidwebserver Copyright (C) 2009-2014 Markus Bode

This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -671,4 +674,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
73 changes: 56 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,56 @@
Webserver for Android
=====================

Smallest webserver for android. Works only when connected to a wifi-network. Use at your own risk and feel free to contribute :-)

Twitter: [@bodeme](https://twitter.com/bodeme)

License
=======
Android Webserver is licensed under the [GPLv3 License](COPYING).

Features
========
* GET-Requests
* Handling of ASCII and BINARY Files
* Tasker: List all tasks (http://example.org/tasker/)
* Tasker: Execute task (http://example.org/tasker/taskname)
## lightweight Web Server (lWS) for Android

<a href="https://play.google.com/store/apps/details?id=net.basov.lws.r"><img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="80" alt="Available on Google Play" /></a>
<a href="https://travis-ci.org/mvbasov/lWS"><img src="https://travis-ci.org/mvbasov/lWS.svg?branch=master" alt="Tavis CI Build Status" /></a>
<a href="https://f-droid.org/en/packages/net.basov.lws.fdroid/"><img src="https://f-droid.org/badge/get-it-on.png" height="80" alt="Available on F-Droid" /></a>

<table>
<tr>
<td width="20%"><img style="max-width:25%;height:auto" src="ic_launcher-web.png" alt="lWS" /><h3 align="center">lWS</h3></td>
<td width="80%">
<h3>It is ...</h3>
<ul>
<li>... Web Server for static content.</li>
<li>... lightweight. APK size less then 100 Kb.</li>
<li>... as simple as possible. Only essential features implemented.</li>
<li>... open. <a href="https://github.com/mvbasov/lWS">Source code</a> released under GPL-3.0.</li>
<li>... personal solution. It is not optimized/tested for many parallel connections and large file transfer.</li>
<li>... network state responsive. Require WiFi connected or tethering enabled. Service stop automatically if network disconnected.</li>
<li>... connect to lopback interface if no other available.</li>
</ul>
</td>
</tr>
</table>

### Derivate from
This project based on [another open source project](https://github.com/bodeme/androidwebserver)
Unfortunately, original project didn't maintained for 3 years.

### What is configurable
* Document root. Path may be entered as text or optional elected using OI File Manager.
* Port. May be from 1024 to 65535. Default is 8080
In attempt to set wrong value parameter automatically set to default.

### Document root
Document root by default set to application private directory. Example index file automatically created. It is safe configuration. You can place your pages in this directory. But be carefully! If you use Android 5.0 or above and deinstall the application this directory and it's content will be removed.

### "Open in browser" and "Send URL"
After server starts you can press "Open in browser" button for check.
You can send working server URL to another device by Bluetooth, Android Beam, E-Mail and other way available on your device.

### On screen log
The application has no permanent logging. I treat this as redundant functionality. I doing my best to make notification actual all time. On screen log actual only then application visible. Log screen may be cleared after returning from background.

### Security warning
You can change document root to any readable point of file system, but you need to understand what are you doing.
<b>Be careful: you could (suddenly?) create the configuration so way, than anyone on the same WiFi network could access to the data on your device either you don't like it.</b>
All files from document root and below available for reading without any restrictions to anyone who connected to network and known URL of the server.

### License
lWS is licensed under the [GPLv3 License](LICENSE) because [original project](https://github.com/bodeme/androidwebserver)
Directory listing sort based on [this project](https://github.com/wmentzel/table-sort) licensed under GPL-3.0

### Artwork
* File listing icons from [Feather project](https://feathericons.com/) released under MIT license.
* Application icon designed specially for this application.

Loading