I am trying to click on any element in the Appium inspector simulator but when highlighting the element and clicking on the tab button it seems like that the tab button just refreshing the app , can any one help me with that i am using Appium V 1.3.4 .

I'm using XCode 6.1, Swift and KIF for tests.

Is there any way (like processors) to define a let value for debug and another specific to tests environment?

I'm trying to install a beta app to an iOS device and am hosting the manifest.plist and IPA file on HTTPS with a self-signed certificate. When I hit the itms-services:// link, I get an error of "Cannot connect to <ip address>".

itms-services link:

itms-services://?action=download-manifest&url=https://10.0.1.2:1338/ipa/manifest.plist

plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>https://10.0.1.2:1338/ipa/test.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.company.test</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>test</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

It is a litle bit strange when ill try to test my app on my device. If i run the App from XCode on my iPad, everything works fine. But, when ill create an archive as .ipa and copy it on the iPad, ill get an error in the App when ill try to open a modal window.

Here is the crash Log:

ncident Identifier: F58A7DE7-1BA8-483F-AFF7-2E741536506B CrashReporter Key: 12c369be20bfc75eb3bbf68ac639436ca29817e1 Hardware Model:
iPad4,1 Process: assekuranz [331] Path:
/private/var/mobile/Containers/Bundle/Application/B098D5BE-92F6-4DD6-8DCD-4D17F976C0F8/assekuranz.app/assekuranz Identifier: at.novu.assekuranz Version: 1 (1.0) Code Type: ARM-64 (Native) Parent Process:
launchd [1]

Date/Time: 2015-01-09 23:05:04.777 +0100 Launch Time:
2015-01-09 23:04:26.622 +0100 OS Version: iOS 8.1.2 (12B440) Report Version: 105

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001 Triggered by Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x00000001959efbc8 objc_msgSend + 8 1 UIKit 0x0000000189803348 -[UINavigationController _setToolbarClass:] + 84 2 UIKit 0x0000000189802e88 -[UINavigationController initWithNavigationBarClass:toolbarClass:] + 100 3 assekuranz
0x000000010022c620 assekuranz.DashboardViewController.startButtonPressed (assekuranz.DashboardViewController)(ObjectiveC.UIButton) -> () (DashboardViewController.swift:188) 4 UIKit
0x00000001897a8d30 -[UIApplication sendAction:to:from:forEvent:] + 92 5 UIKit 0x0000000189791e44 -[UIControl _sendActionsForEvents:withEvent:] + 608 6 UIKit 0x00000001897a86cc -[UIControl touchesEnded:withEvent:] + 588 7
UIKit 0x0000000189768068 _UIGestureRecognizerUpdate + 8532 8 CoreFoundation 0x0000000184f7aa4c CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 28 9 CoreFoundation 0x0000000184f779d8 __CFRunLoopDoObservers + 356 10 CoreFoundation 0x0000000184f77db8 __CFRunLoopRun + 832 11 CoreFoundation
0x0000000184ea50a0 CFRunLoopRunSpecific + 392 12 GraphicsServices
0x000000018e00b5a0 GSEventRunModal + 164 13 UIKit
0x00000001897da3bc UIApplicationMain + 1484 14 assekuranz
0x0000000100256d5c main (AppDelegate.swift:0) 15 libdyld.dylib
0x000000019604aa04 start + 0

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x0000000196148c94 kevent64 + 8 1 libdispatch.dylib 0x000000019603097c _dispatch_mgr_invoke + 272 2 libdispatch.dylib 0x00000001960233b0 _dispatch_mgr_thread + 48

Thread 2: 0 libsystem_kernel.dylib 0x0000000196163c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001961fd390 _pthread_wqthread + 988 2
libsystem_pthread.dylib 0x00000001961fcfa4 start_wqthread + 0

Thread 3: 0 libsystem_kernel.dylib 0x0000000196163c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001961fd390 _pthread_wqthread + 988 2
libsystem_pthread.dylib 0x00000001961fcfa4 start_wqthread + 0

