Questions tagged [bundle]

Bundles are a group of resources.

A bundle is a directory that has a well-defined structure and can host anything from classes to controllers and web resources. Even if bundles are very flexible, you should follow some best practices if you want to distribute them.

In ASP Net MVC, bundles are used to combine multiple javascript and CSS files into one, improving the download speed of a website.

In Android bundles are, "A mapping from String values to various Parcelable types." --http://developer.android.com/reference/android/os/Bundle.html Bundles are used to save the state of activities and/or fragments as well as passing data between classes.

5102 questions
80
votes
4 answers

Advantages of using Bundle instead of direct Intent putExtra() in Android

In my android application I'm always using direct putExtra() function of Intent class to pass any number of value to new Activity. Like this: Intent i = new Intent(this, MyActivity.class); i.putExtra(ID_EXTRA1, "1"); i.putExtra(ID_EXTRA2,…
Vishal Vijay
  • 2,334
  • 2
  • 20
  • 41
79
votes
3 answers

Symfony2 - creating own vendor bundle - project and git strategy

We're considering creating our own common bundle for entity mapping and services for use within few separate apps. A bundle should be easy to modify, run, include and test. I know about Best Practices for Structuring Bundles, but I don't know what…
ex3v
  • 3,290
  • 4
  • 30
  • 49
78
votes
5 answers

Xcode 7 ERROR ITMS-90474: "Invalid Bundle", can't submit to Apple

I have an app I'm trying to submit to Apple. I've already validated it. I'm using Xcode 7 and Swift 2. When I try to submit to Apple, I get the following error: ERROR ITMS-90474: "Bundle Invalid. iPad Multitasking support requires there…
ChallengerGuy
  • 2,275
  • 5
  • 24
  • 42
74
votes
15 answers

ASP.NET Bundling - Bundle not updating after included file has changed (returns 304 not modified)

I am trying out ASP.NET Bundling with ASP.NET MVC 4 application. The situation is that I want to make a CDN style service, which has JS and CSS files to which you can address from other sites with this type address:…
72
votes
5 answers

Android: How to pass Parcelable object to intent and use getParcelable method of bundle?

Why bundle has getParcelableArrayList, getParcelable methods; but Intent has only putParcelableArrayListExtra method? Can I transmit only object, not ArrayList of one element? Then, what is getParcelable for?
yital9
  • 6,038
  • 13
  • 37
  • 51
69
votes
3 answers

Sending arrays with Intent.putExtra

I have an array of integers in the activity A: int array[] = {1,2,3}; And I want to send that variable to the activity B, so I create a new intent and use the putExtra method: Intent i = new Intent(A.this, B.class); i.putExtra("numbers",…
Kitinz
  • 1,472
  • 3
  • 16
  • 25
66
votes
4 answers

How to run a ruby script within bundler context?

I have a Ruby script called foo.rb, and I want to run it within the context of the bundler environment. How? bundle exec foo.rb doesn't work, because exec expects a shell script.
Michiel de Mare
  • 40,513
  • 27
  • 100
  • 132
66
votes
18 answers

Nokogiri 'Failed to build gem native extension' when I run bundle install

I'm running bundle install and I'm getting this error: Building nokogiri using system libraries. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb…
FabKremer
  • 2,039
  • 2
  • 14
  • 26
65
votes
5 answers

Check if extras are set or not

Is there any way to check if an extra has been passed when starting an Activity? I would like to do something like (on the onCreate() in the Activity): Bundle extras = getIntent().getExtras(); String extraStr = extras.getString("extra"); …
jalv1039
  • 1,593
  • 2
  • 16
  • 21
64
votes
7 answers

How write Java.util.Map into parcel in a smart way?

I have a Generic Map of Strings (Key, Value) and this field is part of a Bean which I need to be parcelable. So, I could use the Parcel#writeMap Method. The API Doc says: Please use writeBundle(Bundle) instead. Flattens a Map into the parcel at…
Kitesurfer
  • 3,263
  • 2
  • 25
  • 41
63
votes
1 answer

Objective C: Reading text files

I've done this before, but its not working for me now. I'm doing: NSString* path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"txt"]; NSString* content = [NSString…
Chris
  • 6,863
  • 17
  • 64
  • 108
58
votes
7 answers

How to make an iOS asset bundle?

I saw a custom asset bundle in an iOS project I evaluated, so at least I know it's possible. My issue is that I'm using a CATiledLayer with about 22,000 tiles for a given image and it takes a very long time to compile (half an hour clean build, 5-10…
michael
  • 2,272
  • 2
  • 20
  • 24
56
votes
9 answers

how do you pass images (bitmaps) between android activities using bundles?

Suppose I have an activity to select an image from the gallery, and retrieve it as a BitMap, just like the example: here Now, I want to pass this BitMap to be used in an ImageView for another activity. I am aware bundles can be passed between…
damonkashu
  • 1,723
  • 5
  • 17
  • 24
54
votes
4 answers

How to pass ArrayList from one activity to another?

I want to send Following ArrayList from one activity to another please help. ContactBean m_objUserDetails = new ContactBean(); ArrayList ContactLis = new ArrayList(); I am sending the above arraylist after adding data in…
DCoder
  • 3,304
  • 7
  • 32
  • 64
54
votes
6 answers

MVC4 StyleBundle: Can you add a cache-busting query string in Debug mode?

I've got an MVC application and I'm using the StyleBundle class for rendering out CSS files like this: bundles.Add(new StyleBundle("~/bundles/css").Include("~/Content/*.css")); The problem I have is that in Debug mode, the CSS urls are rendered out…
growse
  • 3,059
  • 6
  • 37
  • 54