Android :: Error With Putting Extra Object

Apr 13, 2010

I'm trying to pass an object from an activity to another activity. In the first activity i do:

Intent intent = new Intent(this, SecondsActivity.class); intent.putExtra("package.class", SerializableObject);

And in the second activity:

Class object = (Class) extras.getSerializable("package.class"); objetc.modifySomething(2432);

Intent intent = new Intent(this, ThirdActivity.class); intent.putExtra("package.class", SerializableObject);

But if i modify the object in the second activity, it fails when i send this object to a third activity.Why does it fail? What am i doing wrong? I just need to pass objects between diferent activities because i have an object which contains many information, and creating a Boundle would be very big and ugly in my code.

Android :: Error with putting extra object


Android :: How To Get Rid Of Extra Space From GirdView Object?

Jun 2, 2010

I'm writing an application for Android phones for Human vs. Human chess play over the internet. I was looking at some tutorials, to learn how to develop Android applications and found a very nice example of making galleries (it was a GridView usage example for making a gallery about dogs) and the idea came to draw the chess table using a GridView, because the example project also handled the point & click event and I intended to use the same event in the same way, but for a different purpose. The game works well (currently it's a hotseat version), however, I'm really frustrated by the fact that whenever I rotate the screen of the phone, my GridView gets hysterical and puts some empty space in my chess table between the columns. I realized that the cause of this is that the GridView's width is the same as its parent's and the GridView tries to fill its parent in with, but there should (and probably is) be a simple solution to get rid of this problem. However, after a full day of researching, I haven't found any clue to help me to make a perfect drawing about my chess table without a negative side effect in functionality.

View 2 Replies View Related

Android :: Getting Error / Pass Activity Object To My New Class?

Mar 26, 2010

I want to show messageBox or notification when connection lost in Static DB class but i cant use getApplicationContext() because its a static class and i tried to call other class called notification but i have error so how i could pass activity object to my new class .

View 3 Replies View Related

Android :: How Can I Get Current Activity Object In Instrumentation Object?

Sep 9, 2009

I want to do some automated testcase with Instrumentation . Suggest that my AUT has 2 Activity. After clicking the button in ther first Activity, the second one will be shown with new content base on what we enter in the first Activity.) Instrumentation provides us the function called startActivitySync() and return the Activity object for processing. My question is how we can get the pointer of the second Activity after the it is shown by clicking the button on the first activity.?

View 2 Replies View Related

Android :: Cast Picture Object To Bitmap Object

Jun 8, 2009

I would like to convert a Picture object to Bitmap object in memory, without writing data to disk.

View 2 Replies View Related

Android : Get Activity Object From Intent Object

Sep 21, 2009

I have an Activity that running on system. I can get the Intent that is used to start the activity. But i don't know how to get the Activity object from the Intent object or something else. Can anyone tell me how to do this??? Note that, I don't use Instrumentation object.

View 11 Replies View Related

Android : Convert Android.net.Uri Object To Java.net.URI Object

Feb 18, 2009

I am trying to get a FileInputStream object on an image that the user selects from the picture gallery.

This is the android URI returned by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI content://media/external/images/media/3

When I try to construct a java URI object from this object, I get an IllegalArgumentException with the exception description Expected file scheme in URI: content://media/external/images/media/3 whereas the android URI shows the scheme as content

Never found a solution for the original question. But if you want the byte stream of an image in the pictures gallery, this piece of code will do that.

CODE:...................

View 4 Replies View Related

Android :: Putting Data In SMS Sent Intent?

Dec 30, 2009

I'd like to send an sms message. If the text is too long, I split it into multiple messages. I'm trying to put some extra info into the "sent" intent to know which part has been sent, and when all the parts are complete: The message is sent, and I catch the intent when each part is sent - but the intent always has the same data in it. For example, "partIndex" is always zero, even though for the second message, it should be one. Seems like the same intent just keeps getting thrown to my broadcast receiver. What's the right way to do this?

View 1 Replies View Related

Android :: Putting Views On Top Of Other View

Feb 9, 2010

I'm still trying to figure out how best to layer views on top of other views. I want to do something like the ZoomButtons on top of a custom view. I tried getting the ZoomButtonsController's parent and then adding views, but I didn't have enough control and they ended up on top of the buttons. I've gotten close by using a FrameLayout and some gravity on the top two views. But this has some interesting effects. Since this is contained with a tab, these two top views appear on top of all four of the tab pages. I want them on top of one of those pages only. Apparently, nested FrameLayouts don't mix well. What is the proper and expected way to do this? Here is more or less my complete layout....................

