I have an Ionic app (v 2.0.2) consisting Firebase Push notification. I am having some issues. Stating them here.
I am getting the Notification Icon to appear on Xiaomi device but can not get it to show on Samsung. I have used following php code
$message_for_push = array(
"data" => array(
"title" => "New Content Published!",
"body" => $message['title'],
"icon" => "file://assets/img/firebase_push_icon.png", //also tried "icon" => "myicon",
"color" => "#e81010",
'sound' => 'mySound',
"type" => $message['type'],
"section_id" => $message['section_id'],
"isPush" => 1,
"subdomain" => $subdomain, //dynamiic
"id" => $message['id'],
"other_key" => true
),
"registration_ids" => $registrationIds
);
it takes the default icon (not transparent) on Xiaomi but not on Samsung.
I have generated the icons from http://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=clipart&source.clipart=ac_unit&source.space.trim=1&source.space.pad=0&name=ic_stat_ac_unit and put all in mipmap-* folders having name firebase_push_icon.png.
I have also tried with the transparent Icon, does not work either. (I found that I have to provide transparent icon)
Only shows a round circle.
My questions are
where should I put the transparent Icon?
what should be the file name of the Icon?
what should I put on "icon" in php end?
When I use both data and notification, I get two notification, why is this?
Thanks in advance.
Related
For those who don't want to read the whole question:
I'm looking for the index in the API-Request (Zammad) to set a tag while creating a ticket.
Details:
I'm using PHP to make an API-Request to my server where Zammad is installed. The following shows the data i sent via curl:
json_encode([
"title" => $title,
"group_id" => 2,
"priority_id" => 2,
"category" => 'Some Category',
"state_id" => 1,
"type" => "Some Type",
"customer" => $userID,
"article" => [
"body" => $htmlBody,
"type" => "note",
"content_type" => "text/html",
],
"tag_list" => [ // <-- The question is about this segment
"The tag i want to add",
],
]);
After converting the data to JSON, im sending it via POST to http://<myServerIP>/api/v1/tickets
What I've tried so far:
I tried guessing the index of the tag at which i failed.
The first full example is shown above.
Secondly:
...
"tag_id" => 9, // I've check its the actual ID of the tag i want to add
And Finally:
...
"tag" => "The tag i want to add",
Needless to say that i didn't succeed. Sometimes i get an error id (im assuming its because the index doesn't exist [who would have thought that? :)]), sometimes i get nothing and Zammad just creates the ticket without the tag. What do i mean when i say sometimes? I refer my tries specified above.
What I've also tried:
Searching for some answer on the web. The thing that comes close to what i want is this. But i would rather create the ticket with the tag instead of making another request just to add the tag.
I've looked inside the code, its written in ruby. The index is 'tags' and needs to be sperated by ,.
Basicly:
json_encode([
"title" => $title,
"group_id" => 2,
"priority_id" => 2,
"category" => 'Some Category',
"state_id" => 1,
"type" => "Some Type",
"customer" => $userID,
"article" => [
"body" => $htmlBody,
"type" => "note",
"content_type" => "text/html",
],
"tags" => "tag1,tag2,tag3", // or simply "tags" => "tag1"
]);
It might help someone in the future ...
I tried to stream music while connecting the agent into the phone call.
but it's stuck in the stream and then calling.
anyone used it before? I'm sure that's impossible to make this.
Code:
$array[] = array(
"action" => "stream",
"streamUrl" => array("https://pbx.makeapp.co.il/wait.mp3"),
);
$array[] = array(
"action" => "connect",
"eventType" => "synchronous",
"eventUrl" => array("https://pbx.makeapp.co.il/config.json?step=1"),
"timeout" => 30,
"from" => "YOUR_NEXMO_PHONE",
"endpoint" => array(array(
"type" => "sip",
"uri" => "sip:your_sip#sip.antisip.com",
)
)
);
You are correct, it is not possible to have 2 actions running at the same time using an NCCO. When you add a stream action to the start of your NCCO, this must be completed before it moves onto the next action. An NCCO array is actioned from top to bottom, and only moves onto the next action when the current one has finished. You can find out some more info in the concepts of an NCCO section of the documentation: https://developer.nexmo.com/voice/voice-api/ncco-reference
I am working on project in which I need to use DocuSign API (PHP). This is my first experience with DocuSign and I successfully made template in DocuSign Console with roleName = signer. There I also made Custom Text Tags: address, city, state and phone and drag them to the desired location in my template. I want there to put my customer (signer) information from project database.
From my project I successfully made connection with DocuSign via PHP API and receive Embedded Singing View URL which opens my template where the user can sign document without problem.
But... all my custom text tags are empty and signer can type into them. I need to pre-fill them with signer personal data which is coming from database. I triple check custom tag label spelling, upper/lower case in my DocuSign Console and in my code as well as roleName->tagLabel relation. My PHP code is below.
Can someone, please, tell me what I am doing wrong?
I lost two days on it.
$data = array(
"accountId" => $accountId,
"emailSubject" => $this->_emailSubject,
"templateId" => $templateId,
"templateRoles" => array(
array(
"email" => $email,
"name" => $recipientName,
"clientUserId" => $clientUserId,
"roleName" => "signer",
"customFields" => array(
"textCustomFields" => array (
array (
"name" => "address",
"value" => "Address from DB",
"show" => "true",
),
array (
"name" => "city",
"value" => "City from DB",
"show" => "true",
),
array (
"name" => "state",
"value" => "State from DB",
"show" => "true",
),
array (
"name" => "phone",
"value" => "Phone from DB",
"show" => "true",
),
),
),
),
),
"status" => "sent"
);
You need to use the textTabs type in your JSON, not customFields which is used for something else. For instance, if you drag a Data Field from the UI onto the document and give it name address, to pre-fill that field you would need to reference it's tabLabel and value fields like this:
"roleName" => "signer",
"tabs" => array(
"textTabs" => array(
array(
"tabLabel"=> "address",
"value" => "123 Main St."
)
)
)
Working on a Chargebee integration, using their suggest PHP library.
I have the include statement at the top of the page, to include the library.
And I set the environment variables with test server information copy-pasted from the control panel.
No matter what I try, when I use their sample code, my page load breaks and I get a white screen. Without this block of code, the page loads fine and all dbase calls works perfectly.
Is there more to know about the Chargebee library that I'm not catching?
(in the top of the php)
include("/app/includes/chargebee-php-master/lib/ChargeBee.php");
ChargeBee_Environment::configure("SERVERNAME-test",
"test_KEYFROMCONTROLPANEL");
(inline code in a function)
$result = ChargeBee_Subscription::create(array(
"planId" => "pond_ripple",
"customer" => array(
"email" => "john#user.com",
"firstName" => "John",
"lastName" => "Doe",
"phone" => "+1-949-999-9999"
),
"billing_address" => array(
"firstName" => "John",
"lastName" => "Doe",
"line1" => "PO Box 9999",
"city" => "Walnut",
"state" => "CA",
"zip" => "91789",
"country" => "US"
)
));
$subscription = $result->subscription();
$customer = $result->customer();
$card = $result->card();
$invoice = $result->invoice();
$sampleString = $customer["id"];
Is your include path correct?
include("/app/includes/chargebee-php-master/lib/ChargeBee.php");
Can you crosscheck whether it starts from a base directory? ie. /app/includes/chargebee-php-master/lib/ChargeBee.php or is it relative? i.e app/includes/chargebee-php-master/lib/ChargeBee.php
If your path is right (full path), can you provide the error log to debug further? Also you need to access ChargeBee customer object as $customer->id and not as an array.
I am working Amazon API integration.I am also send request and get response.But i need to sort/filter by color.I am using this code for get response value.
$request = aws_signed_request('com', array(
'Operation' => 'ItemSearch',
'Keywords' => $keywords,
"SearchIndex" => $search_index,
"MaximumPrice" => $highprice,
"MinimumPrice" => $lowprice,
"Color" => $color,
"Count" => '24',"Brand" => $brand,
"MerchantId" => $MerchantId,
'ResponseGroup' => 'Large,EditorialReview'), $public_key, $private_key, $associate_tag);
In that coding, i need to filtered by color in amazon products.How is it possible? please advice me..
According to the AWS docs, sorting by color is not currently supported
Edit: Neither is filtering by color