i am trying to connect facebook and get my details in facebook, however when i want to get my name, i get an JSONException with error: ""An active access token must be used to query information about the current user "
i marked the line which it's happen
thanks alot
this is my class:
public class MainActivity extends Activity {
private Button logInButton;
private TextView registerScre
I am setting the location values using getter setter in one class and using it in another activity class where i am getting null pointer exception. I am using singleton pattern for the same.
I'm working on dictionary database, I insert the query when the activity is first launch, it works smoothly, and at the next launch I want to prevent the insertion for the second time, I use this method to prevent insertion by checking whether the row is null or not, but it always rise a java null pointer exception in my logcat.
public boolean isEmpty()
{
boolean empty = false;
Cursor cur
I'm creating a music streaming app. As per android's MediaPlayer guide, I'm controlling the MediaPlayer from a Service. I'm avoiding binding the Activity to the Service so the music can continue to play as the screen is rotated, Activity is destroyed, etc. This all works fine and now I'm trying to add a MediaController to control playback.
I'm building an audio recorder that needs to play back the recorded sound. I'm running into a lot of trouble playing back the audio.
this is the code used in tha java class.it doesnt show any errors in eclipse.the logcat shows null pointer exception and class caste exception
package com.myfirstapp;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
public class MyfirstappActivity extends Activity {
/** Called when the activity is first created.
In my Application class, I have the following:
public void loadPrefs(){
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
Boolean soundValue = sharedPrefs.getBoolean("SOUND", false);
}
public void savePrefs(String key, boolean value){
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
Editor edit = sharedPrefs.edit();
I am a new android developer and having this problem for weeks the problem is that i am trying to open database in my android app in a service and retrieve value from it but the problem is that the database does not open in service gives null pointer exception but same code works in
activity.
this code is
public class Services1 extends Service {
Context cont = this;
@Override
public IB
Class VPADSurfaceView extends SurfaceView
Context mContext;
SurfaceHolder holder;
Handler mDuration;
private MediaPlayer mMediaPlayer;
private int mVideoWidth;
private int mVideoHeight;
private String mvideoPath = "/mnt/sdcard/naveen.mp4";
private RandomAccessFile mRandomAccessFile;
private boolean mIsVideoSizeKnown = false;
private boolean mIsVideoReadyToBePlayed = false