Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
/ teleposter Public archive

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Lk Else committed Nov 23, 2016
1 parent 9c975ef commit e83ab90
Show file tree
Hide file tree
Showing 26 changed files with 607 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
21 changes: 20 additions & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
@@ -1 +1,20 @@
teleposter # Teleposter

This app is a completely independent wrapper made for Telegra.ph.

With this app it's very easy to create and share posts directly to Telegram.

These posts are marked with "Instant View" and are able to open "instantly" in Telegram. If you don't believe how fast that is, try yourself!

Telegra.ph is quite similar to Medium.com.

## LICENSE

```
NewsCatchr Copyright © 2016 Jan-Lukas Else
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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Binary file added apks/0.1.apk
Binary file not shown.
27 changes: 27 additions & 0 deletions app/build.gradle
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,27 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "telegra.ph"
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "0.1 beta"
}
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile 'com.android.support:appcompat-v7:25.0.1'
}
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1 @@

22 changes: 22 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="telegra.ph">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:icon="@drawable/telegraph"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
69 changes: 69 additions & 0 deletions app/src/main/java/telegra/ph/MainActivity.java
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,69 @@
package telegra.ph;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

private WebView webView;
private WebSettings webSettings;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);


webView = (WebView) findViewById(R.id.webView);
webSettings = webView.getSettings();

// Enable Javascript
webSettings.setJavaScriptEnabled(true);

webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
return true;
}
});

webView.setWebChromeClient(new WebChromeClient() {

});

// Load Telegra.ph
webView.loadUrl("http://telegra.ph");

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.share:
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TITLE, webView.getTitle());
shareIntent.putExtra(Intent.EXTRA_TEXT, webView.getUrl());
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
Binary file added app/src/main/res/drawable-nodpi/telegraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
8 changes: 8 additions & 0 deletions app/src/main/res/menu/activity_main.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/share"
android:title="@string/share"
app:showAsAction="always"/>
</menu>
6 changes: 6 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">Teleposter</string>
<string name="share">Share</string>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>

<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-alpha1'
}
}

allprojects {
repositories {
jcenter()
}
}
17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,17 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,6 @@
#Wed Nov 23 23:25:53 CET 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-bin.zip
Loading

0 comments on commit e83ab90

Please sign in to comment.