Monday, November 25, 2013

Error #1009: Cannot access a property or method of a null object reference. -AS3 [android help]


Error #1009: Cannot access a property or method of a null object reference. -AS3



i got this error:



TypeError: Error #1009: Cannot access a property or method of a null object reference.
at TriviaGameDeluxe/saveScore()[TriviaGameDeluxe::frame102:19]


This is my code:



//**//
playAgainbutton.addEventListener(MouseEvent.CLICK,saveScore);


function saveScore(event:MouseEvent) { // Save the score


if (savedSN == null) { // Check if a game save is created. If it is not, create one
trace("New game save created");
savedSN = { // Set the varible 'savedSN'
name1:"-",
name2:"-",
name3:"-",
name4:"-",

score1:"-",
score2:"-",
score3:"-",
score4:"-"};
soSavedScNa.data.nameScore = savedSN; // Set the data in the save file to the
savedSN variable
soSavedScNa.flush(); // Overwrite existing save file

}

//**// Save the score
if ((gameScore > savedSN.score1 || savedSN.score1 == "-") &&
gameScore != 0) {
trace("Score 1");
savedSN = { // Set the date the savedSN varible will have
name1:PName.text,
name2:savedSN.name1,
name3:savedSN.name2,
name4:savedSN.name3,
score1:gameScore,
score2:savedSN.score1,
score3:savedSN.score2,
score4:savedSN.score3};
soSavedScNa.data.nameScore = savedSN; // Set the data in
the save file to the savedSN variable
soSavedScNa.flush(); // Overwrite existing save file
playAgainbutton.removeEventListener(MouseEvent.MOUSE_UP,
saveScore);
cleanUp();
gotoAndStop(1); // Go to the start menu
} else if ((gameScore > savedSN.score2 || savedSN.score2 == "-") &&
gameScore != 0) {
trace("Score 2");
savedSN = { // Set the date the savedSN varible will have
name1:savedSN.name1,
name2:PName.text,
name3:savedSN.name2,
name4:savedSN.name3,
score1:savedSN.score1,
score2:gameScore,
score3:savedSN.score2,
score4:savedSN.score3};
soSavedScNa.data.nameScore = savedSN; // Set the data in
the save file to the savedSN variable
soSavedScNa.flush(); // Overwrite existing save file
playAgainbutton.removeEventListener(MouseEvent.MOUSE_UP,
saveScore);
cleanUp();
gotoAndStop(1);
// Go to the start menu
} else if ((gameScore > savedSN.score3 || savedSN.score3 == "-") &&
gameScore != 0) {
trace("Score 3");
savedSN = { // Set the date the savedSN varible will have
name1:savedSN.name1,
name2:savedSN.name2,
name3:PName.text,
name4:savedSN.name3,
score1:savedSN.score1,
score2:savedSN.score2,
score3:gameScore,
score4:savedSN.score3};
soSavedScNa.data.nameScore = savedSN; // Set the data in
the save file to the savedSN variable
soSavedScNa.flush(); // Overwrite existing save file
playAgainbutton.removeEventListener(MouseEvent.MOUSE_UP,
saveScore);

cleanUp();
gotoAndStop(1); // Go to the start menu
} else if ((gameScore > savedSN.score4 || savedSN.score4 == "-") &&
gameScore != 0) {
trace("Score 4");
savedSN = { // Set the date the savedSN varible will have
name1:savedSN.name1,
name2:savedSN.name2,
name3:savedSN.name3,
name4:PName.text,
score1:savedSN.score1,
score2:savedSN.score2,
score3:savedSN.score3,
score4:gameScore};
soSavedScNa.data.nameScore = savedSN; // Set the data in
the save file to the savedSN variable
soSavedScNa.flush(); // Overwrite existing save file
playAgainbutton.removeEventListener(MouseEvent.MOUSE_UP,
saveScore);
cleanUp();
gotoAndStop(1); // Go to the start menu
}
}


I cannot find where the error is.. Hope anybody can help. Thanks.



Read more

stackoverflow.comm



File object can't find the file when there is one [android help]


File object can't find the file when there is one



In my app After user clicks on a button ,the download manager starts to download a file from internet and saving it to the internal sd card using this code:



void startDownload()
{
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).mkdirs();
download_req.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE)
.setAllowedOverRoaming(false)
.setTitle(PersianReshape.reshape("Downloading"))
.setDescription(PersianReshape.reshape("currently downloading the file..."))
.setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory().getAbsolutePath() , packageId + ".sqlite");
download_ID = mgr.enqueue(download_req);
}


