Skip to content

Instantly share code, notes, and snippets.

Avatar

Newtron Labs NewtronLabs

View GitHub Profile
View support-us.md

Support Us

Please support the continued development of these libraries. We host and develop these libraries for free. Any support is deeply appriciated. Thank you!

Support us

BTC Address: 39JmAfnNhaEPKz5wjQjQQj4jcv9BM11NQb

View IpcEventBus-conclusion.kt
class EventExample : EventIpcSimple {
private var mData: IData? = null
constructor(data: IData?) {
mData = data
}
internal constructor(`in`: Parcel) {
readFromParcel(`in`)
}
View IpcEventBus-conclusion.java
public class EventExample extends EventIpcSimple {
private IData mData;
public EventExample(IData data) {
mData = data;
}
EventExample(Parcel in) {
readFromParcel(in);
}
View IpcEventBus-example2.java
IpcEventBus.getInstance().postEvent(new MyEvent());
View IpcEventBus-example2.kt
IpcEventBus.getInstance().postEvent(MyEvent())
View IpcEventBus-example1.java
public class Listener implements IIpcEventBusConnectionListener, IIpcEventBusObserver {
public Listener() {
String targetApp = "com.packagename";
IIpcEventBusConnector connector =
ConnectorFactory.getInstance().buildConnector(context, this, targetApp);
connector.startConnection();
}
View IpcEventBus-example1.kt
class Listener : IIpcEventBusConnectionListener, IIpcEventBusObserver {
init {
val targetApp = "com.packagename"
val connector = ConnectorFactory.getInstance().buildConnector(context, this, targetApp)
connector.startConnection()
}
override fun onConnected(connector: IIpcEventBusConnector) {
connector.registerObserver(this)
}
View IpcEventBus-setup.gradle
dependencies {
compileOnly 'com.newtronlabs.ipceventbus:ipceventbus:6.0.1'
}
@NewtronLabs
NewtronLabs / EasyPermissionsConclusion
Last active Jun 28, 2020
EasyPermissionsConclusion.kt
View EasyPermissionsConclusion
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@NewtronLabs
NewtronLabs / Newtron Labs Library License.md
Last active Sep 29, 2020
Newtron Labs Library License
View Newtron Labs Library License.md

Newtron Labs Library License

This Newtron Labs library, binaries and source code can only be used in accordance with Freeware license. That is, freeware may be used without payment, but may not be modified. The developer of the library retains all rights to change, alter, adapt, and/or distribute the software. Newtron Labs is not liable for any damages and/or losses incurred during the use of one of its libraries.

You may not decompile, reverse engineer, pull apart, or otherwise attempt to dissect the source code, algorithm, technique or other information from the binary code of a Newtron Labs’ library unless it is authorized by existing applicable law and only to the extent authorized by such law. In the event that such a law applies, user may only attempt the foregoing if: (1) user has contacted Newtron Labs to request such information and Newtron Labs has failed to respond in a reasonable time, or (2) reverse engineering is strictly necessary to obtain such information and Newtron Labs has failed to repl