Coder Social home page Coder Social logo

nativescript-android-utils's People

Contributors

petekanev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nativescript-android-utils's Issues

Error while building

First of all, thanks for this, should save me tons of time.

But, it looks like I have an issue building while using your plugin. Sorry if it's something obvious but I'm new to {N} and also a Java noob.

So, my code is this:

com.pip3r4o.android.app.IntentService.extend("me.surdu.honkme.ActivityReconIntentService", {
	onHandleIntent: function (intent) {
		console.log("### GOT INTENT");
	}
});

which generates the following Java code:

public class ActivityReconIntentService extends com.pip3r4o.android.app.IntentService implements com.tns.NativeScriptHashCodeProvider {
	public ActivityReconIntentService(java.lang.String param_0){
		super(param_0);
		com.tns.Runtime.initInstance(this);
	}

	public ActivityReconIntentService(){
		super();
		com.tns.Runtime.initInstance(this);
	}

	public boolean equals__super(java.lang.Object other) {
		return super.equals(other);
	}

	public int hashCode__super() {
		return super.hashCode();
	}

}

As you can see, it misses the onHandleIntent which prompts the build to fail with:

error: ActivityReconIntentService is not abstract and does not override abstract method onHandleIntent(Intent) in IntentService
public class ActivityReconIntentService extends com.pip3r4o.android.app.IntentService implements com.tns.NativeScriptHashCodeProvider

I'm using {N} v3.0.

Hi Mr Pip3r4o my com.pip3r4o.android.app = undefined

Hi Man how are you Im reaching at you cause Im using your code to get around the super constructor for th background services, I npm install the utils but my typedeft idex.d.ts is empty so I added manually I download a zip version from here and paste it into the node modules but i still get undefined, is there anything I'm missing ? can you help me thanks

com.pip3r4o.android.app.IntentService == undefined

Failed to create JavaScript extend wrapper for class on Android platform 5.4.0

The app runs fine on Android platform 5.2.0, but crashes after upgrading to 5.4.0:

System.err: java.lang.RuntimeException: Unable to start service com.radixdev.myproject.GeofenceTransitionsIntentService@8ecdab4 with Intent { cmp=com.radixdev.myproject/.GeofenceTransitionsIntentService (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Message android.app.IntentService$ServiceHandler.obtainMessage()' on a null object reference

System.err: 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3556)

System.err: 	at android.app.ActivityThread.-wrap20(Unknown Source:0)

System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)

System.err: 	at android.os.Handler.dispatchMessage(Handler.java:105)

System.err: 	at android.os.Looper.loop(Looper.java:164)

System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6541)

System.err: 	at java.lang.reflect.Method.invoke(Native Method)

System.err: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)

System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

System.err: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Message android.app.IntentService$ServiceHandler.obtainMessage()' on a null object reference

System.err: 	at android.app.IntentService.onStart(IntentService.java:127)

System.err: 	at android.app.IntentService.onStartCommand(IntentService.java:141)

System.err: 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3539)

System.err: 	... 8 more

error TS2339: Property 'pip3r4o' does not exist on type 'typeof com'.

Hello,

i am using the package like this:
export class AlarmService extends com.pip3r4o.android.app.IntentService {

however, it does not detect the package, as seen in the title. I already tried to rebuild the platform and I also ran tns build android --androidTypings.
Plus I also tried add the node-module in the webpack.config.js like this

    const appComponents = [
        "tns-core-modules/ui/frame",
        "tns-core-modules/ui/frame/activity",
        "nativescript-android-utils"    
    ];

I am running NS 6.1 and i need the plugin as extending the normal IntentService is not working.

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.