Nessuna descrizione

vaeringjar d12a51b0b8 Copied over the remaining useful bits from the origin project readme. Updated the makefile to default to a prompt. 7 anni fa
content 095e7432d4 added the default files and fixed the make process 7 anni fa
make 095e7432d4 added the default files and fixed the make process 7 anni fa
plugins 095e7432d4 added the default files and fixed the make process 7 anni fa
.gitignore 31148b43b6 added missing ignore file. moved wireup to its own file and step in the makefile 7 anni fa
README.md d12a51b0b8 Copied over the remaining useful bits from the origin project readme. Updated the makefile to default to a prompt. 7 anni fa
makefile d12a51b0b8 Copied over the remaining useful bits from the origin project readme. Updated the makefile to default to a prompt. 7 anni fa

README.md

hunreds2

About

This picks up from the first Hundreds project, with the intent to not include IDE specific code and files, but instead only including the commands for the frameworks. I plan on merging these together later.

The original hundreds project proof of concept boilerplate allowed users (at compile time) to sandbox a website, either from the web or locally, in the android.webkit.WebView.

License

Copyright 2017 vaeringjar
Licensed as GLPv3+
https://www.gnu.org/licenses/gpl-3.0.html

Dependencies

Android SDK

Troubleshooting

Some API want the following added to the menu item:

 app:showAsAction="never"

Customization

An updated version from the original project follows:

Fork Hundreds

If you would like to fork Hundreds to install many instances with different configurations, and if you use Gradle, make sure to update your Hundreds/app/build.gradle file with a distinct applicationId. Most of these use descending (reverse) domain names, but you can really use anything you like.

If you do not fork Hundreds, each time you install a "new" application configuration build, Android will recognize the apk as an update rather than a separate app.

Customize the Name

To change the name, open AndroidManifest.xml and change either the references for any of these:

android:label="@string/app_name"

Or update the values in strings.xml:

<resources>  
    <string name="app_name">Hundreds</string>  
    ...  
</resources>  

Customize the App Icon

To add a customized icon, update the reference in the AndroidManifest.xml:

android:icon="@drawable/ic_launcher"

Then update the files in the res/drawable folders. Each of the folders holds a different icon for a different screen density. Other projects might have higher or lower density folders, in addtion to these.

drawable-mdpi/ic_launcher.png //48px x 48px
drawable-hdpi/ic_launcher.png //72px x 72px
drawable-xhdpi/ic_launcher.png //96px x 96px
drawable-xxhdpi/ic_launcher.png //144px x 144px

For the reference in the AndroidManifest.xml to match, each density variation needs the same file name.

Optionally, you can put one large icon, for example 512px x 512px, in Hundreds/app/src/main/res/drawable-xxhdpi and your device will render it at run time. This makes it easier to maintain, but it might produce a lower quality icon when displaying the file.

Local File System

In the assets/root directory, place the complete website. At the very least, place an index.html file. The default build will look like this:

/hundreds2/output/hundreds/assets/root/index.html
/hundreds2/output/hundreds/assets/root/main.html

In the MainActivity.java, set the flag loadLocal to true. This will tell Hundreds to look at the file system instead of an internet website.

private boolean loadLocal = true;

Internet Website

In the MainActivity.java, set the flag loadLocal to false. This will tell Hundreds to look at a website domain name instead of in the local assets/root directory.

private boolean loadLocal = false;

In HundredsSandbox.java, set the desired protocol and domain name for the internet website. For example:

public final static String PROTOCOL_HTTP = "http://";
public final static String DOMAIN_INTERNET = "peers.community";