After it is downloaded, I plan to check its existance everytime app runs with this code:



String DatabaseAddress =
Environment.getExternalStorageDirectory().getAbsolutePath() +
"/ee.sqlite";
File file = new File(DatabaseAddress);
Log.d("PATH File: ", DatabaseAddress);
if (file.exists()){
Toast.makeText(getApplicationContext(), "found", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getApplicationContext(), "not found", Toast.LENGTH_SHORT).show();
}


Now when I run this code it returns "not found" message whereas the file is already there (I checked its existance using a file manager).


the device I test on is nexus 7 and path used in saving the download file is: /storage/emulated/0/ee.sqlite


ee.sqlite is the filename of downloaded file.


/storage/emulated/0/ is the default path returned by app


Permissions added to manifest for this code are:







Q: Why does file.exists() returns false when there is a file?



Read more

stackoverflow.comm



Disable checkbox if X are checked in android [android help]


Disable checkbox if X are checked in android



I have 15 CheckBox and I must to stuck user when he checks more than 5 CheckBox. Is it possible? I used the method OnCheckedChangeListener to know if an item was checked... but I don't know how to make a limit after 5 items selected. See what I've tried to do below:


I instante my integer:



int lengthBox = 15;
int lenghtMax = 5;


I select all my View in onCreate():



View[] tagsItem = new View[] {
findViewById(R.id.TagsCheckAA),
findViewById(R.id.TagsCheckBB),
findViewById(R.id.TagsCheckCC),
findViewById(R.id.TagsCheckDD),
findViewById(R.id.TagsCheckEE),
findViewById(R.id.TagsCheckFF),
findViewById(R.id.TagsCheckGG),
findViewById(R.id.TagsCheckHH),
findViewById(R.id.TagsCheckII),
findViewById(R.id.TagsCheckJJ),
findViewById(R.id.TagsCheckKK),
findViewById(R.id.TagsCheckLL),
findViewById(R.id.TagsCheckMM),
findViewById(R.id.TagsCheckNN),
findViewById(R.id.TagsCheckOO)
};


I create 15 CheckBox:



final CheckBox[] tagsCheck = new CheckBox[lengthBox];


Create the method (and it's here where I don't know what to do exactly):



OnCheckedChangeListener checker = new OnCheckedChangeListener(){
@Override
public void onCheckedChanged(CompoundButton cb, boolean b) {
if(tagsCheck[0].isChecked() || tagsCheck[1].isChecked() ||
tagsCheck[2].isChecked() || tagsCheck[3].isChecked() ||
tagsCheck[4].isChecked() || tagsCheck[5].isChecked() ||
tagsCheck[6].isChecked() || tagsCheck[7].isChecked() ||
tagsCheck[8].isChecked() || tagsCheck[9].isChecked() ||
tagsCheck[10].isChecked() || tagsCheck[11].isChecked() ||
tagsCheck[12].isChecked() || tagsCheck[13].isChecked() ||
tagsCheck[14].isChecked()) {
if(lenghtCount < 5){
// How can I get the String of the CheckBox
// which just checked?
String tags = (String) tagsCheck[].getText();
Toast.makeText(getApplicationContext(),
tags + " checked", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getApplicationContext(),
"Limit reached!!!", Toast.LENGTH_SHORT).show();
}
}
}
};


After this, I set my View id to my CheckBox and call the method:



for(int i = 0; i < lengthBox; i++) {
tagsCheck[i] = (CheckBox) tagsItem[i];
tagsCheck[i].setOnCheckedChangeListener(checker);
}


Can someone point me in the right way, please?


Thanks, any help will be appreciate.



UPDATE:


I found an inelegant way with an if(tagsCheck[0].isChecked() || ...). But I have still a problem: how can I get the CheckBox which just checked? Cause of my if(), I don't know how can I do this.


Thanks!



Read more

stackoverflow.comm



MediaRecorder crash [android help]


MediaRecorder crash




Very beginner in Android/Java, coming from C and Symbian, I started from the Hellworld example to try to display the sound level (the project is to record this level in a text file for hours). This code is written in the MainActivity file, as a method inside the MainActivity Class :



public void GetAFlevel(View view) throws IllegalStateException, IOException {
float audiolevel = 0, maxal = 0;
MediaRecorder mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mRecorder.setOutputFile("/dev/null");
mRecorder.prepare();
mRecorder.start();
for (int i = 0; i < 1000; i++) {
audiolevel = mRecorder.getMaxAmplitude();
if (audiolevel > maxal)
maxal = audiolevel;
}
EditText editText1 = (EditText) findViewById(R.id.editText1);
editText1.setText(String.valueOf(maxal));
mRecorder.stop();
mRecorder.release();
mRecorder = null;
}


