QuantumFlux


Source link: https://github.com/himanshu-soni/QuantumFlux

QuantumFlux

A Powerful Android Content Provider ORM. It uses Content Providers to access the data and internally uses SQLite to actually store the data. It can be used as a typical ORM, by creating Java objects and applying some Annotations and/or by extending QuantumFluxRecord on them and they will be accessed normally and creates ContentProvider.

For more information in detail, please check Wiki page.

Features

  1. Create table from data modal objects, either by annotation or by extending QuantumFluxRecord.
  2. Create table view from data modal.
  3. Advanced query creation using QueryBuilder, complex queries can be created very easily.
  4. Supports many common data types as Date, Calender, UUID, BigDecimal, and also allows custom column type mappings.
  5. Table change listeners for views to auto reflect data changes.
  6. Very easy to setup, use and query.

Installation

Gradle (Recommended)

add following line to your module's dependency list:

compile 'me.himanshusoni:quantum-flux:0.9.3' 

Maven

Declare the dependency in Maven:

<dependency>
<groupId>me.himanshusoni</groupId>
<artifactId>quantum-flux</artifactId>
<version>0.9.3</version>
<type>pom</type> </dependency> 

For eclipse users

You can also download the source and import as library project.

or add jar

See releases page to download jar for latest version directly.

===================

Basic Usage

  1. Install the project via any of the method above. and extend Application class and use it as following:

    public class SampleApplication extends Application {
    
      @Override
      protected void attachBaseContext(Context base) {
    
    super.attachBaseContext(base);
    
    QuantumFlux.initialize(this);
    
      
    }
     
    }
     
  2. register this application class in Manifest file:

    <application
    
    android:name="me.himanshusoni.quantumflux.sample.SampleApplication"
    
    ...
    
    >
  3. add following meta data in <application> tag

    <meta-data android:name="AUTHORITY" android:value="me.himanshusoni.quantumflux.sample" /> <meta-data android:name="DATABASE_NAME" android:value="QuantumFluxSample.sqlite" /> <meta-data android:name="DATABASE_VERSION" android:value="1" /> <meta-data android:name="PACKAGE_NAME" android:value="me.himanshusoni.quantumflux.sample" /> <meta-data android:name="QUERY_LOG" android:value="true" /> <!-- Optional -->
  4. register content provider:

    <provider
      android:name="me.himanshusoni.quantumflux.provider.QuantumFluxContentProvider"
      android:authorities="me.himanshusoni.quantumflux.sample"
      android:exported="false" />
  5. Now, you just have to create modal classes by:

    • annotation:

      @Table public class Book {
       ... 
      }
       
    • extending class:

      public class Author extends QuantumFluxRecord<Author> {
      
        public String name;
        ... 
      }
       
  6. Access:

    Book book = new Book();
     book.name = "Sorcerer's Stone"; book.isbn = "122342564"; QuantumFlux.insert(book);
     
    Author author = new Author();
     author.name = "J.K. Rollings"; author.save();
     
    Author first = Select.from(Author.class).first();
     first.name = "J. K. Rowling"; first.update();
     
    QuantumFlux.deleteAll(Book.class);
     Author first = Select.from(Author.class).first();
     first.delete();
     

=========================

For detailed configuration and advance usages, go through https://github.com/himanshu-soni/QuantumFlux/wiki

Inspired from https://github.com/wackymax/CPOrm and https://github.com/satyan/sugar

Special thanks to Satya Narayan (@satyan) and Hennie Brink (@Wackymax).

developed to make programming easy.

by Himanshu Soni ( [email protected])

Resources

Awesome digital speedometer for android.

Juste a funcy button with progress bar.

Proteus is meant to be a drop-in replacement for Android’s LayoutInflater; but unlike the compiled XML layouts bundled in the APK, Proteus inflates layouts at runtime.

With Proteus, you can control your Apps layout from the backend (no WebViews). Forget the boilerplate code to findViewById, cast it to a TextView, and then setText(). Proteus has runtime data bindings and formatters. Plugin in your own custom views and attributes and formatters.

SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.

Simple custom ImageView for android giving you a simple way to enable overlapping of two images one over the other.

OkHttp-Stats is an android library built on top of OkHttp3, which is responsible for intercepting all the network calls and for calculating network stats such as the average network speed of the user.

This is more of an analytical tool which can be used to track the success and error response logs.

Can be plugged in to any app which uses okhttp in their networking stack.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes