I am new to android app development. I created an app using Eclipse
and successfully installed on my device. Even it got installed on
the emulator.But, I can't see it!
I have tried everything like adding :
In manifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Re-installing
Tried directly sending and installing .apk to the device
(not only by running on eclipse)
Restarting my eclipse
and so on.
Let me know if any other information is required.
Its not going to be on the main page. Go to downloaded applications on your device and check if its there. Also make sure USB debugging in turned on in the developers options on your phone. Also read this.
What about checking the list of installed packages?
$ adb shell pm list packages | grep your.package.name
Or just look up the directory.
$ adb shell ls /data/app
If it's really installed but not be shown in the launcher, then it would be a manifest code issue, I think.
I got this problem few month ago, then i got that i am using more category and action tag in activity.
like this:
<activity
android:name="com.test.login.UserLogin"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
</activity>
but my problem solved using this:
<activity
android:name="com.test.login.UserLogin"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
So i want to say that please check your code and let me know that you are getting some this case in your code.
Related
I have weird issue happens only on one phone, but it application was working for months on this phone Samsung Galaxy s8 for a long time. Reinstalls doesn't give the solution. Install previous version doesn't work as well. It works on other phones. What happens, how to fix it?
error from crashlytics:
Fatal Exception: com.microsoft.identity.client.exception.MsalClientException
Intent filter for: BrowserTabActivity is missing. Please make sure you have the following activity in your AndroidManifest.xml <activity android:name="com.microsoft.identity.client.BrowserTabActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="com.example.deepdiveandroid" android:path="mypath" android:scheme="msauth" /> </intent-filter> </activity>
com.microsoft.identity.client.PublicClientApplicationConfiguration.checkIntentFilterAddedToAppManifestForBrokerFlow (PublicClientApplicationConfiguration.java:591)
My androidmanifest.xml
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="msauth"
android:host="com.example.myname"
android:path="/M41ng+ad69kgXmsY1eacX8frPLy=" />
</intent-filter>
</activity>
*it happens after just open the app
**path is changed to random, normally it is different.
I'm pulling my hair out over this; the instructions seemed so simple, yet they just don't work.
Here's the manifest activity intent code:
<activity
android:theme="#style/Theme.Buhzyellowtoplighttabs"
android:name="com.blah.package"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustResize|stateHidden"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="www.buhz.com" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
So you would think that when I run the app on my phone, go to my browser and go to www.buhz.com it should give me a option to launch the app, right?
As far as I'm aware, this will only work when you click a link to the site, not when you type the URL in.
On the off-chance you're reading this on the Android device your testing on, here is a link for you
Here is the approach that worked for me
The androidmanifest file content is as follows:
<activity
android:name=".SecondActivity"
android:label="#string/title_activity_second">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.example.com"
android:pathPrefix="/roses"
android:scheme="http" />
</intent-filter>
</activity>
The command entered in terminal is as follows :
./adb shell am start -a android.intent.action.VIEW -d "http://www.example.com/roses" com.example.irfan.helloworld
Note:
If your operating system is Windows you can remove the first "./" in the above command.
Result:
It opened the "Second Activity" of my app automatically.
Hope it helps :)
For me:
adb shell am start -W -a android.intent.action.VIEW -d "example://gizmos" com.example
didn't work.
Adding category solved it:
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://www.example.com/gizmos"
I'm trying to run App that has a search in its action bar and also it shares in twitter. When I run my App, I got this message in console
Application already deployed. No need to reinstall.
\Healthy_Tips2\bin\Healthy_Tips2.apk installed on device
Done!
But I can't find my App with Apps menu in the device and the App is not launching..
The following is the code of my start activity manifest.xml
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable"/>
<!-- enable the base activity to send searches to itself -->
<meta-data
android:name="android.app.default_searchable"
android:value=".MainActivity" />
</activity>
Aside from uninstalling the previous app through adb like the others have already mentioned.
In your manifest, you should increment your versionCode="1" by 1 more and break down your intent filter into two. This will still work. An activity can have more than one intent-filter.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
Go to Project -> clean -> run your project.
this will rebuild your project.
Then run your project again. Usually works. Or else are you sure you are not trying to run a library Project??
Use adb to uninstall your application:
adb uninstall package_name
See link:
http://adbshell.com/commands/adb-uninstall/how-to-use-adb-uninstall.html
Edit: Go to sdk/platformtools under command line tool. And write this line:
adb uninstall <package_name>
Make any change to your app. add a comment or so, or uninstall your app then deploy again.
I personally always have the same problem, when I'm trying to install an apk via phone, although it's already installed via PC. For me it works to simply deinstall the final app and try once more to install the apk.
I get this error when I try running my app without making changes when the app is already open.
Try closing/restarting your emulator/phone and reopening it.
Also try making a change to the app, then deleting it and save it (type "A" anywhere in the code then remove it).
Then try cleaning your project: project > clean
If that doesn't work, try uninstalling the app after trying above methods and try again. This should work.
basically l would like my app to appear in the Android's sharing menu so that images shared from the device's gallery can be displayed in my app.
To achieve this I added an intent-to my application's AndroidManifest.xml. The description of the main activity now looks like this:
<activity android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" android:label="AppName" android:name=".AppActivity" android:theme="#style/Theme.Titanium">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="image/*"/>
<data android:scheme="content"/>
</intent-filter>
Unfortunately my application does not appear in the list of apps that can handle images. Neither on the device nor the emulator. On my Android device this list is displayed at least whereas the emulator directly opens the messages app without giving me the possibility to choose an app.
Am I missing something that is important for the system to recognize my app correctly for image content types?
Further information: - Titanium SDK: 3.1.0.GA - Mac OS X: 10.8.4 - Android Device: 2.3.3 - Android Emulator: 4.2.2
2 Steps for this
1- Clean your code and run the app in emulator or device. In build > android folder you will see a AndroidManifest.xml file. copy that file. make a folder in resource named platform then android folder inside platform folder and paste xml file in it.
2- Here is the code of my app
<activity android:name=".VocabulizrActivity"
android:label="Vocabulizr" android:theme="#style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
Please add the code written in tags. It worked for me as I posted the same Question once .. There are 2 more mimeType since you are using images so you can use this
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
Here is My Question's Link
My apk file generating multiple files after installation on the system as shown in screenshot. Please help me, what to do??
Most likely this is one App having multiple activities marked as action=MAIN and category=LAUNCHER:
<activity android:name=".ExampleActivity1" android:icon="#drawable/app_icon">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ExampleActivity2" android:icon="#drawable/app_icon">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
See also this SO question: Two main activities in AndroidManifest.xml