3dphotoshoot

changeset 18:dccbd7d65517

moved to android-19 to make it work with android 4.x
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 10 Jun 2015 18:53:28 +0300
parents aef7f51f6397
children 94b8ef9b8caa
files android/Makefile android/manifest.xml.in src/android/MainActivity.java
diffstat 3 files changed, 24 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/android/Makefile	Wed Jun 10 06:56:27 2015 +0300
     1.2 +++ b/android/Makefile	Wed Jun 10 18:53:28 2015 +0300
     1.3 @@ -2,7 +2,7 @@
     1.4  include $(root)/proj.mk
     1.5  
     1.6  # --- android settings ---
     1.7 -android_platform = android-22
     1.8 +android_platform = android-19
     1.9  name = $(bin)
    1.10  pkgprefix = com.mutantstargoat
    1.11  # ------------------------
    1.12 @@ -10,7 +10,7 @@
    1.13  src += $(wildcard $(root)/src/android/*.c)
    1.14  jsrc = $(wildcard $(root)/src/android/*.java)
    1.15  
    1.16 -obj = $(src:.c=.o) $(ccsrc:.cc=.o)
    1.17 +obj = $(src:.c=.o)# $(ccsrc:.cc=.o)
    1.18  lib = libs/armeabi/lib$(name).so
    1.19  apk-release = bin/$(name).apk
    1.20  apk-debug = bin/$(name)-debug.apk
    1.21 @@ -21,9 +21,10 @@
    1.22  CC = arm-linux-androideabi-gcc
    1.23  CXX = arm-linux-androideabi-g++
    1.24  
    1.25 -android_usr = $(NDK)/platforms/$(android_platform)/arch-arm/usr
    1.26 +#android_usr = $(NDK)/platforms/$(android_platform)/arch-arm/usr
    1.27  android_inc = -I$(native_app_glue_dir)
    1.28 -android_libs = -lstdc++ -llog -landroid -lEGL -lGLESv2
    1.29 +#android_libs = -lstdc++ -llog -landroid -lEGL -lGLESv2
    1.30 +android_libs = -llog -landroid -lEGL -lGLESv2
    1.31  
    1.32  defs += -DANDROID -DAPP_NAME=\"$(name)\"
    1.33  CXXFLAGS = -Wall -g $(defs) -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 \
    1.34 @@ -56,7 +57,7 @@
    1.35  
    1.36  $(lib): $(obj)
    1.37  	@mkdir -p libs/armeabi
    1.38 -	$(CXX) -o $@ -shared $(obj) $(LDFLAGS)
    1.39 +	$(CC) -o $@ -shared $(obj) $(LDFLAGS)
    1.40  
    1.41  ant_files = *.xml *.properties proguard-project.txt
    1.42  ant_dirs = bin libs res obj src gen
    1.43 @@ -97,3 +98,7 @@
    1.44  .PHONY: update-project
    1.45  update-project: build.xml
    1.46  	android update project -p . -t $(android_platform)
    1.47 +
    1.48 +.PHONY: logcat
    1.49 +logcat:
    1.50 +	adb logcat '$(name):V' 'DEBUG:V' '*:S'
     2.1 --- a/android/manifest.xml.in	Wed Jun 10 06:56:27 2015 +0300
     2.2 +++ b/android/manifest.xml.in	Wed Jun 10 18:53:28 2015 +0300
     2.3 @@ -4,7 +4,7 @@
     2.4  	android:versionCode="1"
     2.5  	android:versionName="1.0">
     2.6  
     2.7 -	<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21"/>
     2.8 +	<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
     2.9  
    2.10  	<uses-permission android:name="android.permission.CAMERA" />
    2.11  	<uses-feature android:name="android.hardware.camera" />
     3.1 --- a/src/android/MainActivity.java	Wed Jun 10 06:56:27 2015 +0300
     3.2 +++ b/src/android/MainActivity.java	Wed Jun 10 18:53:28 2015 +0300
     3.3 @@ -1,5 +1,6 @@
     3.4  package com.mutantstargoat.photoshoot3d;
     3.5  
     3.6 +import android.os.Bundle;
     3.7  import android.app.NativeActivity;
     3.8  import android.util.Log;
     3.9  import static android.opengl.GLES20.*;
    3.10 @@ -8,7 +9,6 @@
    3.11  import android.graphics.SurfaceTexture;
    3.12  
    3.13  /*
    3.14 -import android.os.Bundle;
    3.15  import android.content.Context;
    3.16  import android.hardware.camera2.*;
    3.17  */
    3.18 @@ -17,6 +17,18 @@
    3.19  	public static String tag = "photoshoot3d";
    3.20  	public static boolean frame_pending;
    3.21  
    3.22 +	/*
    3.23 +	static {
    3.24 +		System.loadLibrary("photoshoot3d");
    3.25 +	}
    3.26 +	*/
    3.27 +
    3.28 +	@Override
    3.29 +	protected void onCreate( Bundle savedInstanceState )
    3.30 +	{
    3.31 +		super.onCreate( savedInstanceState );
    3.32 +	}
    3.33 +
    3.34  	public static void foo()
    3.35  	{
    3.36  		glClearColor(0.2f, 1.0f, 0.3f, 1.0f);