app appears in Manage Applications, but not on the main menu - android

I'm using Eclipse to make an Android app. I've used it before and not had this problem. The console says everything installed ok, so I'm a little confused. I'm not sure what is relevant from logcat, but I can post it if you think that would help.
I've restarted Eclipse, ADB, the emulator, and the Mac several times in various orders and nothing has helped. I know it must be something simple but I haven't played around with this in a few months.
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hyser.pinpoint"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
</application>
<activity android:name=".pinpoint" android:label="pinpoint">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Your Activity needs to be inside of your application tag in your manifest
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name=".pinpoint" android:label="pinpoint">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
It's a similar issue to this:
Unable to start Service Intent

Your <activity> tag needs to be in the <application> block.

Is it possible your manifest does not refer to any activities? If you install an app with no activities in the manifest you will get this behavior.

Related

App installing on Cellphone but not showing on screen

I am developing an android application using android studio, which has 2 activity so far, LoginActivity and the MainActivity, But when I run the application it installs in my cellphone or virtual machine, but does not appear anywhere. I looked into the installed application and the application is installed. I believe my problem is on the Manifest, but I do not know how to solve it.
The complete code is here on GitHub: https://github.com/SoftwareEngineeringClass/MobileApplication/tree/master/Minerva
and here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity
android:name=".Minerva"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/app_name" >
<itent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</itent-filter>
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
</application>
I believe the first thing I'd do is set a breakpoint at the beginning of the launcher Activity and see if execution gets there or not. No matter what Logcat will tell you something is wrong. You have to run it in debug mode of course. Attach the debugger. If you give me all your code I'd be more than happy to take a look and give you a definitive answer quickly.
Do you know if you require permissions? , maybe it is the problem that not allow you to run. Also if you can share your activity I can help you.

Voice command not working on my glass app

My manifest file is as below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.demo.myglassapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="19" />
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="com.demo.myglassapp.MainActivity"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_start" />
</service>
</application>
</manifest>
voice trigger start file
<?xml version="1.0" encoding="utf-8"?>
<trigger keyword="#string/its_demo" />
My strings.xml file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">myglassapp</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="its_demo">Hello Sir</string>
</resources>
As per my knowledge I have added a code block
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
in manifest file. I created a voice trigger file and set a variable in it.
Now i call that variable from strings.xml file.
So, basically it is all correct but i do not see "Hello Sir" added to my OK GLASS menu.
When I run my application from Eclipse IDE, i do not see my menu after OK GLASS menu option.
In stead, I see my app directly running like it runs in Android phone when we set it in debug mode.
Any idea why it is not working?
I agree with Nicole. Maybe if you move some stuff around it may work. But, it depends a lot on how you are building your app. In my case, for example, the voice trigger intent is define for my activity, not my service (Similar to Nicole's case). However, I have seen some examples where the trigger is on the service. You can check those examples by creating a sample Android project in Eclipse.
Now, the reason why your app is opening after you run it similarly to a mobile is because you have this on your manifest
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You should remove that if you dont want that behavior
In your glass itself you say your application name it will show the list of app
Try this Hope this will help
I am new to glassware development.. but maybe try moving some things inside your application tag in manifest (instead of the service tag.. I do not have a service tag at all). Here's an example of my manifest file that works with voice recognition from the start menu...
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_start" />
</activity>
</application>`

App Not Showing in Apps

I'm debugging using my Samsung Galaxy S5 and every time I run it through Android Studio it works fine and it pops up the app, but then when I click out of it it doesn't show in all of my apps like other apps I've installed to my device. The app will show in my task manager after I close out of it but it still won't show in all of my apps. Really could use some help on this one, thanks.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="us.bisonsoftware.tab" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="Husky Athletics"
android:theme="#style/CustomActionBarTheme">
<activity
android:name=".TabBarExample"
android:label="Husky Athletics"
android:icon="#drawable/ic_launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data android:scheme="geo"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".FirstTab" />
<activity android:name=".SecondTab" />
<activity android:name=".ThirdTab" />
</application>
<uses-permission android:name="android.permission.INTERNET" ></uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Try to make your activity name complete like this:
<activity
android:name="com.example.myapp.TabBarExample"
... >
</activity>
I dont know your package name. You have to fill it by yourself.

stuck application at the same view even the class of that view is removed

Im working with an android application ,even if I change the names of classes at AndroidManifest.xml the application still work and installing on the tablet but the weird thing that even I removed the launcher activity from the manifest I still got it when I run the app the same xml view !!!
As an indication Im using Maven too.
I think the problem comes from Maven
this is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapps.android"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:name="com.myapps.android.project.login.Connection"
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="com.myapps.android.project.login.Connection" >
</activity>
</application>
</manifest>
I tried:
removing the R file
undeploying the application from the device with this comand:
mvn android:undeploy -Pandroid-15 -Dandroid.device=usb
Uninstall the application manually from the device
removing maven android folder from .m2/repository
I still got the same activity while deploying the application to the device
First of all, there is a little problem in your manifest: you are defining the same activity twice:
<!-- First time definition of "com.myapps.android.project.login.Connection" -->
<activity android:name="com.myapps.android.project.login.Connection"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Second definition of "com.myapps.android.project.login.Connection" -->
<activity android:name="com.myapps.android.project.login.Connection" >
you should remove the second one, it doesn't make sense to have a duplicated definition.
Did you change the Connection.java and/or Connection.xml and nothing hapened?

How to call correctly run few class (intents)?

I'm beginner in Java Android developing. I'm using Eclipse SDK 3.6.1 version. I'm trying to do this thing: in first class (layout - main.xml) is button "hello", it calls new class (layout - second.xml), in this class are button "hello2", it calss new class. I can't do this cause when I push first button "hello" I getting this messages "The aplication (xxxx) has stopped unexpectedly. Please try again". How to resolve this problem. I think problem is in AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.kodinis_raktas"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".veiksmas"
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=".second" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".lock"></activity>
<intent-filter>
</intent-filter>
</application>
<uses-permission android:name="android.permission.SEND_SMS">
</uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS">
</uses-permission>
<uses-sdk android:minSdkVersion="3" />
</manifest>
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error. That will give you more information.
I would recommend getting rid of the <intent-filter> elements from .second and .lock, since you are not using them. If your error is coming from trying to start .second, the existence of your category-only <intent-filter> may well prevent that activity from being started.
In my limited experience with android I think you need to add this line after activity android:name=".second"
android:label="#string/app_name">

Categories

Resources