Thread 4: 0 libsystem_kernel.dylib 0x0000000196163c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001961fd390 _pthread_wqthread + 988 2
libsystem_pthread.dylib 0x00000001961fcfa4 start_wqthread + 0

Thread 5 name: com.apple.NSURLConnectionLoader Thread 5: 0
libsystem_kernel.dylib 0x0000000196148e7c mach_msg_trap + 8 1 libsystem_kernel.dylib 0x0000000196148cf4 mach_msg + 68 2
CoreFoundation 0x0000000184f79ecc CFRunLoopServiceMachPort + 196 3 CoreFoundation 0x0000000184f77e20 __CFRunLoopRun + 936 4 CoreFoundation
0x0000000184ea50a0 CFRunLoopRunSpecific + 392 5 CFNetwork
0x00000001849aa4e4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436 6 Foundation 0x0000000185e95c08 __NSThread__main
+ 1068 7 libsystem_pthread.dylib 0x00000001961ffe7c _pthread_body + 160 8 libsystem_pthread.dylib
0x00000001961ffdd8 _pthread_start + 156 9 libsystem_pthread.dylib
0x00000001961fcfac thread_start + 0

Thread 6 name: com.apple.CFSocket.private Thread 6: 0
libsystem_kernel.dylib 0x0000000196163498 __select + 8 1
CoreFoundation 0x0000000184f7f8c4 __CFSocketManager + 656 2 libsystem_pthread.dylib 0x00000001961ffe7c _pthread_body + 160 3 libsystem_pthread.dylib 0x00000001961ffdd8 _pthread_start + 156 4 libsystem_pthread.dylib
0x00000001961fcfac thread_start + 0

Thread 7: 0 libsystem_kernel.dylib 0x0000000196163c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001961fd390 _pthread_wqthread + 988 2
libsystem_pthread.dylib 0x00000001961fcfa4 start_wqthread + 0

Thread 8: 0 libsystem_kernel.dylib 0x0000000196163c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001961fd390 _pthread_wqthread + 988 2
libsystem_pthread.dylib 0x00000001961fcfa4 start_wqthread + 0

Thread 9 name: NetworkLoad Thread 9: 0 libsystem_kernel.dylib
0x0000000196148e7c mach_msg_trap + 8 1 libsystem_kernel.dylib
0x0000000196148cf4 mach_msg + 68 2 CoreFoundation
0x0000000184f79ecc __CFRunLoopServiceMachPort + 196 3
CoreFoundation 0x0000000184f77e20 __CFRunLoopRun + 936 4 CoreFoundation 0x0000000184ea50a0 CFRunLoopRunSpecific + 392 5 GeoServices
0x000000018df1d8e0 _runNetworkThread + 448 6
libsystem_pthread.dylib 0x00000001961ffe7c _pthread_body + 160 7 libsystem_pthread.dylib 0x00000001961ffdd8 _pthread_start + 156 8 libsystem_pthread.dylib 0x00000001961fcfac t

I dont know what cause this crash, and why does it work when ill copy with XCode to the Device, and NOT when creating an ipa?.

Any help would be greatly apreciated.

Im using SystemSoundID to create a sound when a button was pressed, this way:

this is the object declaration:

SystemSoundID soundEffect;

this is in the viewDidLoad:

NSString *soundPath = [[NSBundle mainBundle]pathForResource:@"create_button_sound" ofType:@"mp3"];

NSURL *soundURL = [NSURL fileURLWithPath:soundPath];

AudioServicesCreateSystemSoundID(CFBridgingRetain(soundURL), &soundEffect);

And finally when the button was pressed:

AudioServicesPlaySystemSound(soundEffect);

What is the best way to control the sound of the effect? I want to make sure that if someone have his iphone volume level set to max so the sound wont be crazy loud..

thanks@@!

I'm a bit of a new programmer. I have a table view and a custom cell that are loaded and set up but the problem is that the data isn't loaded unless I rotate the device. In portrait mode when I first run it there is nothing there, once I rotate the device either way all the data loads and works perfectly. Any suggestions?