View 4 Replies View Related

Android :: Putting App For Testing On My Dev Phone

Jan 29, 2009

I have gotten through signing up as an Android developer, joined Android Market, and recieved and activated my Android Developer Phone.I have my first draft application running in the emulator.The documentation suggests testing it throughly on the device, however, I don't want to put it up publicly in the Android Market until I am satisfied with the app.

1) Is there a way to privately post a testing app on Android Market? If so, would somebody please point this newbie to the HOW-TO?

2) Is there a way to push my app onto my developer phone without using Android Market? If so, would somebody please point this newbie to the HOW-TO?

I'm having more fun working with this Android stuff than I have had in years! As soon as I learn enough to contribute I'm going to be overjoyed to share it.

View 5 Replies View Related

Android :: Putting Serializable Classes Into SQL?

May 4, 2010

I have a bunch of objects that implement Serializable that I want to store in a SQL database.

I have two questions:

Is there a way to serialize the object directly into the database. Is that the best way to do it or should I Write the object out to a formatting String and put it in the database that way and then parse it back out
Write each member to the database with a field that is unique to each object.

View 3 Replies View Related

Android :: Putting Border Around TextView

Aug 16, 2010

Is it possible to draw a border around a textview?

View 3 Replies View Related

Android :: Crash - Putting Spinner In Dialog?

Aug 25, 2010

I'm trying to create a form like dialog to accept a few EditText and a spinner. Somehow I can display the spinner but then I start implementing the array and setOnItemSelectedListener it crash. Did I do anything wrong?

LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View layout = inflater.inflate(R.layout.generate_pwd, (ViewGroup) findViewById(R.id.generate_pwd));
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
Spinner spin=(Spinner)findViewById(R.id.spinner);
spin.setOnItemSelectedListener(this);
ArrayAdapter<String> pwdTypeArray = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, R.array.password_type);
pwdTypeArray.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spin.setAdapter(pwdTypeArray); builder.setView(layout);
// Now configure the AlertDialog builder.setTitle(R.string.generate_pwd_title);

View 3 Replies View Related

Android : Doesn't Show Up Add Contacts / Where Is It Putting?

Jun 21, 2010

When I add a new contact to my phone it doesn't show up in the contacts list. When I dial the number manually it shows the name of the person I am calling or that I added. Where is it putting my new contacts? Is there a group setting somewhere I missed?

I also noticed that all my numbers that were brought over from my old phone are listed twice when I go to edit a contact. They are only listed once when I look up a contact but under edit there are two screens with the same info.

View 1 Replies View Related

Android :: Strategy To Distribute Application Without Putting On Market

Nov 24, 2010

We are planning on this strategy to distribute our application to clients. We would like to get your your thoughts, if you have done something similar, in terms of whether we are missing something. We have tested this approach and it works.We want to distribute our application to our clients without putting it on the market as we do not want every one to download it. We want our clients to be able to easily get future upgrades to the application. Here is how we are planning to do this:

1. export the apk file using the Eclipse wizard.

2. put this apk file on a website. The user will be able to go to this website on the browser on the phone and install the 1st version of the app.

3. next versions of the app will have an incremented android:versionCode, and android:versionName in the manifest. A button in the settings will point to a link which will have the next version of the app. So to upgrade the user will click on this settings button and download the next version and click on the apk file to replace the old version.All subsequent versions of the app will be signed by the same certificate using the export wizard in Eclipse

View 2 Replies View Related

Android :: Putting Device To Sleep And Wake Up Programmatically?

May 23, 2009

My app seldom needs to put the device (or screen) to sleep. That is - programmatically imitate user pressing on red stop-call button. According to docs PowerManager.goToSleep() does just that, but requires android.permission.DEVICE_POWER, which is never granted to apps!

(A) What on earth should I do to get this working?
(B) How can I programmatically wake up the device.

just to clarify - I'm not interested in a wake lock solution.

View 2 Replies View Related

Android :: Putting Multiple Selector Nodes In One XML File

Jan 24, 2009

I have a layout file with 6 image buttons.Each button should show different source image based selection/focus/noselection.I am able to do this with 6 xml files under drawable folder with selector/item nodes.Is there a way to put all these selectior nodes in ONE xml file to accomplish the same.Less files means less management.

View 2 Replies View Related

Android :: ListActivity - Alter Data From SQLLite Before Putting Into Row

Dec 11, 2009

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_list);

mDbHelper = new MyDbAdapter(this);
mDbHelper.open();
fillData();

