Menu
  • HOME
  • TAGS

How to bundle services with android project

android,apk,google-play-services,android-bundle

Unfortunately, I don't think it's possible to bundle the actual Google Play services APK as part of your app. From the official docs: To test your app when using the Google Play services SDK, you must use either: A compatible Android device that runs Android 2.3 or higher and includes...

Unable to start activity, trouble with my own class

java,android,class,exception,android-bundle

Just try, replace points = (Point[]) myBundle.get("puntos"); with Object[] objects = myBundle.get("puntos"); points = Arrays.copyOf(objects ,objects.length, Point[].class); Let me know what happen....

Resume old activity by passing new data in bundle

android,android-intent,android-activity,android-bundle

You're going about things in the wrong way. If all you want to do is put an Integer extra into the Intent extras then don't do this... bundle.putInt("selectedTab", FEATURED_COUPONS); intent.putExtras(bundle); From the docs for putExtras(Bundle extras)... Add a set of extended data to the intent. The keys must include a...

cast soapobject to bundle

android,android-intent,android-ksoap2,android-bundle

You can't cast SoapObject to Bundle becouse it do not inherits from Bundle. As far as i know You cant send it like that becouse SoapObject dont implements Parcelable interface. Here is a discussion about the problem: How to pass object from one activity to another in Android and You...

Sending Intent from BroadcastReceiver class to currently running activity

android,android-intent,android-activity,android-bundle

you have three ways: 1) you can define your broadcast inside your MainActivity like this: in onCreate() registerReceiver(smsReceiver, new IntentFilter(SMS_RECIEVED)); and define smsReciver in MainActivity private BroadcastReceiver smsReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { //you can update textBox here handler.postDelayed(sendUpdatesToUI, 10); } }; define...

Android;size limitation of attached Parcelable?

android,android-intent,parcelable,android-bundle

Its explained on the docs here. The transaction buffer for each process is 1 mb. In my understanding the factors to be considered are: Individual size of transactions(maximum 1 mb) The number of transactions(the sum of size of all transactions should be less than 1 mb) ...

Bundle extra is returning NULL

android,android-intent,android-activity,android-bundle

startActivityForResult()'s 3rd argument(Bundle option) is not "extra" bundles. See Context#startActivity(Intent, Bundle) for detail. That is launch configuration. use Intent#putExtra(String, boolean) for boolean extras. Intent intent = new Intent(Add_Product_Page.this, CategoryListActivity.class); intent.putBoolean("for_result", true); startActivityForResult(intent, GET_CATEGORY); then boolean b = getIntent().getBooleanExtra("for_result", false); This is equivalant to boolean b = getIntent().getExtras().getBoolean("for_result"); Also you can...

How to change a value to an Activity after pressing a button in android?

android,android-activity,android-bundle

Finally i managed to fix it! First thanks to all u helped me. Now the fix is very simple. I moved the initialization of the String month to inside of onCreate method with no value. i also extended the if statement to assign the value true if was the firs...

Unable to read a parcelable object within another parcelable object

java,android,parcelable,android-bundle

You are not adding the id field to the Parcel. Modify the first line of your writeToParcel() method and add : dest.writeLong(getId()); Because of that, the entire reading is wrong....

Fragment in viewpager savedinstancestate is always null

android,android-fragments,android-viewpager,android-bundle

In your Activity which is hosting your Fragment you need to store a refernce to the fragment in the Bundle. Something like this should work for you public void onCreate(Bundle savedInstanceState) { if (savedInstanceState != null) { //Restore your fragment instance fragment1 = getSupportFragmentManager().getFragment( savedInstanceState, "fragment"); } } protected void...

Android : Should android bundle be used as a dto

java,android,design-patterns,android-bundle

Is it a good practice to use Bundles as the DTO in your android app? No, it's not. Bundle is a final class ,therefore you may not expand your own taxonomy to adapt e reuse code for the domain of your problem. What are the advantages/disadvantages of this approach? Advantages:...

Is it possible to pass ProgressDialog through Bundle?

android,progressdialog,android-bundle

ProgressDialog is too complex to pass it with Bundle. You should save PD's parameters (title, message, progress) and restore the values in a new ProgressDialog.

The correct way and place to restore bundle information on a fragment?

android,android-fragments,android-bundle

The two ways described above are exactly the correct way to initialize a new instance of the Fragment and pass the initial parameters. retrieve the initial parameters in the Fragment. In other words, you're on the right track! It should work, and you should be pleased with yourself :) EDIT:...

Is it secure to pass PIN via bundle/extras in Android?

android,android-intent,android-activity,android-bundle

On rooted device something can modify the framework to intercept Bundles so risk is higher than on non-rooted devices.

Can't receive Intent.extras() from Camera after making a photo

android,android-camera-intent,android-bundle

I would not expect data to be null there. However, there should not be any extras on that Intent. You only look for the "data" extra if you are not specifying EXTRA_OUTPUT. If you are specifying EXTRA_OUTPUT, you go get the photo from the path that you provided in EXTRA_OUTPUT,...

How to update arguments in a bundle

java,android,android-fragments,minesweeper,android-bundle

you need to put break after each case. Otherwise it falls through to the next case and so on. In your case all cases ends with default. switch (difficulty) { case 1: ... break; case 2: ... break; } ...