I have a parallax site that is using background images with a background-size:cover. However it doesn't play nicely with mobile chrome on iOS since mobile Chrome's nav bar changes the window height in the Dom forcing the browser to recalculate the background image size. I've created some js to hardcode the window height upon page load and orientation change. However if the device changes orientation when the nav bar is hidden(which it's exposed upon page load and works flawlessly) then the calulations are all thrown off again once the nav bar is revealed. Is there an event listener or some sort of object detection for mobile chrome on IOS to detect if the navBar is exposed?

You can see my current code HERE

My ios application crashes with the following exception:

void HandleExceptions(NSException *__strong):875 ERROR: uncaught exception: no UICollectionViewLayoutAttributes instance for -layoutAttributesForDecorationViewOfKindOfKind: ColorDecoratorView at path <NSIndexPath: 0x7d843ec0> {length = 3, path = 3 - 0}

Can you please tell me what is the meaning of "no UICollectionViewLayoutAttributes instance for -layoutAttributesForDecorationViewOfKindOfKind"? And where should I look to trouble shoot it?

Thank you.

I have a scroll view that I'm using its delegate method:

(void)scrollViewDidScroll:(UIScrollView *)scrollView

And I want to perform some action after my content offset is at some point, and the finger was pulled from the screen....How do I find out if the finger was lifted?

this is what I have so far:

if (self.myScrollView.contentOffset.y <= -73 && HereINeedToFindOutIfTheFingerWasLifted)

Thanks!!!

I am trying to programmatically set the constraint for a multiplier in swift, and when I set the value, it just gives me the error, "Cannot assign to the result of this expression"...

I declared the NSLayoutConstraint with an IBOutlet, and then set the multiplier, same as I did with the constant for another, which works fine, but this one won't accept it...

@IBOutlet weak var clockWidthConstraint: NSLayoutConstraint!

override func updateViewConstraints() {
    super.updateViewConstraints()

    confirmTopConstraint.constant = 40.0
    clockWidthConstraint.multiplier = 0.1  // Gives me the error!

    }

Any ideas?

I am following the tutorial provided in http://www.appcoda.com/fetch-parse-json-ios-programming-tutorial/ , i downloaded the code and try to run it. When the app launches,i am getting the blank table view . I am supposed to get the JSON data from the website and display it in the table view.

Somehow,the fetching group method is not getting called in my view did load method

@interface MasterViewController () <MeetupManagerDelegate> {
NSArray *_groups;
MeetupManager *_manager;
}

- (void)viewDidLoad
 {

[super viewDidLoad];

_manager = [[MeetupManager alloc] init];
_manager.communicator = [[MeetupCommunicator alloc] init];
_manager.communicator.delegate = _manager;
_manager.delegate = self;

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(startFetchingGroups:)
                                             name:@"kCLAuthorizationStatusAuthorized"
                                           object:nil];   // this should fetch the groups from the website but it isnt doing anything

}

#pragma mark - Notification Observer
- (void)startFetchingGroups:(NSNotification *)notification
{
[_manager fetchGroupsAtCoordinate:self.locationManager.location.coordinate];
}

Can anyone tell me what i am missing?

I am going to be flying a lot next week and I want to continue developing my application. It's a server-backed API hosted on rails. I'd like to use my macbook to host the rails, ruby, db environment and be able to test the native iOS client. While flying at 30,000 feet without WiFi.

Can I use the USB tether to connect them?

I'm looking for something similar to this: http://stackoverflow.com/a/5174958/1082660 but for iphone.

Thanks and happy weekend,

Bill

This question already has an answer here:

EDIT: This answer solved my problem - http://stackoverflow.com/a/9203647/1176870

I have some buttons that I'm using as toggles. They start off with the colors rgb(3,61,115) for off and rgb(0,128,255) for on. The colors are initially assigned from the background color selector on the storyboard. This is how they look

enter image description here

