Coder Social home page Coder Social logo

moreapps's Introduction

More Apps in Play Store

As a individual developer I have to copy and paste some common code to add "More Apps" feature in my applications. It's a pathetic work to add common codes in all applications and some times it makes silly mistakes and have to fix it again. So I thought why don't I make a library which can make my work simple. By writing two/three line of code and get all the features.

Install

You can download from JitPack.

Add this dependency in your build.gradle:

allprojects {
	repositories {
		maven { url 'https://jitpack.io' }
		}
	}
dependencies {
    compile 'com.github.paveltech:MoreApps:1.2'
}

Json File Ready : make your json file looks like...

[

{
	"name": "Your App Name",
	"rating": 5,
	"package_name": "package name",
	"image": "icon image link"
},

{
	"name": "Call Blocker",
	"rating": 4.8,
	"package_name": "com.playoffstudio.callblocker",
	"image": "https://lh3.googleusercontent.com/CnqXt1s12Mzu-rzMcUEQpdmsk3SlBSHCHtmc02T8pTqngJeij6hLFIgcwi1R8G-Fs-am=w300"
},
{
	"name": "USA Online Shopping",
	"rating": 5,
	"package_name": "com.creativeapp.usashopping",
	"image": "https://lh3.googleusercontent.com/PiGn6kwmGltl7QEgMUwHtdpCJ7sPrTZOpY-ezN5zK6OJR0GNAB7c64yTMEI497Lhb9s=w300"
}

]

Configuration : Now have to configure java code.

1.First make a class which can extends Application class. Looks like

public class AppController extends Application {

    App app;
    @Override
    public void onCreate() {
        super.onCreate();
	  /// initialized more app library 
        app = new App(getApplicationContext());
    }
}
  1. Add Internet permissions and Application class in your Androidmanifest
<uses-permission android:name="android.permission.INTERNET" />
 <application>
        android:name=".AppController"
         ......................
	 ......................
    </application>
  1. Now you can use it as a Activity or as a Fragment

For Activity

Intent intent = new Intent(YourActivity.this , MoreActivity.class);
       MoreActivity.url = "your json file link";
       startActivity(intent);

For Fragment

   MoreAppFragment moreAppFragment = new MoreAppFragment();
        MoreAppFragment.url = "your json file link";
		

License

Licensed under the MIT License. See the LICENSE file for more details.

moreapps's People

Contributors

pavelsust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.