Notification push / One signal

How can i see my device on my computer ?

mac or windows? android or ios? which environment did you use?

error when i run into my device because of the ā€œrequireā€

I use my android device and i am on a windows

so there was an error in your codeā€¦ I canā€™t check it cause I am doing something right nowā€¦ maybe others can see it and help you with your problemā€¦

Okay ā€¦ no problem thank you ! Can you juste tell me how too run my device on my computer ?

is that android or ios? if android(windows) I can help you out but if ios sorry I canā€™t help with thatā€¦

yeah android and my computer windows

check your device if connected and go to terminal and type adb devices if it show your device run inside your terminal (root of ionic app) ionic cordova run android.

if it doesnā€™t show your device in adb devices:

run: adb kill-server and run again adb start-serverā€¦ you need to ensure that your device has been detected in adb devicesā€¦

1 Like

Yeah itā€™s work but this put my application on my device and note showing on the computer

it runs in device right? so you can go to chrome browser and go to chrome://inspect and you can see your device thereā€¦

1 Like

Wow thanks you for your help

If someone now why i have the error ā€œrequireā€ ā€¦

sure no problems. if something wrong with you code search it in the google maybe something is wrong with your code if it doesnā€™t workā€¦

1 Like

maybe you should study http first. Take a look at this https://ionicframework.com/docs/native/http/

I really donā€™t know how to do ā€¦ Please someone unblock me
I juste copy the documentation ā€¦

I juste import a https ( import { https } from ā€˜https-proxy-agentā€™; ) instead of ā€œvar https = require(ā€˜httpsā€™)ā€ but now thatā€™s tell me when i run the method : Capture

I try with ur way but i have some error ā€¦ can you help me please ?
Capture

You need to import RequestOptions

import { Http, Headers, RequestOptions } from '@angular/http';

and USER_TOKEN is the token of the user that you need to get with this function from FCMPlugin

FCMPlugin.getToken(function(token){
    alert(token);
});
1 Like

Okay thanks you, that resolve some error ! Now i have this (capture behind) i need too add http to app.module.ts and add him to provider ?
Capture
And for get the token of someone how can we do ? we need to put his token in the database then get it ?

Really thank you for helping me !