The result is a crash of the application on the target :



11-17 00:23:09.859: D/AndroidRuntime(22096): Shutting down VM

11-17 00:23:09.859: W/dalvikvm(22096): threadid=1: thread exiting with uncaught exception (group=0x40018578)

11-17 00:23:09.921: E/AndroidRuntime(22096): FATAL EXCEPTION: main

11-17 00:23:09.921: E/AndroidRuntime(22096): java.lang.IllegalStateException: Could not execute method of the activity


No crash if I remove the following MediaRecorder functions : setAudioSource, setOutputFormat, setAudioEncoder, setOutputFile, prepare, start and stop, but getMaxAmplitude returns 0, of course.


As soon as I add only setAudioSource (normaly the only necessary for getMaxAmplitude), crash !


Any idea ?


Thanks in advance.



Read more

stackoverflow.comm



Sunday, November 24, 2013

Why can't I take screenshots in Android Emulator after installing Genymotion? [android help]


Why can't I take screenshots in Android Emulator after installing Genymotion?


Why can't I take screenshots in Android Emulator after installing Genymotion? - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
















I've installed Genyomtion android emulator. Then I realized I can't take screenshots in Eclipse DDMS view. After that, I tried to take a screenshot with standard android emulator that comes with the SDK. It didn't work. Eclipse shows me a black image instead of screenshot. It worked before I installed Genymotion! It's suspicious that Genymotion hacked my ADB, because screenshot taking is part of PAID version of GenyMotion!


Has anyone experienced the same problem? How can I get Eclipse taking screenshots again without reinstalling it?


Thanks in advance!


























It's a known bug on 4.3 images, they are working on a fix. On a 4.2.2 image it's working for me, you can try to create a 4.2.2 device to take screenshot in the meantime.


Source: On twitter @genymotion responded to @Littledot1230 on this question :)























I have just used Genymotion and Eclipse DDMS today to take a screenshot for an app store submission.


So it works on at least these versions on my Win8 Pro machine:


  • Genymotion v1.1.0

  • Android 4.2.2 10" image

  • Eclipse ADT v22.0.1

Edit: so 4.2.2 is why mine worked - thanks Bonrry























default






Read more

stackoverflow.comm



Screen becomes blank for long time while loading SherlockFragmentActivity with fragments [android help]


Screen becomes blank for long time while loading SherlockFragmentActivity with fragments



I am implementing jeremyfeinstein sliding menu library. for this I have an activity which extends SherlockFragmentActivity. for this activity I have two fragments one is for left menu and another is for Main screen. Everything is working fine and smooth but still I have a problem that is when my Sliding menu activity starts, it becomes blank for 8-10 seconds. after 8-10 seconds my main screen fragment becomes visible. this is my base class:



public class SlidingFragmentActivity extends SherlockFragmentActivity implements SlidingActivityBase {

private SlidingActivityHelper mHelper;

/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mHelper = new SlidingActivityHelper(this);
mHelper.onCreate(savedInstanceState);
}

/* (non-Javadoc)
* @see android.app.Activity#onPostCreate(android.os.Bundle)
*/
@Override
public void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
mHelper.onPostCreate(savedInstanceState);
}

/* (non-Javadoc)
* @see android.app.Activity#findViewById(int)
*/
@Override
public View findViewById(int id) {
View v = super.findViewById(id);
if (v != null)
return v;
return mHelper.findViewById(id);
}

/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onSaveInstanceState(android.os.Bundle)
*/
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mHelper.onSaveInstanceState(outState);
}

/* (non-Javadoc)
* @see android.app.Activity#setContentView(int)
*/
@Override
public void setContentView(int id) {
setContentView(getLayoutInflater().inflate(id, null));
}

/* (non-Javadoc)
* @see android.app.Activity#setContentView(android.view.View)
*/
@Override
public void setContentView(View v) {
setContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}

