Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:01:36+00:00 2026-05-27T00:01:36+00:00

EDIT 3 I use RhoMobile to get device_token, which I am getting to server

  • 0

EDIT 3

I use RhoMobile to get device_token, which I am getting to server

def register_device
    @person = Person.find(:first)
    unless System.get_property('is_emulator')
     url = "#{@base}/users/#{@person.remote_id}/register_device?os=#{System.get_property('platform')}&device_token=#{System.get_property('device_id')}"
     Rho::AsyncHttp.get(
        :url => url,
        :headers => {'User-Agent' => Rho::RhoConfig.user_agent}
      )
    end
    finish_and_go_to_venue
  end

EDIT 2

Have device_token but keep getting Error=NotRegistered

EDIT

OK, so first mistake was using the wrong device ID. Now working, but phone not alerting with message.

ORIGINAL

First time user of sending android Push messages from rails server.

Using https://github.com/sghael/speedy_c2dm

I registered with google and received white list email.

trying test.rb below, but nothing gets sent to phone.

require 'rubygems'
require 'bundler'
Bundler.setup(:default, :development)
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'speedy_c2dm'


TEST_EMAIL = "my_push_email@gmail.com"
TEST_PASSWORD = "MY_PASSWORD"
TEST_REGISTRATION_ID = "DEVICE_TOKEN_RECEIVED_FROM_PHONE"

speedyC2DM = SpeedyC2DM::API.new(TEST_EMAIL, TEST_PASSWORD)

options = {
  :registration_id => TEST_REGISTRATION_ID,
  :message => "Hi!",
  :extra_data => 42,
  :collapse_key => "some-collapse-key"
}


response = speedyC2DM.send_notification(options) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:01:36+00:00Added an answer on May 27, 2026 at 12:01 am

    Try adding a Controller named Push and inside the controller you need to have the following:

    require 'rho/rhocontroller'
    require 'helpers/browser_helper'
    
    class PushController < Rho::RhoController
      include BrowserHelper
    
      def push_callback
    
        Alert.show_popup @params['message'] #this will show you a popup with your push message
        puts "push_callback : #{@params}" #you'll see what you are receiving with this
        "rho_push"  #to run rhodes push command processing (for alerts, sounds, etc…)
      end
    
    
    end
    

    you need to set your application to call this by adding the following line to your application.rb

    System.set_push_notification "/app/Push/push_callback", ''
    

    Also, did you configure your build.yml correctly?

    android:
      push:
        notification: always
        sender: your-sender-email@gmail.com
    capabilities:
      - push
      - vibrate
    

    At least with my app, I need to have the application running in order to get the message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an app in which i have to use edit text and
I use edit-in-place plugin: http://arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html I't works Great! I just need something to check
I choose an item in my list to edit (I use Context Menu) ,
I'm beginning to work on mailing-list software we use internally (EDIT: though we send
I use emacs to edit my xml files (nxml-mode) and the files were generated
I use the :e and :w commands to edit and to write a file.
I simply use commandName = Edit to put the gridview into edit mode. Then
we use an external Database where we cant edit table designs only add own
How can I use the standard Edit menu in my Palm OS application, instead
I would like to use Emacs to edit some VB6 files but Emacs does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.