Android Application Installation - android

I am new in android and I have develop an application in android but the issue is when i install it on my device it shows me 2 icons one is working and other one says that receipt organizer has been stopped unexpectedly.Kindly let me know how i can get out of this rid ?Is it some kind of code error or problem in the manifest or properties ?Also one more question now my api level is set to 18 if i set it to previous version then the functionality will not get disturbed right ?So let me know if any one can help.

Look at your manifest file. Your manifest file should have only one activity that has the LAUNCHER in the intent filter.
Choose your main activity (which should have this intent filter), and delete the intent filters from the other activity. after that, you should see only one application icon.

Related

Referencing another package activity within a tab host

I've created an app that has been in the android marketplace for a few months now. I'm trying to create a complimentary app that will be used inside the first app. I need the second app to be optional, and not necessary for the first app to work properly. I'm hoping to call the main activity from the second app within a Tab Host tab on the first app.
My questions are: how do I run an activity from a secondary app with a different package? Is it possible to have the activity be in a tab host?
I'd be happy to post code, but my code seems to be nowhere close to what I'm trying to get. I don't think I can adjust the build path of the primary app, because the secondary app can't be required. Also, Since the app has been in the marketplace for a while, I can't use SharedUserIds.
Thanks for all help.
TJ
It is not possible to do it to run any arbitrary activity in your app.
I have done this before, with activity group, which has been already deprecated. And there are also limitations to use this approach:
Your app has the same UID with the target package.
Your app has system UID
If you met either condition list above, you can start the child activity and get its window root view, and add into your layout.

why acitivies have to be registered in manifest file

we worked for exam with our friends. I tried to explain manifest file, talking about how to do things. But I see that I did know why to register activities to androidManifest.xml. Still do not know :). Does anyone have an idea?
The manifest file is used by the system to know what kind of components do the application have. Without registering your Activities/Services/Receivers/Content Providers the system would have to scan and parse the whole apk every time someone wants to use a specific component to find it. This would be really slow, that's why there is the AndroidManifest.xml, which is a small file, and it can be parsed fast to find the required component.
Manifest file describes the following features...
Version Number and Version Code:
This is useful, when you are uploading the application in Google play or go for upgrade the existing published apk.
2.minSdk and targetSdk:
mentioned your min and max version number your application supports.
3.application tag:
used to set the first activity or home activity when you launch an application from laucher.
4.activity tag:
the list of all activities in the application declared as child tag in application tag for the easier navigation to activity manager.
When we switch one activity to another activity, the activity manager checks whether this activity is declared in manifest file or not. If not found throws exception.
Uses: Developer can have look at all the activities at a glance (By Manifest file)
5.Filter tags: By intent filters in activity tag, User can open any kind of application activity.
Uses permission and Uses features:
All application resources are declared here.
example: Internet connectivity is needed for your application, Uses WIFI in your application.

Updated app with launcher activity changed causing crash

I have updated my app with change of launcher activity class. User reporting issue about their app icon and shortcut are not working. I want to know is it an OS specific Issue ???
Error they are getting "Linker not available"
Yep, if you have changed the class name for the Activity that used to be an intent launcher, or removed it from being a launcher then peoples current shortcuts won't work.
Simplest answer is to tell them to remove the shortcut and re-add it.
Long solution is to programatically do this yourself (latest Android API's only I believe)
Register the new launcher class in your manifest file.

Launching Android Market Main Page from an application

I'm trying to write a launcher-like application (I'm not planning to release it, it's just for me to use) but I don't seem to find any way to launch the Market.
All of the answers I've found actually perform a search on the Market (using a uri "market://") or even worse they run the Market on a specific app page, while I'm trying to show the main page of the Market, i.e. the page shown when you run it from the launcher.
I tried using just "market://" as a Uri, without query strings, but it doesn't work; I also tried to get exactly the same "signature" of the "start activity command" that appears in the LogCat when I run the Market from the Launcher (by manually editing component, flags and categories), but it still doesn't work.
Is there any way to get it to show the main page?
Thanks in anticipation.
Intent intent = new Intent();
intent.setClassName("com.android.vending", "com.android.vending.AssetBrowserActivity");
startActivity(intent);

Intent resolution in Android

If I want to create custom address book (which overrides my phone's default address book), and if I want it to be used by all applications, what should be my intent-filter? Does Android allow me to do such a thing considering the fact that such a third-party app could potentially be malicious?!
And, if I want to have yet another address book application, I suppose the second app also has same intent-filter, isn't it? How does the framework decide which app to pick if I click on Contacts button when making a call? In other words, how does the framework resolve intents in case,there is a conflict between multiple intent-filters?
You can replace any application on Android platform, even Home. Android documentation explains everything there is to know about Intents and Intent Filters and there is a section called Intent Resolution that answers your question. Intent Resolution section for Intent class has some additional information.
As far as I can tell Android doesn't try to resolve a conflict. It ask the user which application to run and gives them the choice to mark this Activity as the default for this Intent. They give an example about mail app here.
While Mr. Smiljanić is basically correct, there is no Contacts application in Android for you to replace. There is Dialtacts, which is the application supporting the contacts, call log, and dialer. That application cannot be replaced, mostly because the dialer cannot be replaced.
So, while you may be able to override some intent filters and get control on some contacts-related requests, you will be unable to get the contacts portion of Dialtacts overridden, which will confuse users.

Categories

Resources