/* (non-Javadoc)
* @see android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
*/
@Override
public void setContentView(View v, LayoutParams params) {
super.setContentView(v, params);
mHelper.registerAboveContentView(v, params);
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)
*/
public void setBehindContentView(int id) {
setBehindContentView(getLayoutInflater().inflate(id, null));
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View)
*/
public void setBehindContentView(View v) {
setBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View, android.view.ViewGroup.LayoutParams)
*/
public void setBehindContentView(View v, LayoutParams params) {
mHelper.setBehindContentView(v, params);
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()
*/
public SlidingMenu getSlidingMenu() {
return mHelper.getSlidingMenu();
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#toggle()
*/
public void toggle() {
mHelper.toggle();
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#showAbove()
*/
public void showContent() {
mHelper.showContent();
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#showBehind()
*/
public void showMenu() {
mHelper.showMenu();
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()
*/
public void showSecondaryMenu() {
mHelper.showSecondaryMenu();
}

/* (non-Javadoc)
* @see com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled(boolean)
*/
public void setSlidingActionBarEnabled(boolean b) {
mHelper.setSlidingActionBarEnabled(b);
}

/* (non-Javadoc)
* @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)
*/
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
boolean b = mHelper.onKeyUp(keyCode, event);
if (b) return b;
return super.onKeyUp(keyCode, event);
}

}


Here is my Main activity which loads fragments



public class SliderMenuMainActivity extends SlidingFragmentActivity
{
private Fragment mContent;
ImageButton btnToggle,refresh;
String ns = Context.NOTIFICATION_SERVICE;
public static int msg_count = 0;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(obj==null)
obj=new Progress_Dialog(this);
obj.setCancelable(false);
obj.onPreExecute("MAIN Screen");
if (savedInstanceState != null)
mContent = getSupportFragmentManager().getFragment(savedInstanceState, "mContent");
prepareScreen();
}
private void prepareScreen()
{
setContentView(R.layout.activity_slider_menu_main);

ActionBar ab = getSherlock().getActionBar();
LayoutInflater li = LayoutInflater.from(this);
View customView = li.inflate(R.layout.custom_titlebar, null);
customView.setLayoutParams(new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT ,ActionBar.LayoutParams.MATCH_PARENT));
ab.setCustomView(customView);
ab.setDisplayShowHomeEnabled(false);
ab.setDisplayShowCustomEnabled(true);
if (findViewById(R.id.menu_frame) == null)
{
setBehindContentView(R.layout.menu_frame);
getSlidingMenu().setSlidingEnabled(true);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
// show home as up so we can toggle
//getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
else
{
// add a dummy view
View v = new View(this);
setBehindContentView(v);
getSlidingMenu().setSlidingEnabled(false);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
}


if (mContent == null)
mContent = new MainScreenFragment();

getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, mContent).commit();

// set the Behind View Fragment
getSupportFragmentManager().beginTransaction().replace(R.id.menu_frame, new MenuFragment()).commit();

// customize the SlidingMenu
SlidingMenu sm = getSlidingMenu();
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindScrollScale(0.25f);
sm.setFadeDegree(0.25f);
setSlidingActionBarEnabled(false);

}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
toggle();
}
return super.onOptionsItemSelected(item);
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
getSupportFragmentManager().putFragment(outState, "mContent", mContent);
}
public void switchContent(final Fragment fragment) {
mContent = fragment;
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, fragment)
.commit();
Handler h = new Handler();
h.postDelayed(new Runnable() {
public void run() {
getSlidingMenu().showContent();
}
}, 50);
}

@Override
public void onResume()
{
super.onResume();
if(obj!=null)
obj.onPostExecute();
}
}


So please help me with this and show me a way to overcome this problem. thanks in advance.



Read more

stackoverflow.comm



Tuesday, November 19, 2013

Samsung Galaxy-Q gets stuck on startscreen and recovery screen wont boot, HELP PLEASE. NEED PHONE! [General]


Samsung Galaxy-Q gets stuck on startscreen and recovery screen wont boot, HELP PLEASE. NEED PHONE!



Hey guys, just got a samsung galaxy-Q from a friend and shortly after recieving memory errors my phone got stuck on its startscreen so I looked online for help and it said to use the reboot option in the recovery screen but my phone wont launch it for some reason after trying over a thousand times.. PLEASE SOMEONE HELP!! I need my phone very urgently for buisness



Read more

forum.xda-developers.com



Monday, November 18, 2013

Android KitKat set language for Bluetooth voice dial [General]


Android KitKat set language for Bluetooth voice dial



Android KitKat set language for Bluetooth voice dial

Hi, i'm having a problem with my new Nexus 5. Please note this is my first android device.

I cant figure out how to change the input language for dialing with a bluetooth headset which is pretty annoying since most of my contacts have french names. Everything else works fine with french voice commands on the phone except for the bluetooth voice dialer which always specifies English on the top right.

Android KitKat set language for Bluetooth voice dial-bluetoothlang.jpg

Can anyone tell me how to change this? I would prefer to keep the menus un english if possible, but I have even tried removing english and setting french everywhere and it didn't change the voice dialing option.

