Pickpocket

Additional

Language
Kotlin
Version
0.2.1 (Oct 9, 2020)
Created
Oct 7, 2020
Updated
Jul 19, 2022 (Retired)
Owner
Chris Basinger (evilthreads669966)
Contributor
Chris Basinger (evilthreads669966)
1
Activity
Badge
Generate
Download
Source code

    

Pickpocket

An Android library for content provider queries with reactive streams and coroutines.

  • Calendar
  • Contacts
  • SMS
  • MMS
  • Files/Media
  • Call Log
  • Bookmarks
  • Browser History
  • Settings
  • Device Info
  • Installed Apps
  • GPS Location
  • Accounts
  • Dictionary

User Instructions

  1. Add the maven repository to your project's build.gradle file
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency to your app's build.gradle file
dependencies {
    implementation 'com.github.evilthreads669966:pickpocket:0.2.1'
}
  1. Use a pickpocket coroutine builder function to retrieve a collection of the data types you want
//flow
calendarFlow().collect { calendarEvent ->
    Log.d("PICKPOCKET", "${calendarEvent.title} - ${calendarEvent.startDate}")
}

//async
//takes android context as argument
val events = calendarAsync(this)
Log.d("ASYNC PICKPOCKET","${events.await().size}")

//producer channel
//takes android context as argument
calendarProducer(this).consumeEach { event -> Log.d("PICKPOCKET PRODUCER", event.toString()) }

//launch
calendarLaunch(this@MyService).forEach { event -> Log.d("PICKPOCKET LAUNCH", event.toString()) }

License

Copyright 2019 Chris Basinger

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.