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 6376065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:41:48+00:00 2026-05-25T01:41:48+00:00

I would like to pass a string from broadcast receiver to activity. I have

  • 0

I would like to pass a string from broadcast receiver to activity. I have raised a notification when I clicked on notification. I am starting an activity in that activity I would like to show string array values:

I have write a class of BroadcastReceiver as shown below:

public class RepeatingAlarm extends BroadcastReceiver
   {
       @Override
     public void onReceive(Context context, Intent intent)
      {
        String array[5]={"hai","hello","how r u?","welcome"};

        //i am calling notification method here
       notification();

       }

   }

I have write a method for get the notification as shown below

public static void myNotify(Context context,String message)
 {

      NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
      Notification notification = new Notification(R.drawable.icon,"A new notification", System.currentTimeMillis());
      // Hide the notification after its selected
      notification.flags |= Notification.FLAG_AUTO_CANCEL;

      //Intent intent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(""));

      Intent notificationIntent = new Intent(context.getApplicationContext(), CustomDialogExample.class);// i am starting CustomDialogExample 

      PendingIntent activity = PendingIntent.getActivity(context,0,notificationIntent, 0);

      notification.setLatestEventInfo(context,"Notification for you",message,activity);

      notification.number += 1;

      notificationManager.notify(0, notification);

 } 

From the above method I am starting CustomDialogExample activity. When I clicked on Notification I would like to get the RepeatingAlarm class arra[] will get in CustomDialogExample class.

please any body help me

  • 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-25T01:41:48+00:00Added an answer on May 25, 2026 at 1:41 am

    You should use Intent.putStringArrayListExtra() function for this. Here is example:

     ArrayList<String> strings = new ArrayList<String>();
     strings.add("item1");
     ...
     strings.add("itemN");
     notificationIntent.putStringArrayListExtra("stringArrayArg", strings);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure that I would like to pass a string to,
I am creating a string that I would like to pass to the bcp
I would like to pass 2 javascript string arrays myArray1 and myArray2 from ajax
I would like to pass values into the constructor on the class that implements
I have an inline lambda expression that I would like to use throughout my
I would like to pass some data structures from java to perl. In perl,
I would like to pass a vector of strings from C++ to MATLAB. I
I would like to pass parameter from view to controller in cshtml page. This
I would like to pass the variable from a function to the main scope
I would like to pass Variables from my package into Script Transformation Editor. How

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.