Thank you



Read more

forum.xda-developers.com



Storage [General]


Storage



My phone is really struggling for storage so I deleted a bunch of videos and pictures worth about 150Mb. That did not make a difference at all for some reason. Anyways if I go to Settings --> Apps --> Here I see my download phone memory is almost full but my internal storage is almost empty with almost 2GB free. And is RAM has just gone to **** and is literally full. Can I remove everything for downloads if its now on my internal storage? And what can I do about the RAM? Thanks.



Read more

forum.xda-developers.com



Text inflation in Chrome on Nexus 5 [General]


Text inflation in Chrome on Nexus 5



First post and a new Android convert here, so excuse me if I at any point come across as a bit daft. Anywho...

I picked up a Nexus 5 last week and noticed that Chrome inflates text in places it shouldn't. I seems to happen on sites like Reddit or other forum/comment driven sites, with lots of text in lots of frames and elements and such. The top of the pages are fine, but after a certain point down the page everything becomes inflated. Screen cap linked to so you can see what I mean.

I haven't had the chance to play around with my phone nearly enough to confirm, but it seems to be specific to Chrome... Firefox and Opera render pages perfectly. I've reformatted the phone, made sure the OS and all apps are up to date, closed out all other apps, etc etc, to no avail. I've tried searching for an answer online, both here and elsewhere, but I can't seem to find anything. I even called Google, but the rep was a bit clueless and kept insisting it must be some kind of connectivity issue.

Anyway, it's not a huge thing, but it's annoying me to no end that I can't figure it out. Help?



Read more

forum.xda-developers.com



Adding a marker results in NullPointerException in Android [android help]


Adding a marker results in NullPointerException in Android



This is a part of my project. I am getting an arraylist of longitude and latitude from the previous class. Without the marker code, the app is working properly but when I add the marker code the app is terminating due to NullpointerException. Can anyone tell me why ?



package xyz;

import...

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class Route extends Activity {
GoogleMap map;
PolylineOptions polylineOptions;
ArrayList longitude,latitude;


@SuppressWarnings("unchecked")
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.route);
map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();

double s_latitude = latitude.get(0);
double s_longitude=longitude.get(0);


/* If I add this line the app is terminating.
map.addMarker(new MarkerOptions()
.position(new LatLng(s_latitude,s_longitude))
.title("Start Point"));
*/

longitude = (ArrayList) getIntent().getSerializableExtra("Longitude");
latitude = (ArrayList) getIntent().getSerializableExtra("Latitude");

CameraUpdate center=
CameraUpdateFactory.newLatLng(new LatLng(latitude.get(0),
longitude.get(0)));
CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);

map.moveCamera(center);
map.animateCamera(zoom);



polylineOptions=new PolylineOptions();

for(int i=0;i {
polylineOptions.add(new LatLng(latitude.get(i), longitude.get(i)));
}

polylineOptions.color(Color.BLUE);
polylineOptions.width(10);

polylineOptions.geodesic(false);


map.addPolyline(polylineOptions);


}
}


11-10 21:15:14.027: E/AndroidRuntime(25929): FATAL EXCEPTION: main 11-10 21:15:14.027: E/AndroidRuntime(25929): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sensordatacollector.smartrac/com.sensordatacollector.smartrac.Route}: java.lang.NullPointerException 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2368) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread.access$600(ActivityThread.java:151) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1330) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.os.Handler.dispatchMessage(Handler.java:99) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.os.Looper.loop(Looper.java:155) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread.main(ActivityThread.java:5536) 11-10 21:15:14.027: E/AndroidRuntime(25929): at java.lang.reflect.Method.invokeNative(Native Method) 11-10 21:15:14.027: E/AndroidRuntime(25929): at java.lang.reflect.Method.invoke(Method.java:511) 11-10 21:15:14.027: E/AndroidRuntime(25929): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1074) 11-10 21:15:14.027: E/AndroidRuntime(25929): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:841) 11-10 21:15:14.027: E/AndroidRuntime(25929): at dalvik.system.NativeStart.main(Native Method) 11-10 21:15:14.027: E/AndroidRuntime(25929): Caused by: java.lang.NullPointerException 11-10 21:15:14.027: E/AndroidRuntime(25929): at com.sensordatacollector.smartrac.Route.onCreate(Route.java:36) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.Activity.performCreate(Activity.java:5066) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1102) 11-10 21:15:14.027: E/AndroidRuntime(25929): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) 11-10 21:15:14.027: E/AndroidRuntime(25929): ... 11 more



Read more

stackoverflow.comm



Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...