Click here to Skip to main content
15,887,449 members
Home / Discussions / Android
   

Android

 
AnswerRe: Android Tester Phone Pin
Richard MacCutchan8-Apr-16 22:23
mveRichard MacCutchan8-Apr-16 22:23 
GeneralRe: Android Tester Phone Pin
StampedePress13-Apr-16 7:36
StampedePress13-Apr-16 7:36 
QuestionAndroid App Development-Security Checklist Pin
jameswilliriche6-Apr-16 2:55
jameswilliriche6-Apr-16 2:55 
AnswerRe: Android App Development-Security Checklist Pin
David Crow6-Apr-16 9:45
David Crow6-Apr-16 9:45 
Questionandroid - setup and install Custom Font in Android without root Pin
Kimo Kong5-Apr-16 21:26
Kimo Kong5-Apr-16 21:26 
AnswerRe: android - setup and install Custom Font in Android without root Pin
David Crow6-Apr-16 2:35
David Crow6-Apr-16 2:35 
AnswerRe: android coding problem?? Pin
Richard Deeming5-Apr-16 2:27
mveRichard Deeming5-Apr-16 2:27 
Questionunfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
tamillkumaran3-Apr-16 19:31
tamillkumaran3-Apr-16 19:31 
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();
}
}
AnswerRe: unfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
Richard MacCutchan3-Apr-16 21:47
mveRichard MacCutchan3-Apr-16 21:47 
GeneralRe: unfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
tamillkumaran4-Apr-16 21:38
tamillkumaran4-Apr-16 21:38 
QuestionRe: unfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
David Crow4-Apr-16 2:56
David Crow4-Apr-16 2:56 
AnswerRe: unfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
Richard MacCutchan4-Apr-16 4:23
mveRichard MacCutchan4-Apr-16 4:23 
AnswerRe: unfortunately app has stopped error in android eclipse editor , help me to rectify this error Pin
Sadaf Najjar12-Apr-16 3:46
Sadaf Najjar12-Apr-16 3:46 
QuestionAndroid Spinner Database Pin
viraj1383-Apr-16 1:07
viraj1383-Apr-16 1:07 
AnswerRe: Android Spinner Database Pin
Richard MacCutchan3-Apr-16 5:40
mveRichard MacCutchan3-Apr-16 5:40 
AnswerRe: Android Spinner Database Pin
David Crow4-Apr-16 2:58
David Crow4-Apr-16 2:58 
AnswerRe: how to instal google play store????? Pin
Richard MacCutchan1-Apr-16 23:24
mveRichard MacCutchan1-Apr-16 23:24 
GeneralRe: how to instal google play store????? Pin
Richard MacCutchan2-Apr-16 6:05
mveRichard MacCutchan2-Apr-16 6:05 
QuestionNew Students Pin
IraztsMicheal1-Apr-16 8:04
IraztsMicheal1-Apr-16 8:04 
AnswerRe: New Students Pin
David Crow1-Apr-16 9:56
David Crow1-Apr-16 9:56 
AnswerRe: help me ???? Pin
Slacker00730-Mar-16 3:18
professionalSlacker00730-Mar-16 3:18 
GeneralRe: help me ???? Pin
Member 1242558930-Mar-16 18:45
Member 1242558930-Mar-16 18:45 
AnswerRe: help me ???? Pin
David Crow30-Mar-16 10:12
David Crow30-Mar-16 10:12 
Questionxamarin android Pin
Member 1235129830-Mar-16 0:28
Member 1235129830-Mar-16 0:28 
QuestionAndroid USSD Intercept Pin
viraj13830-Mar-16 0:25
viraj13830-Mar-16 0:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.