Hi
I am trying to work on sending an object of my "Customer" class from one activity and display on other activity.
the code for the customer class : `package com.kaibuki;
public class Customer {
private String firstName, lastName, Address;
int Age;
public Customer(String fname, String lname, int age, String address) {
firstNam...
Hi guys!
I have a main activity with this layout file:
<?xml version="1.0" encoding="utf-8"?>
<Button
android:id="@+id/btn_reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reload"
/>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width=...
I have an activity that is starting a background operation in another service. This activity receives various notifications from this service. As part of the intent I use to initiate the background operation I pass extra data with the context of my activity so the background service can broadcast intents back to me (the download service ...
Hi,
my app does something when the screen goes black, but I want it to only carry out that task if the screen was turned off "by itself", through a screen timeout - NOT when the user presses the power-button. Is there any way to distinguish between these two events?
ACTION_SCREEN_OFF obviously fires in both cases, and I haven't found a...
I'm working on an app that needs to have the user select an image or video. On pre-2.1 devices, using ACTION_GET_CONTENT seems to work fine with multiple MIME types:
new Intent(Intent.ACTION_GET_CONTENT).setType("video/*, image/*")
However, on a Droid running 2.1, this gives a "There are no items in your collection". Using the same ...
I know how to update my own programs, and I know how to open programs using the a predefined Uri (for sms or email for example)
I need to know how I can create an Intent to open MyTracks or any other application that I don't know what intents they listen to.
I got this info from DDMS, but I havn't been succesful in turning this to an I...
I am trying to implement text to speech by following this article on the Android Developers Blog. It suggests the following code for installing text to speech data if it is not supported.
Intent installIntent = new Intent();
installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
startActivity(installIntent);
This throws...
Hello everybody!!
Here is I would like to set up in my application, the function of sharing (facebook, twitter, e-mail) as that of YouTube for example but I get lost little.
By looking I saw that apparently it would be necessary to use Intent.action_pick_activity but I do not manage to see how using it on my case.
What is that somebody...
I am trying to initiate a gallery intent, but I only want it to grab photos in a specific directory.. From a different post, I received this code:
Intent intent = new Intent();
intent.setType("file:///sdcard/Pictures/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent,1);
But it's not working.. Is t...
Is there an intent that is fired when a user unlocks their screen? I want my app to adjust the brightness when the screen turns on, but the problem im running into is that the screen on intent is fired on the lock screen and it does not adjust the display on that screen.
...
Hello -
I am using an intent to capture a picture:
Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "test.jpg")));
startActivityForResult(i, 2);
And then once taken I do the...
Maybe my question might seem a bit weird, but I have an activity in which, in one case , I have to move to another activity before it finishes loading the screen. My condition is in the onCreate method, which means when I encounter it, i get a "startActivity called from outside an activity context" error and the app just crashes...
But t...
Basically, is there a way to write
a.children('.outer').children('.inner')
without the intermediate selector? I can't write
$('.outer > .inner', a)
because I don't want to do full-depth search against a — I know that the .outer elements are immediate children of a.
It's partly a matter of "elegance", but partly because I'm tryin...
Hi All,
I am developing an application using services and Remote interface.
I have a question about passing the reference of my Remote interface throughout Activities.
In my first Activity, I bind my service with my activity, in order to get a reference to my interface I use
private ServiceConnection mConnection = new ServiceConnec...
How to pass a parameter to an application that I call from my Application?
...
Hi all,
I'm using Wikitude API 1.1 as an AR viewer in my application. The problem with Wikitude, if I haven't launched the actual Wikitude application since the phone's bootup, I will get a NullPointerException everytime I start my own application.
So I figure if I can start my app first and them check if Wikitude is installed and or r...
In an Android manifest, how can I use a negative match in the android:pathPattern?
I'd like to use a pathPattern that matches on all URLs except for a specific hostname, if it's possible.
...
Hi folks,
I have an Activity (A) and a Service (S) which gets started by A like this:
Intent i = new Intent();
i.putExtra("updateInterval", 10);
i.setClassName("com.blah", "com.blah.S");
startService(i);
A have a function like this one in A:
public void someInfoArrived(Info i){...}
Now I want to call A.someInfoArrived(i) from with...
I have a weird situation with AlarmManager. I am scheduling an event with AlarmManager and passing in a string using intent.putExtra. The string is either silent or vibrate and when the receiver fires the phone should either turn of the ringer or set the phone to vibrate. The log statement correctly outputs the expected value each time. ...
Hello,
I am trying to make a task switcher and i succed in it. My only problem is that when I launch activities, they are relaunched as they were new activities ( for instance, I am writing an email, i press home and go into my activity,launch email, and then the app launch the email bout goes back at the inbox and the email is lost) So...