Skip to content

Commit

Permalink
google play required library upgrades + spanish menu fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
andresoviedo committed Oct 28, 2021
1 parent 04bc63f commit d821859
Show file tree
Hide file tree
Showing 17 changed files with 231 additions and 175 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ but at least it's opened to anyone who wants to contribute or don't want to star

As this is my first android app and Im still learning the OpenGL 2.0 language, it is highly probable that there are bugs;
but I will try to continue improving the app and adding more features. So please send me your comments, suggestions or
complains by opening an [issue](https://github.com/andresoviedo/android-3D-model-viewer/issues) or email me to [email protected].
complains by opening an [issue](https://github.com/the3deers/android-3D-model-viewer/issues) or email me to [email protected].

The app comes with some included 3D models that have different licenses.

Expand Down Expand Up @@ -148,14 +148,14 @@ Glases

You may need one of this glasses to view models in 3D virtual reality.

[<img src="https://raw.githubusercontent.com/andresoviedo/android-3D-model-viewer/master/market/glasses-3d.jpg">](https://amzn.to/2E8LhxC)
[<img src="https://raw.githubusercontent.com/andresoviedo/android-3D-model-viewer/master/market/cardboard-3d.jpg">](https://amzn.to/2E8M1Tq)
[<img src="https://raw.githubusercontent.com/the3deers/android-3D-model-viewer/master/market/glasses-3d.jpg">](https://amzn.to/2E8LhxC)
[<img src="https://raw.githubusercontent.com/the3deers/android-3D-model-viewer/master/market/cardboard-3d.jpg">](https://amzn.to/2E8M1Tq)


Documentation
=============

https://github.com/andresoviedo/android-3D-model-viewer/wiki
https://github.com/the3deers/android-3D-model-viewer/wiki


Acknowledgement
Expand Down Expand Up @@ -192,6 +192,9 @@ ChangeLog

(f) fixed, (i) improved, (n) new feature

- 3.1.1 (28/10/2021)
- (f) google play required library upgrades
- (f) spanish menu fixed
- 3.1.0 (10/10/2020)
- (n) skybox
- (f) deleted unlicensed assets
Expand Down
20 changes: 12 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdk 31

defaultConfig {
applicationId "org.andresoviedo.dddmodel2"
minSdkVersion 14
targetSdkVersion 29
minSdk 16
targetSdk 31
}

signingConfigs {
Expand All @@ -27,12 +28,15 @@ android {
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation 'androidx.core:core:1.3.1'
implementation 'androidx.core:core:1.7.0'
implementation project(':engine')
}
Binary file modified app/build/outputs/apk/release/app-release.apk
Binary file not shown.
10 changes: 6 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.andresoviedo.dddmodel2"
android:versionCode="29"
android:versionName="3.1.0">
android:versionCode="30"
android:versionName="3.1.1">

<uses-sdk
tools:overrideLibrary="android.support.compat, android.arch.lifecycle" />
Expand All @@ -19,11 +19,13 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" android:largeHeap="true"
android:theme="@style/AppTheme"
android:largeHeap="true"
android:requestLegacyExternalStorage="true">
<activity
android:name="org.andresoviedo.app.model3D.MainActivity"
android:label="@string/app_name" >
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

public class MenuActivity extends ListActivity {

private static final String REPO_URL = "https://github.com/andresoviedo/android-3D-model-viewer/raw/master/models/index";
private static final String REPO_URL = "https://github.com/the3deers/android-3D-model-viewer/raw/master/models/index";
private static final int REQUEST_READ_EXTERNAL_STORAGE = 1000;
private static final int REQUEST_INTERNET_ACCESS = 1001;
private static final int REQUEST_READ_CONTENT_PROVIDER = 1002;
Expand All @@ -48,7 +48,7 @@ public class MenuActivity extends ListActivity {


private enum Action {
LOAD_MODEL, GITHUB, SETTINGS, HELP, ABOUT, EXIT, UNKNOWN, DEMO
LOAD_MODEL, CARGAR_MODELO, GITHUB, SETTINGS, HELP, AYUDA, ABOUT, ACERCA, EXIT, SALIR, UNKNOWN, DEMO
}

/**
Expand Down Expand Up @@ -84,18 +84,21 @@ public void onListItemClick(ListView l, View v, int position, long id) {
MenuActivity.this.startActivity(demoIntent);
break;
case GITHUB:
AndroidUtils.openUrl(this, "https://github.com/andresoviedo/android-3D-model-viewer");
AndroidUtils.openUrl(this, "https://github.com/the3deers/android-3D-model-viewer");
break;
case LOAD_MODEL:
case CARGAR_MODELO:
loadModel();
break;
case ABOUT:
case ACERCA:
Intent aboutIntent = new Intent(MenuActivity.this.getApplicationContext(), TextActivity.class);
aboutIntent.putExtra("title", selectedItem);
aboutIntent.putExtra("text", getResources().getString(R.string.about_text));
MenuActivity.this.startActivity(aboutIntent);
break;
case HELP:
case AYUDA:
Intent helpIntent = new Intent(MenuActivity.this.getApplicationContext(), TextActivity.class);
helpIntent.putExtra("title", selectedItem);
helpIntent.putExtra("text", getResources().getString(R.string.help_text));
Expand All @@ -104,6 +107,7 @@ public void onListItemClick(ListView l, View v, int position, long id) {
case SETTINGS:
break;
case EXIT:
case SALIR:
MenuActivity.this.finish();
break;
case UNKNOWN:
Expand All @@ -119,15 +123,15 @@ public void onListItemClick(ListView l, View v, int position, long id) {

private void loadModel() {
ContentUtils.showListDialog(this, "File Provider", new String[]{"Samples", "Repository",
"File Explorer", "Android Explorer"}, (DialogInterface dialog, int which) -> {
"Android Explorer", "File Explorer (Android <= 10)"}, (DialogInterface dialog, int which) -> {
if (which == 0) {
loadModelFromAssets();
} else if (which == 1) {
loadModelFromRepository();
} else if (which == 2) {
loadModelFromSdCard();
} else {
loadModelFromContentProvider();
} else {
loadModelFromSdCard();
}
});

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<string name="item">item</string>

<string-array name="menu_items">
<item>Load Model</item>
<item>Cargar Modelo</item>
<!--<item>Modelos</item>-->
<item>Demo</item>
<item>Ayuda</item>
Expand All @@ -24,9 +24,9 @@

<string name="image">imagen</string>
<!-- Help -->
<string name="help_text">Cargar modelo\n\nCarga las muestras incluidas con la the app (Samples), el repositorio de github (Repository) or descárgalas desde su dispositivo y ábrelas (usando Archivos o Android Explorer)\n\nFormatos admitidos\n\nSólo el frente de onda, la estereolitografía o archivos Collada (*.obj, *.stl, *.dae) están actualmente admitidos.\n\nDemo\n\nEjemplo de escena usando el API. Carga varios modelos usando diferentes modos de dibujo, colores, texturas, etc.\n\Renderizar\n\nUna vez que cargues un modelo, puedes pellizcar para hacer zoom, traducir la cámara con el dedo y girar la pantalla con 2 dedos\n\nHerramientas\n\nEn la barra de acción también encontrarás varios botones para cambiar los diferentes modos de dibujo, como esquema o puntos, activar o desactivar luces, texturas o animación.\n\nProblemas frecuentes\n\nSi el archivo de modelo está referenciando algún archivo de materiales (*.mtl) asegúrese que esté en la misma carpeta; lo mismo aplica para los archivos de texturas (*.jpg, *.bmp) a los que se hace referencia en el archivo de material.\n\nSi necesita más ayuda o tiene algún problema no dude en abrir un ticket en github o pregúnteme. Gracias de antemano por sus comentarios.\n\nhttps://github.com/andresoviedo/android-3D-model-viewer/issues\n\[email protected]</string>
<string name="help_text">Cargar modelo\n\nCarga las muestras incluidas con la the app (Samples), el repositorio de github (Repository) or descárgalas desde su dispositivo y ábrelas (usando Archivos o Android Explorer)\n\nFormatos admitidos\n\nSólo el frente de onda, la estereolitografía o archivos Collada (*.obj, *.stl, *.dae) están actualmente admitidos.\n\nDemo\n\nEjemplo de escena usando el API. Carga varios modelos usando diferentes modos de dibujo, colores, texturas, etc.\n\Renderizar\n\nUna vez que cargues un modelo, puedes pellizcar para hacer zoom, traducir la cámara con el dedo y girar la pantalla con 2 dedos\n\nHerramientas\n\nEn la barra de acción también encontrarás varios botones para cambiar los diferentes modos de dibujo, como esquema o puntos, activar o desactivar luces, texturas o animación.\n\nProblemas frecuentes\n\nSi el archivo de modelo está referenciando algún archivo de materiales (*.mtl) asegúrese que esté en la misma carpeta; lo mismo aplica para los archivos de texturas (*.jpg, *.bmp) a los que se hace referencia en el archivo de material.\n\nSi necesita más ayuda o tiene algún problema no dude en abrir un ticket en github o pregúnteme. Gracias de antemano por sus comentarios.\n\nhttps://github.com/the3deers/android-3D-model-viewer/issues\n\[email protected]</string>
<!-- About -->
<string name="about_text">Esta aplicación permite cargar modelos de objetos 3D (actualmente sólo se admiten los formatos Wavefront, Stereolithography y Collada).\n\nEl propósito de esta aplicación es aprender a dibujar en Android usando el lenguaje OpenGL 2.0.\n\nLa fuente de esta aplicación es de código abierto y se puede encontrar en https://github.com/andresoviedo/android-3D-model-viewer\n\nComo es mi primera aplicación para Android todavía estoy aprendiendo el lenguaje OpenGL 2.0, y es muy probable que tenga errores, así que seguiré mejorando la app.\n\nLos modelos incluidos en la aplicación fueron tomados gratuitamente de Internet.\n\nEsta aplicación no recoge ni hace uso de ningún tipo de información personal.\n\nCualquier comentario, sugerencia, contribución, reclamación o donación es bienvenida. Siéntase libre de contactarme en [email protected].\n\nhttp://www.andresoviedo.org</string>
<string name="about_text">Esta aplicación permite cargar modelos de objetos 3D (actualmente sólo se admiten los formatos Wavefront, Stereolithography y Collada).\n\nEl propósito de esta aplicación es aprender a dibujar en Android usando el lenguaje OpenGL 2.0.\n\nLa fuente de esta aplicación es de código abierto y se puede encontrar en https://github.com/the3deers/android-3D-model-viewer\n\nComo es mi primera aplicación para Android todavía estoy aprendiendo el lenguaje OpenGL 2.0, y es muy probable que tenga errores, así que seguiré mejorando la app.\n\nLos modelos incluidos en la aplicación fueron tomados gratuitamente de Internet.\n\nEsta aplicación no recoge ni hace uso de ningún tipo de información personal.\n\nCualquier comentario, sugerencia, contribución, reclamación o donación es bienvenida. Siéntase libre de contactarme en [email protected].\n\nhttp://www.andresoviedo.org</string>
<!-- Load settings -->
<string name="model_name">Nombre del modelo</string>
<string name="texture">Textura</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

<string name="image">image</string>
<!-- Help -->
<string name="help_text">Load Model\n\nLoad the samples included with the app (Samples), github repository (Repository) or download them to your device and open it (using File or Android Explorer)\n\nSupported formats\n\nOnly wavefront, stereolithography or Collada files (*.obj, *.stl, *.dae) are currently supported.\n\nDemo\n\nExample scene using the API. It loads several models using different draw modes, colors, textures, etc.\n\nRenderer\n\nOnce you load a model, you can pinch to zoom, translate the camera with your finger and rotate the screen with 2 fingers\n\nToolbar\n\nIn the action bar you will also find several buttons for toggling different draw modes like wireframe or points, enabling or disabiling lights, textures or animation.\n\nTroubleshooting\n\nIf the model file (.obj) is referencing any materials file (*.mtl) be sure its in the same folder; same applies for texture files (*.jpg, *.bmp) being referenced in the material file.\n\nIf you need more help or have any issue feel free to open a ticket in github or ask me. Thank you in advance for your feedback.\n\nhttps://github.com/andresoviedo/android-3D-model-viewer/issues\n\[email protected]</string>
<string name="help_text">Load Model\n\nLoad the samples included with the app (Samples), github repository (Repository) or download them to your device and open it (using File or Android Explorer)\n\nSupported formats\n\nOnly wavefront, stereolithography or Collada files (*.obj, *.stl, *.dae) are currently supported.\n\nDemo\n\nExample scene using the API. It loads several models using different draw modes, colors, textures, etc.\n\nRenderer\n\nOnce you load a model, you can pinch to zoom, translate the camera with your finger and rotate the screen with 2 fingers\n\nToolbar\n\nIn the action bar you will also find several buttons for toggling different draw modes like wireframe or points, enabling or disabiling lights, textures or animation.\n\nTroubleshooting\n\nIf the model file (.obj) is referencing any materials file (*.mtl) be sure its in the same folder; same applies for texture files (*.jpg, *.bmp) being referenced in the material file.\n\nIf you need more help or have any issue feel free to open a ticket in github or ask me. Thank you in advance for your feedback.\n\nhttps://github.com/the3deers/android-3D-model-viewer/issues\n\[email protected]</string>
<!-- About -->
<string name="about_text">This application allows you to load 3D object models (currently only Wavefront, Stereolithography and Collada formats are supported).\n\nThe purpose of this application is to learn how to draw in android using the OpenGL 2.0 language.\n\nThe code for this application is open source and it can be found at https://github.com/andresoviedo/android-3D-model-viewer\n\nAs this is my first android app and Im still learning the OpenGL 2.0 language, it is highly probable that there are bugs; but I will try to continue improving the app.\n\nThe included models in the app were taken for free from Internet.\n\nThis application does not collect or make use of any kind of personal information.\n\nAny comments, suggestions, contributions, complains or donations are welcome. Feel free to contact me at [email protected].\n\nhttp://www.andresoviedo.org</string>
<string name="about_text">This application allows you to load 3D object models (currently only Wavefront, Stereolithography and Collada formats are supported).\n\nThe purpose of this application is to learn how to draw in android using the OpenGL 2.0 language.\n\nThe code for this application is open source and it can be found at https://github.com/the3deers/android-3D-model-viewer\n\nAs this is my first android app and Im still learning the OpenGL 2.0 language, it is highly probable that there are bugs; but I will try to continue improving the app.\n\nThe included models in the app were taken for free from Internet.\n\nThis application does not collect or make use of any kind of personal information.\n\nAny comments, suggestions, contributions, complains or donations are welcome. Feel free to contact me at [email protected].\n\nhttp://www.andresoviedo.org</string>
<!-- Load settings -->
<string name="model_name">Model name</string>
<string name="texture">Texture</string>
Expand Down
14 changes: 2 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'

classpath "com.android.tools.build:gradle:7.0.3"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
31 changes: 16 additions & 15 deletions engine/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"

compileSdk 31

defaultConfig {
minSdkVersion 14
targetSdkVersion 29
minSdk 16
targetSdk 31
versionCode 1
versionName "1.0"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.core:core:1.3.1'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.core:core:1.7.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
6 changes: 4 additions & 2 deletions engine/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<manifest
package="org.andresoviedo.android_3d_model_engine"/>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.andresoviedo.android_3d_model_engine">
</manifest>
21 changes: 19 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
android.enableJetifier=true
android.useAndroidX=true
# 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=-Xmx2048m -Dfile.encoding=UTF-8
# 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
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading

0 comments on commit d821859

Please sign in to comment.