MoreApps - Android Library Project: Open Sourced

By : Shabda Raaj

If you have a portfolio of apps, you probably want to cross promote them.

We are open sourcing an Android Library Project to make this possible. Get the code. This provides an Activity which you can show with a Grid of your apps.

How to use it

Add this MoreAppsLibrary project(library) as a dependency in the Android Application project you are implementing.
Add the following code in your AndroidManifest.xml:

<activity android:name="com.agiliq.android.moreappslib.MoreAppsActivity"
          android:label="More Apps">
</activity>

Perform an Intent to start the MoreAppsActivity; make sure to putExtra("package", getPackageName());, this ensures that if the your app is in the list of apps being showcased then your app won't be shown.

Intent intent = new Intent(this, MoreAppsActivity.class);
intent.putExtra("package", getPackageName());
startActivity(intent);

You can refer the sample code for a live example.

Where does the data come from

The data here is the list of icons, the titles and the package names of the apps.
All we do is update the query field in GetAppsDetails class of the GetAppsDetails java app and run this app to get the icons and a string resource xml file.
This xml file contains the titles and package names.
Note: The query string would be the same as what you enter in the search box on Google Play Store.

Where is the data stored

After you run the java app the data will be saved in the root of that java project.

How to use this data

Move the generated data into the library,
Move all the icons into res/drawable/ and the xml file into res/values/.


Related Posts


Can we help you build amazing apps? Contact us today.

Topics : android open-source

Comments

Peppe Bergqvist

Can you please adjust your RSS feed, cause right now all of these Android blog posts end up in the community feed, https://www.djangoproject.com/community/

commmenttor
custom application development

I want to add to your MoreAppsLibrary on my android and application. Added code "AndroidManifest.xml" eventually produced an error of access. Tell me what to do?
Thanks.

commmenttor
© Agiliq, 2009-2012