registerForContextMenu(getListView());....................

The date is actually stored as an int in the SQLLite database, and thus it displays as an integer. Does anyone know a way to create a date from the int so it doesn't display as 1216544611 (or whatever) but as "12/11/2009 11:32"?

View 2 Replies View Related

Android :: App Crashes While Putting SetContentView In Thread Class In Emulator / Solve It?

Apr 15, 2010

When I put the setContentView in thread as below, it crashes while running in emulator. code...

View 2 Replies View Related

Android :: Add Extra Language?

Jun 8, 2009

Is it possible to add extra languages to Android? My current Android phone only supports English and Chinese language input. I would like to have Dutch also, as I can use it for word completion. The question on top of that is, how to switch easily between these languages in the text input (keyboard) GUI?

View 5 Replies View Related

HTC Hero :: Putting Shortcuts

Mar 9, 2010

Okay, i love my Hero to bits and have been messing about with putting shortcuts here and there on my screen and i was just wondering, like on a pc desktop u can right click and change the name of a folder but can u do it on the hero? I don't like the word 'Handcen..' underneath my text icon, can u simply change it to 'SMS' or something?

View 3 Replies View Related

Media :: Putting A Lot Of Music

Dec 27, 2009

I tried putting a lot of music on my Droid (>5k worth of tracks).

I can browse the music my album, artist, and track just fine.

But I cannot search.

When I try to search the Music app just hangs.

View 5 Replies View Related

Android :: Extra Icons In Menu

Mar 19, 2009

When I run my app, I see about 8 or 9 icons in the main phone menu. One is to run the app, and the others actually run activities within the app.I want there to only be one icon for users.Any ideas as to why this is happening?My code is structured similar to examples from the book "Android - A Programmers Guide" by JF DiMarzio.How do I hide the other icons so users have to start at the main menu screen?

View 5 Replies View Related

Android :: IP 4G / Will AT&T Give Extra Sim Card?

Jul 26, 2010

I have a iPhone 4G and I wanting to try a Galaxy S Captivate.it should be in soon.is there a way AT&T can give me a normal sim card and I can just turn my iPhone off while I use the Captivate or do I gotta switch the sim cards out?

View 1 Replies View Related

Android :: Intent Not Extracting Extra

Aug 3, 2010

I have this code: protected void onListItemClick(ListView l, View v, int position, long id)
super.onListItemClick(l, v, position, id);
Log.i(TAG, "The id of the selected note is " + id);
Intent editNote = new Intent(this, TaskEditActivity.class);
editNote.putExtra(TasksDBAdapter.KEY_ID, id);
startActivityForResult(editNote, EDIT_TASK_REQUEST);
}And this code that retrieves the extra FROM A DIFFERENT ACTIVITY: if (savedInstanceState != null) { id = savedInstanceState.getLong(TasksDBAdapter.KEY_ID); Log.i(TAG, "Id of note = " + id);In the first code snippet, Logcat says: The id of the selected note is 2, but in the second code snippet, Logcat says: Id of note = 0. What just happened here? Any solutions to this VERY annoying problem.

View 2 Replies View Related

Android :: How To Put Vector Into Intent.extra?

Aug 20, 2010

I've started to write a small app for android. It looks very nice, but there is one thing I don't understand.I've created a new intent in the activity A and I've added a serialized vector intent.putExtra("key", vector).

View 3 Replies View Related

Android :: Shortcut Intent With Extra

Oct 15, 2010

Is there any way to put an extra into the intent launched by a shortcut?

View 1 Replies View Related

Android :: Extra Cost To Download An App?

Aug 12, 2010

Say an app is 2 dollars, but but does your network also charge you a fee for downloading something?
so its like 2 dollars + a few dollars charged by your network? and this is all using my home WIFI.

View 1 Replies View Related

Android :: How To Get Rid Of Extra Spacing In LinearLayout

Oct 6, 2010

I've built a widget that uses a LinearLayout and I've put two TextViews in the layout.
The gravity of the layout is "top".

The problem is that I get a space between the two TextViews and I can't get rid of it.

CODE:....................

As you can see I tried putting padding 0 and verticalSpacing 0 but I still get a space between them.

View 2 Replies View Related

Android :: How To Get Rid Of The Extra Gap Between A Button And Other Views

Feb 17, 2010

When I created a button view, Android always create some extra space between this button and other views below it.

In this example below, there is a button above the second button. You can see the gap between these two buttons. How can I get rid of this gap?

CODE:................

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved