Android :: An Intent / Notification Of An App Start?
Feb 24, 2009I would like to know, if i can register for an intent or a notification that i could get every time android starts an application.
View 2 RepliesI would like to know, if i can register for an intent or a notification that i could get every time android starts an application.
View 2 RepliesCan you please tell me how can I start an intent to launcher the IM application on android?
View 4 Replies View RelatedI've found a problem that may random FCs on some certain phones.
Here's the code snapshot:
CODE:.............
is it possible to start a call from the android browser, let's say by clicking a link in an html file or with javascript after a button click? maybe with help of the gears api? i'd appreciate any hints, maybe an example of how to embed the intent in the html-file/in javascript.
View 3 Replies View RelatedI'm trying to start an activity out of a widget so I can't use the startActivity() function. So I'm trying to create the correct intent but I don't find what I'm missing.
View 2 Replies View RelatedI 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 Intent I can use. This is taken from when opening MyTracks manually.
CODE:..................
Is it possible to start an Intent but keep it hidden? For example now to start the intent I am using startActivitity(intent). Suppose the intent is to start a web browser, the webbrowser is shown to user. Is it possible to keep this hidden?
View 3 Replies View RelatedHow can i open the contact view with a query?
I try this:
CODE:......
I get this error: android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.SEARCH data=content://contacts/ people (has extras) }
Second Question: Is it possible to search also for address and telephone numbers? I have no problems in my own activity, it works fine. But i will start the device contact list search.
I have the following code in my application...
View 9 Replies View RelatedIn my application i want to create a shortcut (a button), to another application but i want the user to be able to select which application he wants...
So how do i access a list of all the installed applications and how do i create an intent to start any one of those applications ?
I wanted to know what is the difference between Context.startService(intent) and startService(intent) and does it matter which one is used?
View 1 Replies View RelatedHaving trouble with permissions. The error I get is this: Not allowed to start service Intent { comp= {com.commonsware.android.service/ com.commonsware.android.service.WeatherPlusService} } without permission private to package I installed the WeatherPlus app from Mark Murphy's dev book. I'm trying to call his weather service from a different app. I think I have an issue with permissions, not really sure how they work. I thought that you could just make your own, and then check against it. With that in mind, listed below is the client manifest, followed by the service manifest. I called my permission "mypermission". Code...
View 3 Replies View RelatedI'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 running. If it's not installed, go to market n download. If it's not running, then we should run it straight to background so that my app doesn't loose its focuscode...
The part I block commented is the intent to start Wikitude. But I always failed in restricting Wikitude to background. Any help?
I am getting the below error when ever i am trying to call the bind service. 02-12 20:17:25.486: WARN/ActivityManager(58): Unable to start service Intent { action=oem.android.proj2.IRemoteService }: not found
I have created the Client-Server application. At the Server site i have used the AIDL to impliment the interfaces in my Service class. At Client site i have exposed the AIDL interfaces and have one Activity that mainly do the IPC mechanism , i mean ServiceConnection, bindService and then call the Serivce of the Client site. But i am getting the error i mentioned during the bindService call.
Could you please let me know the steps mainly i have to follow to run the Client -Server Application. For time being i am running the Client .apk first and then the Server .apk, but the server one giving me error.
It would be great if you could let me know what all permission short of thing to take care, as my Client and Server code are placed at different APks, so do i need to import the Client project in my Server Project, if yes then how to impliment that.
I have read many examples of how to create notification messages.What i wanted to achieve, is because the notification will be executed by a widget, i would like the notification intent when clicked to clear it self when the user clicks on it.I do not have an activity to return to.The notification for my purposes will just plainly notify, nothing else.So what would be the code of an intent that just clear/cancel itself.The code below is an activity launched by a button(button code not included) the notification will be fired up by a background service.
View 2 Replies View RelatedI have a alarm thing going on in my app and it launches a notification that then when pressed launched an activity.The problem is that when I create more than one alarm then the activity launched from the notification gets the same extras as the first one. I think the problem is either with the intent i put in the pending intent or in the pending intent itself. I think I might need to put a flag on one of these but I dont know which one.The "details" extra is the same to every the next time a notification happens instead of having the different value.Until I set the intents I am sure that the correct value goes to the "details" so its a problem of getting the first intent everytime i press any notification. How can I make it to launch the correct intents?
View 2 Replies View RelatedI have an error when i use intent to start activity when i choose a tab
CODE:...
The erroe is Sorry! The Application has stopped unexpectedly, please try again later
I need to put a Notification in the Status bar while my app is running, but I don't want it to call back to my Activity if selected. Its meant to just be info to the user that the app is running - basically a reminder in case they press the home button and minimize it.
View 1 Replies View RelatedI set an PendingIntent on a Notification (notification.setLatestEventInfo). this intent is actually the same intent used to launch my app, only with a flag that I put in the extra (intent.putExtra(TAB_INDEX_PARAM_NAME, UPDATES_TAB_INDEX)).
So my first activity launches, it queries it's intent's extras and immediately navigates to an Alerts activity rather the normal activity on a regular launch.
The problem: from this point, every activation of my app navigates to this Alerts activity. when debugged, I find that the flag is "stuck" in the intent even though I removed/changed it. it just won't change.
How can change an extra on a giving Intent?
I've a ListActivity with a ListView, onItemClick I start an Intent. Oncreate of this Intent I make a getParent but it's null. if I do this.isChild() it's false.
mPostList.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
Intent IntentDiscution = new Intent(parent.getContext(), EcrireMessage.class);
....
IntentDiscution.putExtras(objetbunble);
parentClass.startActivity(IntentDiscution);
}
What I have here is a simple webview activity that when loaded it auto displays an ongoing notification. The idea is that people can navigate away from this activity and quickly access it again from any screen they want by pulling down the drop down menu and selecting it. Then when they want they can just close the notification by hitting the menu button and hitting exit and then the notification clears. This all works fine. However, when the notification is pressed it starts a new instance of the activity. What would I have to change to make it see if the activity has not already been destroyed and I can just call that instance back(resume it) and therefore not needing to load it again and won't need to add another activity to my stack.
package com.my.app;
import com.flurry.android.FlurryAgent;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.webkit.CookieSyncManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;
public class Chat extends Activity {
private ProgressDialog progressBar;
public WebView webview;
private static final String TAG = "Main";
private NotificationManager mNotificationManager;
private int SIMPLE_NOTFICATION_ID;
@Override
public void onStart()
{ super.onStart();
CookieSyncManager.getInstance().sync();
FlurryAgent.onStartSession(this, "H9QGMRC46IPXB43GYWU1");
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.chat);
mNotificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
final Notification notifyDetails = new Notification(R.drawable.chat_notification,"ChatStarted",System.currentTimeMillis());
notifyDetails.flags |= Notification.FLAG_ONGOING_EVENT;
Context context = getApplicationContext();
CharSequence contentTitle = "Chat";
CharSequence contentText = "Press to return to chat";
Intent notifyIntent = new Intent(context, Chat.class);
PendingIntent intent = PendingIntent.getActivity(Chat.this, 0;
notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent);
mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails);
CookieSyncManager.createInstance(this);
CookieSyncManager.getInstance().startSync();
webview = (WebView) findViewById(R.id.webviewchat);
webview.setWebViewClient(new chatClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setPluginsEnabled(true);
webview.loadUrl("http://google.com");
progressBar = ProgressDialog.show(Chat.this, "", "Loading Chat...");
}
private class chatClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i(TAG, "Processing webview url click...");
view.loadUrl(url);
return true;
} public void onPageFinished(WebView view, String url) {
Log.i(TAG, "Finished loading URL: " +url);
if (progressBar.isShowing()) {
progressBar.dismiss();
} } }
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
webview.goBack();
return true;
} return super.onKeyDown(keyCode, event);
} @Override
public boolean onCreateOptionsMenu (Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.chatmenu, menu);
return true;
} @Override
public boolean onOptionsItemSelected (MenuItem item) {
switch (item.getItemId()) {
case R.id.home:
Intent a = new Intent(this, Home.class);
startActivity(a);
return true;
case R.id.closechat: mNotificationManager.cancel(SIMPLE_NOTFICATION_ID);Intent v = new Intent(this, Home.class);
startActivity(v);
return true;
} return false;
} public void onStop() { super.onStop();
CookieSyncManager.getInstance().sync();
FlurryAgent.onEndSession(this);
} } @Commonsware
Just to be sure I have it correct, is this what you were suggesting? I was a little worried about this line:
PendingIntent.getActivity(Chat.this, 0, notifyIntent, SIMPLE_NOTFICATION_ID);
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.chat);
mNotificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
final Notification notifyDetails = new Notification(R.drawable.chat_notification,"ChatStarted",System.currentTimeMillis());
notifyDetails.flags |= Notification.FLAG_ONGOING_EVENT;
Context context = getApplicationContext();
CharSequence contentTitle = "Chat";
CharSequence contentText = "Press to return to chat";
Intent notifyIntent = new Intent(context, Chat.class);
PendingIntent intent =
PendingIntent.getActivity(Chat.this, 0, notifyIntent, SIMPLE_NOTFICATION_ID);
notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent);
notifyIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails);
CookieSyncManager.createInstance(this);
CookieSyncManager.getInstance().startSync();
webview = (WebView) findViewById(R.id.webviewchat);
webview.setWebViewClient(new chatClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setPluginsEnabled(true);
webview.loadUrl("http://google.com");
progressBar = ProgressDialog.show(Chat.this, "", "Loading Chat...");
}
I've got a receiver set up in my android application to catch android.intent.action.NOTIFICATION_REMOVE intents. On my Evo, it works fine - when a notification is cleared from the notification bar, I catch that event and can run some code. I tried running this on a Samsung Moment though, and it is never caught. So now I'm trying to figure out why, and I can't seem to find anything on Google about this intent action - and I set this code up a few months ago, so I don't remember where I even found this action, it doesn't seem to be in the API.
The evo is running 2.2, and the moment is running 2.1-update1, so I'm guessing that it's undocumented, and only available in 2.2. Is there any other way to catch an event that a notification has been cleared? Note that I'm not trying to cancel a notification that I put up, or trying to cancel another app's notification, just catch an event when a notification has been cleared.
Here's my receiver in AndroidManafest.xml:
CODE:....................
How can i start my own activity when a new notification arrives to our status bar if click that notification my activity should play...
View 4 Replies View RelatedI am getting following message when i try to launch service.Also is there any specific path on file system where we need to place the .apk file which contains my serivce component only.
View 2 Replies View RelatedI have created an activity which sends a number of notifications to status bar. Each notification contains an intent with a bundle.
Here is the code:
CODE:..............
When user clicks this notifications, I read the bundle string "action" and performs that action. Here is the code:
CODE:.................
Everything works as expected. But, when I minimize the app using "arrow" button on device and then press and hold home button and clicks on my app icon the application starts and performs the same last action which have been performed by clicking the last notification. I figured out that when we click the app icon the application starts with last intent triggered by the notification.
Is it possible to get an intent when the user receives a mail and to cancel the gmail notification?
I want to filter some messages and I do not want to get notifications from them.
Has anyone been successful showing a notification, starting an activity, or loading the home screen *during* a call on the Droid? All three of these actions can be done with the emulator running 2.0, but will not run from the Droid. I don't receive any type of notification that these actions fail on the Droid. Although, every action works when a call is *not* active. Missed calls during a call *do* show up in the notification bar, so I am hoping there is a way.
I understand that the notification bar can not be accessed by users during calls, but it would be nice if a notification could at least be delivered. I also understand the security and usability concerns of displaying a window or action during phone calls. Although, there are a lot of users who would like actionable functionality based on calls.
So im running SmokedGlass 4.5 and i've been having some problems that i was wondering if anyone has had or knows a fix for etc...So im overclocking and it seems kind of stable at 800 but as soon as i bump it up to 1000 i have some problems with force close and it seems kinda buggy. anyone else have this problem or knwo anything about it? it also will glitch out like crazy sometimes if im just on the homescreen where the notification bar will just bug out and start going up and down and the lancher will open and i will scroll thru and it will just go up and down and select random apps.
View 17 Replies View RelatedI have gotten a "Sending..." notification at the bottom of my screen when I turn my phone on. Also, my phone gets a bit warm and the battery doesn't last a half a day. I use Handcent and have cleared the cache and the "unsent messages". I don't know what other program is sending things. It sucks.
View 2 Replies View RelatedIs there a way of telling the phone with apps (not necessary for the proper functioning of the phone) start at start-up and which don't? I hate for unnecessary apps to auto start.
View 1 Replies View Related