Google Glass default Immersion project doesn't work - android

I'm trying to fiddle with Google Glass for a project of mine. And when I created a new Immersion project, it cannot find any default Activity. And when I looked at the manifest, it doesn't have the usual <action android:name="android.intent.action.MAIN" /> and <category android:name="android.intent.category.LAUNCHER" /> in it so I added them. It can be played on the Glass now but it just showed another screen (or it's called a Card maybe? I'm still new in this.) and it just got dismissed automatically. Why did this happen? How do I fix this?
Thanks.

Nvm. I'll downgrade my GDK. But I don't know how actually. Anyway, I'll close this question and just try to find how to downgrade.

Related

What may cause my app display more than one icon on screen

My app re-create its icon every time after a re-install or device-reboot on specific device (MEIZU MX3 -> a popular device in China).
I have checked my uses-permission and no INSTALL_SHORTCUT found.
Can anybody give me some instruction to fix this? Thanks in advance for any help you are able to provide.
Perhaps you have used
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
with more than one activities in manifest. make sure, it is specified with launcher activity only. App icons for all those activities is displayed which have main category specified.
I have fixed it.
If you are using ShortcutBadger library. Disable it for MEIZU devices.
ShortcutBadger need some permissions may write something confused the launcher.
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/>

App doesn't show up on device

So I'm learning android programming and everything is going well, until I came to this problem.
I'm using android studio and transfer my app to my phone, this has worked well until now. The app start automatically and works fine, but when I go back to the home screen on my phone the app is not there, it's not saved on my phone. The problems is the same when using the emulator.
anyone know this problem?
Most probably you need a line in the android manifest that tells us that the app will appear in the launcher.
Check this link out :
https://groups.google.com/forum/m/#!topic/android-developers/csokbhepUG0
In your manifest, add this to your main activity:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You probably already have the MAIN action on the activity, you just need to add the category <category android:name="android.intent.category.LAUNCHER" /> so that it shows up on the launcher.

every class of application installing individually in the phone.

I developed an android application with no errors. It is installed in my phone and functioning perfectly but the only problem is, when I'm installing the application. It is installing all the classes in application individually and along with it my main application.
So, how should I prevent all the classes installing individually. please help me.
I am guessing that your AndroidManifest.xml has multiples of this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Which is causing multiple icons to be showed for each Activity
Find all the "extra" ones and delete them. This used to be an issue with the ADT plugin a while back (every time you made a new Activity via the wizard, it would auto add it with launcher attributes), you seem to be on an older version. You should update it.

Weird Message in Android Emulator

I keep getting this weird error message every time I'm testing my app on the Android emulator. It pops up every few seconds non-stop and constantly interrupts me. It's really annoying and I have no clue how to get rid of it, or what it even says. I guess it's in German but I tried translating it using Google, and made no sense of the body, only the title which barely made any sense.
Does someone know how to fix this problem?
Link to image: http://oi54.tinypic.com/v4bcqv.jpg
I'm a new user so I can't post images
*EDIT: I tried uninstalling all the applications I created from the emulator. The message is still there. Below is my manifest file (which someone said might be the cause of the problem): *
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="true" android:enabled="true">
<activity android:name=".QuizSplashActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="QuizGameActivity"></activity>
<activity android:name="QuizHelpActivity"></activity>
<activity android:name="QuizMenuActivity"></activity>
<activity android:name="QuizScoresActivity"></activity>
<activity android:name="QuizSettingsActivity"></activity>
</application>
PROBLEM FIXED: apparently all I had to do was replace the AVD with a new one
hey,
this is dutch and not german language. i also typed it in the google translator and thats what came out:
"Care, because the application component is enabled. malicious applications can use this to key phone functions off. an authorization must be carefully considered, since application components unusable, inconsistent, or could become unstable."
guess that can be caused by a missing entrance in the manifest file or something like that.
hope the better translation can help you a bit.
That is extremely weird, I've never seen anything like that before. Few questions to try and help you troubleshoot:
Does this happen with only one of your applications?
Are you using any third-party libraries?
When you try to run the application from a different computer, do you have this problem?
Is this only on the emulator or when you try to run it on your phone too?

Android app fails to load on some phones in PathClassLoader

I have an app, let us call it 'com.company.foo', with a main Activity 'FooBar'. In my AndroidManifest.xml, I have
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="FooBar"
android:label="#string/app_name"
android:configChanges="keyboardHidden|orientation" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
(where the dots contain other activities inside my app). In this form, it works fine on my HTC desire and on the emulator. However, a (very) small number of people who downloaded the app from the market report a crash with
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.foo/com.company.foo.FooBar}: java.lang.ClassNotFoundException: com.company.foo.FooBar in loader dalvik.system.PathClassLoader[/mnt/asec/com.company.foo-1/pkg.apk]
Someone suggested to replace the android:name="FooBar" with android:name=".FooBar", which again works fine on my phone and the emulator, but fails on some other devices. If I leave this attribute out altogether it will not let me install at all.
Any ideas?
I have an app published on Android Market. And sometimes I receive similar crash reports. Seems that's not your fault. This can be reproduced if your app is installed on SD card. Eject this card without unmounting it and run your app.
Additional information can be found here.
The code that you have shown is fine, can't see anything wrong with it - so what else have you looked at?
Have you checked the SDK level against the android release on teh phones that have failed? Any chance of some incompatability there?
Instantiating the activity I have found to my cost is a non-trivial matter and there are so many things to go wrong - you will have to go back over all your support files and make sure that they are clean but think about incompatabilities.
You have not said what imports are involved - have you tried cutting down your app to the bare minimum and see does it still cause problems with those small number of rogue phone - maybe you dont have access to the phones?
Try posting the phone makes/models that are causing problems, also where to access your app and there might be someone out here with the same make/model who would be willing to do some testing for you
Sorry I can't be more help,
Good Luck!!
Oliver

Categories

Resources