After a user clicks on a button the colors change programmatically with the following UIColors

UIColor *on = [UIColor colorWithRed:0 green:128.0/255.0 blue:1 alpha:1];
UIColor *off = [UIColor colorWithRed:3.0/255.0 green:61.0/255.0 blue:115.0/255.0 alpha:1];

However, once they change programmatically, the colors are not the same. You can see the change in the image below.

enter image description here

Why is this happening and how can I fix it?

I have a custom cell for my TableView app. The TableViewController is called "BlogView". My custom cell has a few buttons on it, one being a share button. I want to present a UIActivityViewController when one of the buttons is pressed.

In the header for my custom cell, I have a property:

@property (nonatomic, retain) BlogView *myViewController;

In the custom cell, I have for layoutSubview:

self.commentButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.commentButton addTarget:self action:@selector(didTapCommentButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.commentButton setTitle:@"Share" forState:UIControlStateNormal];
    [self.commentButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.commentButton setTitleColor:[UIColor greenColor] forState:UIControlStateHighlighted];

For the selector didTapCommentButtonAction I have:

- (void)didTapCommentButtonAction:(id)sender
{
    NSLog(@"CommentButtonTAPPED");
    Mail *mail = [[Mail alloc]init];
    NSString *html = self.prayerObject[@"Request"];
    NSString *thetitle = [self.prayerObject[@"Title"] stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
    NSString *thedate = self.prayerObject[@"dateMade"];
    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"MMM_dd_yyyy"];
    [dateFormat setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
    NSDate *theNewDate1 = [dateFormat dateFromString:thedate];
    NSString *theNewDate = [dateFormat stringFromDate:theNewDate1];

    mail.thehtml = html;
    self.nameofhtmlfile = [[[[@"http://www.iprayed4u.net/app/" stringByAppendingString:thetitle] stringByAppendingString:@"_"] stringByAppendingString:theNewDate] stringByAppendingString:@".html"];
    //  Reminder *thereminder = [[Reminder alloc] init];
    //thereminder.thehtml = html;
    //thereminder.thetitle = thetitle;
    //thereminder.thedate = thedate;

    UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[self] applicationActivities:@[mail]];


    if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
        activityVC.excludedActivityTypes = @[ UIActivityTypePostToWeibo,

                                              UIActivityTypeCopyToPasteboard,

                                              UIActivityTypeAssignToContact,
                                              UIActivityTypeMail,
                                              UIActivityTypePrint

                                              ];

    }
    else {

        activityVC.excludedActivityTypes = @[ UIActivityTypePostToWeibo,

                                              UIActivityTypeCopyToPasteboard,

                                              UIActivityTypeAssignToContact,
                                              UIActivityTypeMail,
                                              UIActivityTypePrint,
                                              UIActivityTypeAirDrop
                                              ];

    }

    NSLog(@"Test");
       [self.myViewController presentViewController: activityVC animated: YES completion: nil];

   }

In BlogView.m

- (UITableViewCell *)tableView:(UITableView *)tableView
         cellForRowAtIndexPath:(NSIndexPath *)indexPath
                        object:(PFObject *)object
{
    static NSString *CellIdentifier = @"Cell";

    Cell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[Cell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
    }
    self.theObject = object;

    // Configure the cell to show todo item with a priority at the bottom
    cell.profileName.text = object[@"Title"];
    cell.contentLabel.text = object[@"Request"];
    cell.firstName = object[@"FirstName"];
    cell.lastName = object[@"LastName"];
    cell.iostoken = object[@"DeviceID"];
    cell.request = object[@"Title"];
    cell.prayerObject = object;
    PFFile *thumbnail = object[@"ProfilePic"];
    cell.profilePic.image = [UIImage imageNamed:@"AppIcon60x60@2x.png"];
    [thumbnail getDataInBackgroundWithBlock:^(NSData *imageData, NSError *error) {

        UIImage *thumbnailImage = [UIImage imageWithData:imageData];
        UIImageView *thumbnailImageView = [[UIImageView alloc] initWithImage:thumbnailImage];

        cell.profilePic.image = thumbnailImage;

    }];
    NSString *dates = object[@"dateMade"];
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"MMM_dd_yyyy"];
   NSDate *datefromstring = [formatter dateFromString:dates];
    NSDateFormatter *formatter2 = [[NSDateFormatter alloc] init];
    [formatter2 setDateFormat:@"MMM dd, yyyy"];
    cell.dateLabel.text = [formatter2 stringFromDate:datefromstring];
    UIFont *cellFont = [UIFont fontWithName:@"Verdana-Bold" size:15];
    UIFont *cellFont2 = [UIFont fontWithName:@"Verdana-Bold" size:12];



    return cell;
}

