|
Your homework is set to test what you know, not what a bunch of random people on the Internet know.
Go back to your course notes; this is almost certainly something you will have covered recently. If you can't find it, or don't understand it, then talk to your teacher.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i created one android simple alaram app in eclipse editor. when i click the button in alaram app, it shows "unfortunately appname has stopped".
this is my layout file
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"
="" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<textview
android:id="@+id/TextView1"
="" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Android Alarm example:\n\rsetup an alarm event after 10 seconds from current time. so just press setup alaram button and wait for 10 seconds.you can see a toast message when your alarm time will reach.">
<button
android:id="@+id/setAlarm"
="" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/TextView1" android:layout_centerhorizontal="true" android:layout_margintop="25dp" android:onclick="onClicksetAlarm" android:text="Set Alarm">
this is my mainactivity.java file
package com.example.alarm;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity {
PendingIntent pendingIntent;
AlarmManager alarmManager;
BroadcastReceiver mReceiver;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
RegisterAlarmBroadcast();
}
public void OnClickSetAlarm(View v)
{
alarmManager.set( AlarmManager.RTC_WAKEUP,System.currentTimeMillis()+10000,pendingIntent);
}
private void RegisterAlarmBroadcast()
{
Log.i("Alarm Example:RegisterAlarmBroadcast()","Going to Register Intent.RegisterAlarmBroadcast");
mReceiver=new BroadcastReceiver()
{
private static final String TAG="AlarmExample Receiver";
@Override
public void onReceive(Context context,Intent intent)
{
Log.i(TAG,"BroadcastReceiver::OnReceive()>>>>>>>>>>>>>>>>>>>>>>");
Toast.makeText(context,"Wake wakeup.TimeAchu Friends",Toast.LENGTH_LONG).show();
}
};
registerReceiver(mReceiver,new IntentFilter("com.techblogon.alarmexample"));
pendingIntent=PendingIntent.getBroadcast(this,0,new Intent("com.techblogon.alarmexample"),0);
alarmManager=(AlarmManager)(this.getSystemService(Context.ALARM_SERVICE));
}
private void UnregisterAlarmBroadcast()
{
alarmManager.cancel(pendingIntent);
getBaseContext().unregisterReceiver(mReceiver);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
protected void onDestroy()
{
unregisterReceiver(mReceiver);
super.onDestroy();
}
}
|
|
|
|
|
You need to look at the diagnostic log messages to see what happened. We cannot guess what your code is doing wrong.
|
|
|
|
|
ok sir i will check in log cat and post that error..thanks for replie me sir.
|
|
|
|
|
Not one bit of error checking or exception handling in your code. How are you supposed to track down problems? Do you just assume that everything is going to work?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
DavidCrow wrote: Do you just assume that everything is going to work? Doesn't everyone? 
|
|
|
|
|
I am listening to this topic quietly, this also belongs and reflects my under developing app situation.
|
|
|
|
|
I have android project in which i have to fetch value from Spinner and store it into database how can i do it ? pls help me out give me source code if anyone have pls 
|
|
|
|
|
Sorry, but this site does not provIde code to order. If you study the documentation for the Spinner class, and whichever database you are using, you will quickly find the answers.
|
|
|
|
|
viraj138 wrote: i have to fetch value from Spinner and store it into database how can i do it ? Which piece ("fetch"ing value from Spinner, or storing it in a database) do you need help with, and how much of that do you have done?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Probably by going to the Google website and downloading the app.
|
|
|
|
|
Not sure exactly what you expect here, these forums are really for programming questions.
|
|
|
|
|
<pre lang="C#">hello am new to the world of developers and i need to execute a project in the next three month before i will be able to graduate please i need some helps</pre>
|
|
|
|
|
Good luck with that.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I don't think you can, as Chrome is a Google product and a default application. I think you can select another default browser app.
BTW, "help me" is not a proper title for a forum, and there a thousands of web pages out there on this topic...thousands; you don't really need to ask the question here.
|
|
|
|
|
thanks for your compliment sir..
|
|
|
|
|
You can disable it, or delete just the updates, but you can't remove the base app itself.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
how to write print maneger
|
|
|
|
|
is it possible to run USSD code in background and fetch data from USSD response and store it in database for later use ???
pls help me out i need it 
|
|
|
|
|
<pre lang="C#">Dialing a USSD code from a custom activity is straight forward using a DIAL or CALL intent, but listening to the returned result is not due to Android not having proper support for intercepting USSD calls within the platform, but partial though undocumented support exists within the native dialer application.
As a start, look at the PhoneUtils class in the Android source code. The link is for 4.0.3 but I believe this partial support has been present since 2.3.
Specifically, looking at line 217, an intent with the name “com.android.ussd.IExtendedNetworkService” is being composed. So what you need to do is implement your own service that responds to that intent. The service needs to be implemented according to the IExtendedNetworkService.aidl which is a part of the Android framework.
The aidl exposes several functions but the one we care about is the getUserMessage(text) function in that service. The text is the final value returned from the USSD call.
Notes:
Since the service is binded on by PhoneUtils, then you need to start the service at phone boot up. It also means that any modification to the service will need a phone reboot.
Returning null from getUserMessage will suppress the dialer from showing the USSD result but there’s no way to completely hide the dialer.
You can also use the other functions to change the text shown while the call is in progress.
This doesn’t seem to work on USSD prompts(menus), only on final results.</pre>
|
|
|
|
|
Does anyone here run Android Studio on Ubuntu (or equivalent)? I'm currently running it on Windows, but was considering switching my development environment.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I've tried, (14.04 LTS) but screwed up the install somewhere. I can create a project, etc, but when I try to run/debug it crashes on can't find adb or some such. Early days, I'll get it sorted when I have time to chase it down.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Hi All,
Has anyone had a chance to work on any Android wear apps?
I'm looking to get a Sony SmartWatch 3, but before I take the plunge I wanted to find out how the dev process works when using an iPhone as your main/sync device. From what I read, it looks like it'd work without issues.
Obv an Android phone would be better, so is it worth buying a junker on ebay just for testing & dev purposes?
Ultimately I want to make apps that will work on Android wear and be handset agnostic.
Thanks!
Stampede
|
|
|
|
|
To be honest,the best Android Wear that I know so far is called Flash Watch. It's just a watch face.
|
|
|
|
|
Hello. Can someone guide me on 'How to create an English Dictionary Application in Android Studio using SQLite. The Application is expected to have features such as
"Auto Complete English Words" and a "Text-To-Speech" feature'. Any help in this regard will be greatly appreciated!!
|
|
|
|