Android Resources OpenGLES 2.0 Example Force Closes - android

I have just recently started out programming for Android, and have decided that I want to learn how to use OpenGL ES 2.0. I googled around for an example and it turns out that in the resources section of the Android Developers Website there is one.
Link: http://developer.android.com/resources/tutorials/opengl/opengl-es20.html#touch
However, I am trying to run the first example and I get a force-close on my HTC EVO. I have tried literally copy and pasting the code from broswer to Eclipse, and adding the appropriate line in the manifest, but still no dice.
Any help here?

After reading carefully through that, turns out all i had to do was modify the activity in the manifest file. Problem Solved.

Related

Game Object working in scene and game view, but completely invisible in Android build

I have thoroughly searched on the web but I couldn't find anyone with my same problem.
I'm working on a 3D game for Android using Unity. Everything works fine within the editor and on the Unity Remote app, but when I build the project, install it on my smartphone and start it... I can't see a game object.
A screen of the project:
As you can see, the sword is active and visible in the editor, but once I start the actual build I get this:
I can't understand what's wrong, could someone kindly help me? Many thanks.
Does the material of the sword have the standart shader?
If so try one of the mobile ones.
Another idea would be to upgrade to one of the newer p versions of Unity.
Since the sword has a rigidbody, have you enabled gravity and somehow disabled collision and its falling through the ground?
Other than that, it could be a shader problem.
Problem solved. I upgraded from Unity 5.3.2 to 5.3.4, re-built the project and everything works like a charm now.
Sometimes Unity can be... strange.

problems in the helloworld app in Eclipse

I am new in developing apps for Android with Java Eclipse.
I get a simple problem: after following the procedure explained here:
http://www.tutorialspoint.com/android/android_hello_world_example.htm
I tried to push the "Finish" button to create my first app, but it doesn't work: the wizard remains open and nothing happens.
Also, I have several problems in the Demo apps, errors like:
'<>' source operator is not allowed for source level
and many more.
I guess I created problems with the configurations.
Thanks if you can help me to create my first app for Android and to load
the demos.
It is really had to tell what is the problem, but as Abdullah advised to use android studio because it is well designed to develop android applications. and most of the company's now days use android studio as there IDE preference, but still its developer's choice. Eclipse ADT plugin is buggy

Many many issues, eclipse, android MediaPlayer, etc

I've recently started android programming, and I'm extremely frustrated to say the least with a lot of things that to me seem simple but are totally holding me back from making any progress. The first of which is the "my first app" hello world that I started a tutorial from http://developer.android.com/training/basics/firstapp/creating-project.html
This tutorial worked fine when I was originally looking into android a while ago. Then when I came back after learning a bunch of java this program will no longer work unless I change the target-sdk to version 10 (I found that solution after extensive searching on this site).
Then I moved on to starting tutorials by thenewboston
All of these work fine as long as I didn't use any new targetsdkversion, so I'm wondering what happened that everywhere I go looking for tutorials I can't find anything that will actually work on the current ADT(4.4W and L are what my eclipse automatically set up) and eclipse (indigo). I'll also get issues saying lint isn't working, or trouble with android SDK content loader when I'm not even doing anything.
I've also found snippets of code example on the developer website that I linked earlier that don't work when implemented either
So, am I missing something, is that just old documentation, or is something up with eclipse and ADT? I'm just so frustrated that everything wants to bug out on me when I'm just trying to follow simple introductory tutorials and I don't even know where to turn for tutorials that I can trust to work..
edit:removed code because it wasn't needed.
To not get blocked What you can do is continue to set "targetVersion as '19'" instead of setting it to 20 or so. Ensure that you've downloaded API19 through SDK Manager and create the AVDs with that targetSDK version for checking you apps.
That way you can proceed ahead with your coding and later when things get resolved by google for API20...you can always comeback to that new version. This way you can follow 'TheNewBoston' and start coding in Android.
I also recommend 'Slidenerd' tutorials over youtube as well for the beginner.
BTW, I've also selected 'Blank Activity / Empty Activity" during the project creation with API19 and been able to move ahead with my coding.
The Google Bug thread about this latest version issue can be tracked here : The google bug
As a beginning developer, I suggest you use API 19. It has been out for a while and is more stable than L or Google Wear.

How to recreate Android 4.0 Lockscreen

I was wondering if it was possible to recreate the android 4.0 lockscreen within an application. I want to use it as the way to navigate through my app. Is it possible to pull the source of the lockscreen from a ROM and then modify it to fit? Does anyone know how it would be recreated? It doesn't seem like anyone's tried this before according to google or the similar questions on the side, any input is much appreciated!
As stated in this answer, the source code for the Android lock screen can be found in the platform/frameworks/policies/base Git repository, in the phone/com/android/internal/policy/impl/LockScreen.java file. You can read the instructions on how to download the Android source code here, or you can read the source file online here.
EDIT: I am sorry, I probably posted the source code for an older version of the lock screen than the one you were looking for (from sometime around 2010, I believe). Nevertheless, the Android lock screen from Ice Cream Sandwhich should probably be in the Android source code somewhere, so you should be able to just search a bit and hopefully find it.

android: GLWallpaperService causing green screen

I am trying to create a live wallpaper using opengl (<2.0).
I imported and tried to run Robert Green's GLWallpaperService and Example here (using Eclipse SDK).
My phone is a Huwei Ascend Android 2.1. I already know it can run other opengl LWPs.
When I run the package, it just produces a solid green screen, and no shapes or anything.
Ive researched it alot and still cant figure out why this is happening.
I read a few times that the namespaces have to be changed to my package. But still no luck...
I tried linking his GLWallpaperService JAR library to my package as per instructed. Nope.
Any guidance would be much appreciated.
I fixed this on my Galaxy Nexus by adding
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
to onSurfaceCreated in MyRenderer.java.
try gl.glScale() in your Renderer Code. I also got the same problem and i figured out that my GLView was so much zoomed that i cant see anything. try to reduce scale.
My program wo
The example project you linked to had bugs in the rendering code, as others here have pointed out. It has since been deprecated and deleted for maintenance\workload reasons.
However, there's currently some example wallpaper code embedded into the main repository of GLWallpaperService. It's set up as a full Android application so developers can test using that example as needed.

Categories

Resources