I get no warnings or errors, but when I click on the button, nothing happens.

I understand that this top has had several other posts but each were flooded and saturated with very different methods and now that it has been a month or so since the last one and now with then Android Studio 1.0.1 i would like to see if anyone could help me.

When ever i run the application after installing and moving it to my applications folder- i get the following message---- "Java Not Found. Android Studio was unable to find a valid JVM."

I have tried youtube and google and even stack for solutions and have yet to find a straight forward solutions. I tried to read the instructions on the Android Dev site but i don't exactly understand them.

If anyone has a solution to this issue, i'd really appreciate it!

Thank you guys!

So when I retrieve my data it contains brackets { and unique id such as - JSDHGJDGJJSKA ... I want to make it cleaner and get rid of the brackets for eg. my output is:

{-JfFQQRYnhiKeuN5ERGX={msg=Monday},-JfFQAhQQWIFAUuV1nD4={msg=this is test}}

I want to get rid of the brackets and the word msg and retrieve just one of the message at random.

so I want my output to be if i pick up a random msg:

Monday 

if i pick up another at random

this is test

Any ideas on how to achieve this will be greatly appreciated.

I'm attempting to load the Facebook sign in page in a WebView that is running on the Nexus Player. This device outputs to a TV and as such does not have a touch screen.

I can get the sign in page to load without issue, but the user is unable to select the email and password text fields in order to enter their credentials.

Pushing up/down/left/right on the Nexus Player remote results in the web page scrolling, but I'm unable to interact with anything on the page itself.

Things I've tried:

At the moment I'm writing a module for the Xposed framework but now I have a problem. I want to inflate a layout from my own package. I thought I can do this by using this code:

Context context = (Context) XposedHelpers.getObjectField(object, "mContext");

LayoutInflater inflater = LayoutInflater.from(context);
View buttons = inflater.inflate(R.layout.volumebuttons, null, false);

But this does not work. When it comes to the third line an exception is thrown (sorry for this unclear formulation. I do not realy know what a kind of exception is thrown - I can't see it with the Xposed framework). Do you have any ideas why I can't use this code to inflate my layout?

Im having a bit of a weird issue with the Facebook invalid keyhash error. Ive added both the debug and the release key to my Facebook app, however, after i built it in release mode and sent it out to around 6 people. 5 were able to install it and get into the app yet one person was unable to connect due to the invalid key hash issue. Ive tried adding the keyhash that is displayed within the error message but its still displaying! i double checked and triple checked the release and debug key and none of them match the one displayed in the error message.

As an extra test, i also tried to package up and export the app in debug mode to see how that worked, however they had exacly the same issue with the exact same hashkey being displayed? Am i right in thinking that the hash key in the error message should have changed as it was now in debug?

Has anyone had an issue like this before?

Thanks in advance for any kind of insight!

This might be very easy question, but I'm looking for your help. I'm using downloaded open source file. I have a list of Groups with populated Child's under it. I'm able to expand the list and see the Child's. How could I open new activity window with text information relater for specific Children when clicking on it?

Thank you for support.

MainActivity.java:

package com.example.expandablelistviewsearch;

import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ExpandableListView;
import android.widget.SearchView;
import android.widget.ExpandableListView.OnChildClickListener; 
import java.util.ArrayList;

public class MainActivity extends Activity implements

        SearchView.OnQueryTextListener, SearchView.OnCloseListener {

    private SearchView search;
    private MyListAdapter listAdapter;
    private ExpandableListView myList;
    private ArrayList<Continent> continentList = new ArrayList<Continent>();


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        myList.setOnChildClickListener(myListItemClicked); //added line

        SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
        search = (SearchView) findViewById(R.id.search);
        search.setSearchableInfo(searchManager
                .getSearchableInfo(getComponentName()));
        search.setIconifiedByDefault(true);
        search.setOnQueryTextListener(this);
        //search.setOnCloseListener(this);

        // display the list
        displayList();
        // expand all Groups
        //expandAll();

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    // method to expand all groups
    private void expandAll() {
        int count = listAdapter.getGroupCount();
        for (int i = 0; i < count; i++) {
            myList.expandGroup(i);
        }
    }
    private OnChildClickListener myListItemClicked =  new OnChildClickListener() {

        public boolean onChildClick(ExpandableListView parent, View v,
                                    int groupPosition, int childPosition, long id) {

            //get the group header
            HeaderInfo headerInfo = deptList.get(groupPosition);
            //get the child info
            DetailInfo detailInfo =  headerInfo.getProductList().get(childPosition);
            //start new activity with specific child information

            return false;
        }

    };
    // method to expand all groups
    private void displayList() {

        // display the list
        loadSomeData();

        // get reference to the ExpandableListView
        myList = (ExpandableListView) findViewById(R.id.expandableList);
        // create the adapter by passing your ArrayList data
        listAdapter = new MyListAdapter(MainActivity.this, continentList);
        // attach the adapter to the list
        myList.setAdapter(listAdapter);

    }

            private void loadSomeData() {
            ArrayList<Country> countryList = new ArrayList<Country>();
            Country country = new Country("Test1", "Test2", "Test3");
            countryList.add(country);

            Continent continent = new Continent("Main Test", countryList);
            continentList.add(continent);


            private void loadSomeData() {
            ArrayList<Country> countryList = new ArrayList<Country>();
            Country country = new Country("Test1", "Test2", "Test3");
            countryList.add(country);

            Continent continent = new Continent("Main Tes1t", countryList);
            continentList.add(continent);


            private void loadSomeData() {
            ArrayList<Country> countryList = new ArrayList<Country>();
            Country country = new Country("Test1", "Test2", "Test3");
            countryList.add(country);

            Continent continent = new Continent("Main Test2", countryList);
            continentList.add(continent);

        }


        @Override
        public boolean onClose() {
            // TODO Auto-generated method stub
            listAdapter.filterData("");
            //expandAll();
            return true;
        }

        @Override
        public boolean onQueryTextChange(String newText) {
            // TODO Auto-generated method stub
            listAdapter.filterData(newText);
            expandAll();
            return false;
        }

        @Override
        public boolean onQueryTextSubmit(String query) {
            // TODO Auto-generated method stub
            listAdapter.filterData(query);
            expandAll();
            return false;
        }

    }

MyListAdapter.java

package com.example.expandablelistviewsearch;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;

import java.util.ArrayList;

public class MyListAdapter extends BaseExpandableListAdapter {

    private Context context;
    private ArrayList<Continent> continentList;
    private ArrayList<Continent> originalList;

    public MyListAdapter(Context context, ArrayList<Continent> continentList) {
        this.context = context;
        this.continentList = new ArrayList<Continent>();
        this.continentList.addAll(continentList);
        this.originalList = new ArrayList<Continent>();
        this.originalList.addAll(continentList);
    }
    @Override
    public Object getChild(int groupPosition, int childPosition) {
        // TODO Auto-generated method stub
        ArrayList<Country> countryList = continentList.get(groupPosition).getCountryList();
        return countryList.get(childPosition);
    }

    @Override
    public long getChildId(int groupPosition, int childPosition) {
        // TODO Auto-generated method stub
        return childPosition;
    }

    @Override
    public View getChildView(int groupPosition, int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub

        Country country = (Country) getChild(groupPosition, childPosition);
        if(convertView == null)
        {
            LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = layoutInflater.inflate(R.layout.child_row, null);
        }

        TextView code = (TextView) convertView.findViewById(R.id.code);
        TextView name = (TextView) convertView.findViewById(R.id.name);
        TextView fdd = (TextView) convertView.findViewById(R.id.fdd);
        code.setText(country.getCode().trim());
        name.setText(country.getName().trim());
        fdd.setText(country.getFdd().trim());
        //population.setText(NumberFormat.getNumberInstance(Locale.US).format(country.getPopulation()));

        return convertView;
    }

    @Override
    public int getChildrenCount(int groupPosition) {
        // TODO Auto-generated method stub
        ArrayList<Country> countryList = continentList.get(groupPosition).getCountryList();
        return countryList.size();
    }

    @Override
    public Object getGroup(int groupPosition) {
        // TODO Auto-generated method stub
        return continentList.get(groupPosition);
    }

    @Override
    public int getGroupCount() {
        // TODO Auto-generated method stub
        return continentList.size();
    }

    @Override
    public long getGroupId(int groupPosition) {
        // TODO Auto-generated method stub
        return groupPosition;
    }

    @Override
    public View getGroupView(int groupPosition, boolean isExpanded,
            View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub
        Continent continent = (Continent) getGroup(groupPosition);
        if(convertView == null)
        {
            LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = layoutInflater.inflate(R.layout.group_row, null);
        }

        TextView heading = (TextView) convertView.findViewById(R.id.heading);
        heading.setText(continent.getName().trim());

        return convertView;
    }

    @Override
    public boolean hasStableIds() {
        // TODO Auto-generated method stub
        return true;
    }

    @Override
    public boolean isChildSelectable(int groupPosition, int childPosition) {
        // TODO Auto-generated method stub
        return true;
    }

    public void filterData(String query)
    {
        query = query.toLowerCase();
        Log.v("MyListAdapter", String.valueOf(continentList.size()));
        continentList.clear();

        if(query.isEmpty())
        {
            continentList.addAll(originalList);
        } else {
            for(Continent continent: originalList)
            {
                ArrayList<Country> countryList = continent.getCountryList();
                ArrayList<Country> newList = new ArrayList<Country>();
                for(Country country: countryList)
                {
                    if(country.getCode().toLowerCase().contains(query) || country.getName().toLowerCase().contains(query))
                    {
                        newList.add(country);
                    }
                }
                if(newList.size() > 0)
                {
                    Continent nContinent = new Continent(continent.getName(), newList);
                    continentList.add(nContinent);
                }
            }
        }

        Log.v("MyListAdapter", String.valueOf(continentList.size()));
        notifyDataSetChanged();
    }
}

My app uses multiple push notifications. I wish to add some kind of Intent data or any boxed-up data so that when I receive a push notification in my ParsePushBroadcastReceiver, I am able to detect what type of push notification it is and then show the user the appropriate screen. For example, if the notification is telling the user that a friend is trying to add you, it takes the user to the ContractRequest page.

This is what my Receiver currently looks like:

public class ParsePushReceiver extends ParsePushBroadcastReceiver {
    @Override
    public void onPushOpen(final Context context, final Intent intent) {
        Log.i("Push", "Notification Clicked");
        Intent activityIntent = new Intent(context, GameDetailsActivity.class);
        activityIntent.putExtras(intent.getExtras());
        activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(activityIntent);
    }
}

And this is how I typically send a push notification:

ParseQuery query = ParseInstallation.getQuery();
query.whereEqualTo(ParseUserHelper.USERNAME_VAR, contact.getUsername());
ParsePush.sendMessageInBackground(String.format("...");
....

Any ideas how I can wrap data within the notification so that when I intercept it in my receiver, I'll be able to do a switch statement which shall check what type of notification it is and then show the user the correct activity.