Click here to Skip to main content
       

Mobile

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AdminForum Guidelines - PLEASE READadminChris Maunder28 Jul '09 - 2:38 
When posting your question please:
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
     
  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
     
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
     
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
     
  5. Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
     
  6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
     
  7. If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
     
  8. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
     
  9. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
     
  10. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
     
  11. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
     
  12. No advertising or soliciting.
     
  13. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
 
When answering a question please:
  1. Read the question carefully
     
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
     
  3. If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
     
  4. If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
 
cheers,
Chris Maunder
 
The Code Project Co-fou
QuestionLow ethernet speed problemmemberA_Fa18 May '13 - 20:57 
Hi all.
In a design which is developed an application in VxWorks over ML507 evaluation board that receives some files through a ftp server via GB ethernet. OS of ftp server is Win XP. Problem is low speed of the network that is 110 MB/S. If evaluation board replaced with a PC that run client application on windows xp and get same files from same ftp server, speed is 700 MB/s.
Please help me.
AnswerRe: Low ethernet speed problemmvpRichard MacCutchan18 May '13 - 21:08 
A_Fa wrote:
Please help me.
With what? You can see what the problem is.
Use the best guess

GeneralRe: Low ethernet speed problemmemberA_Fa18 May '13 - 21:16 
Dear Richard
Thank you for your quick answer, as I mentioned in the question and its title the problem is : "Low ethernet speed"
Does you have any experience with VxWorks?
GeneralRe: Low ethernet speed problemmvpRichard MacCutchan18 May '13 - 21:51 
A_Fa wrote:
Does you have any experience with VxWorks?
None whatsoever, but it seems fairly obvious from your description that it is not as fast as a PC. I would suggest you try the VxWorks website[^] for assistance.
Use the best guess

QuestionHow to develop a sample android app in MS Visual Studio using C#.net ?memberRabbil17 May '13 - 21:07 
This is my first step towards android development to learn being enthusiastic to develop some app for android OS using VS in C#. I've experience in .net web and windows app so can i use my .net skill to build an app for android ? I know their I've to install a sdk, but what after that ? where to start from and how to... ?
 
So can some body help me in sharing some links/materials/etc to be a "android enthusiasts".

 
Hope for an early response !
Thanks And Regards,
Rabbil

AnswerRe: How to develop a sample android app in MS Visual Studio using C#.net ?mvpRichard MacCutchan17 May '13 - 22:52 
Try https://www.google.com/search?q=android+c%23[^].
Use the best guess

QuestionHaving Problem to Run JTwitter.jar in Android.membermAzeem2211 May '13 - 1:58 
I am trying to run this coding in Android...
 
<b>public void onClick(View v) {
 
final String status = editstatus.getText().toString();
new Thread() {
     public void run() {
              try {
     Twitter twitter = new Twitter("student", "password");
               twitter.setAPIRootUrl("yamba.marakana.com/api");                         twitter.setStatus(status);
                    } catch (TwitterException e) {
     Log.d("StatusActivity", "TwitterException" + e);
     e.printStackTrace();
          }
     }
}.start();
         
Log.d("StatusActivity", "onClicked " + status);
 
     }</b>
 
// and i get the error
 
<b>05-11 16:47:20.526: D/gralloc_goldfish(1037): Emulator without GPU emulation detected.
05-11 16:47:21.455: W/IInputConnectionWrapper(1037): showStatusIcon on inactive InputConnection
05-11 16:56:26.915: E/dalvikvm(1037): Could not find class 'winterwell.jtwitter.Twitter', referenced from method com.example.listviews2.StatusActivity$1.run
05-11 16:56:26.915: W/dalvikvm(1037): VFY: unable to resolve new-instance 562 (Lwinterwell/jtwitter/Twitter;) in Lcom/example/listviews2/StatusActivity$1;
05-11 16:56:26.925: D/dalvikvm(1037): VFY: replacing opcode 0x22 at 0x0000
05-11 16:56:26.925: W/dalvikvm(1037): VFY: unable to resolve exception class 563 (Lwinterwell/jtwitter/TwitterException;)
05-11 16:56:26.925: W/dalvikvm(1037): VFY: unable to find exception handler at addr 0x14
05-11 16:56:26.925: W/dalvikvm(1037): VFY:   rejected Lcom/example/listviews2/StatusActivity$1;.run ()V
05-11 16:56:26.938: W/dalvikvm(1037): VFY:   rejecting opcode 0x0d at 0x0014
05-11 16:56:26.938: W/dalvikvm(1037): VFY:   rejected Lcom/example/listviews2/StatusActivity$1;.run ()V
05-11 16:56:26.938: W/dalvikvm(1037): Verifier rejected class Lcom/example/listviews2/StatusActivity$1;
05-11 16:56:26.938: D/AndroidRuntime(1037): Shutting down VM
05-11 16:56:26.938: W/dalvikvm(1037): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
05-11 16:56:26.984: E/AndroidRuntime(1037): FATAL EXCEPTION: main
05-11 16:56:26.984: E/AndroidRuntime(1037): java.lang.IllegalStateException: Could not execute method of the activity
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.view.View$1.onClick(View.java:3039)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.view.View.performClick(View.java:3480)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.view.View$PerformClick.run(View.java:13983)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.os.Handler.handleCallback(Handler.java:605)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.os.Handler.dispatchMessage(Handler.java:92)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.os.Looper.loop(Looper.java:137)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.app.ActivityThread.main(ActivityThread.java:4340)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at java.lang.reflect.Method.invokeNative(Native Method)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at java.lang.reflect.Method.invoke(Method.java:511)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at dalvik.system.NativeStart.main(Native Method)
05-11 16:56:26.984: E/AndroidRuntime(1037): Caused by: java.lang.reflect.InvocationTargetException
05-11 16:56:26.984: E/AndroidRuntime(1037):      at java.lang.reflect.Method.invokeNative(Native Method)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at java.lang.reflect.Method.invoke(Method.java:511)
05-11 16:56:26.984: E/AndroidRuntime(1037):      at android.view.View$1.onClick(View.java:3034)
05-11 16:56:26.984: E/AndroidRuntime(1037):      ... 11 more
05-11 16:56:26.984: E/AndroidRuntime(1037): Caused by: java.lang.VerifyError: com/example/listviews2/StatusActivity$1
05-11 16:56:26.984: E/AndroidRuntime(1037):      at com.example.listviews2.StatusActivity.onClick(StatusActivity.java:32)
05-11 16:56:26.984: E/AndroidRuntime(1037):      ... 14 more
05-11 16:56:29.085: I/Process(1037): Sending signal. PID: 1037 SIG: 9
</b>
SuggestionRe: Having Problem to Run JTwitter.jar in Android.professionalPrasad Khandekar16 May '13 - 5:18 
Hello,
 
Make sure that all required dependencies are bundled with your apk file. The error clearly indicates that the program was unable to resolve/load the requested class.
 
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.

QuestionReal-time messaging applicationmemberaali838 May '13 - 21:36 
I am trying to build a real-time messaging application for android. I am not sure what approach to take in this regard. Building an entire server/client architecture is a huge task that can take sometime (with some flaws no doubt). Using an existing infrastructure like pusher (pusher.com) or pubnub (pubnub.com) is expensive and I can't afford that road. For anyone who has experience with this sort of problem please provide me with some guidance and help. This is my first network based application so any guidance will be much appreciated.
SuggestionRe: Real-time messaging applicationprofessionalPrasad Khandekar16 May '13 - 5:21 
Hello,
 
Have a look at these tutorials.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.

NewsGame Appsmemberjalsonia8 May '13 - 9:23 
i make an Animation based game in J2ME(java) for low memory and small screen size mobile.Any one have any idea how to sell or promote this apps. if any mail or suggest me
GeneralRe: Game AppsmvpAbhinav S15 May '13 - 8:17 
You can use an advertisement portal like LeadBolt[^] from within this application.

GeneralRe: Game Appsmemberjalsonia15 May '13 - 11:05 
thank a lot bro...
Question.NET Developer beginning to develop Mobile Apps which tool should I use? What do you use?memberVixanna8 May '13 - 4:59 
I am currently a .Net developer who has been tasked to pick out a tool for Mobile Development. I have looked at Phone Gap, Titanium, and a few others. The tool should be able to decrease development time of applications for IOS, Android and Windows phones and tablets.
 
I am curious as to what tools developers are using and if they would choose the same product again.
Thanks!
Vix

SuggestionRe: .NET Developer beginning to develop Mobile Apps which tool should I use? What do you use?professionalPrasad Khandekar16 May '13 - 5:30 
Hello,
 
I am using PhoneGap for developing cross-platform mobile business applications (HTML5/Javascript/Twitter Bootstrap/JQuery). However I do think that there is no better tool than Visual Studio Express 2012 for Windows Phone, though limited for Windows Phone 8 only.
 
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.

QuestionSuggestions on Sensor APImemberNitin29057 May '13 - 21:07 
Hi,
 
I am beginner in Android and trying to implement my game idea on Android. what i want, When we blow by mouth on the screen of Android Device we have to detect it's force value in our application.
 
It's is possible in android??..please give some suggestions how we can do it. will be highly thankful to you.
Questionthis my friends question on android application which i am not able to solve please let help my friendmemberMember 97729226 May '13 - 3:47 
I am new to android programming,while i am running my application i am getting of lots of error in Logcat i dont know what to do plz help me
this is the error which i am getting:




05-06 18:20:26.916: D/AndroidRuntime(329): Shutting down VM
05-06 18:20:26.926: W/dalvikvm(329): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-06 18:20:26.946: E/AndroidRuntime(329): FATAL EXCEPTION: main
05-06 18:20:26.946: E/AndroidRuntime(329): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{aniket.gmsfinal/aniket.gmsfinas.MainActivity}: java.lang.ClassNotFoundException: aniket.gmsfinas.MainActivity in loader dalvik.system.PathClassLoader[/data/app/aniket.gmsfinal-1.apk]
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.os.Looper.loop(Looper.java:123)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-06 18:20:26.946: E/AndroidRuntime(329): at java.lang.reflect.Method.invokeNative(Native Method)
05-06 18:20:26.946: E/AndroidRuntime(329): at java.lang.reflect.Method.invoke(Method.java:507)
05-06 18:20:26.946: E/AndroidRuntime(329): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-06 18:20:26.946: E/AndroidRuntime(329): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-06 18:20:26.946: E/AndroidRuntime(329): at dalvik.system.NativeStart.main(Native Method)
05-06 18:20:26.946: E/AndroidRuntime(329): Caused by: java.lang.ClassNotFoundException: aniket.gmsfinas.MainActivity in loader dalvik.system.PathClassLoader[/data/app/aniket.gmsfinal-1.apk]
05-06 18:20:26.946: E/AndroidRuntime(329): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
05-06 18:20:26.946: E/AndroidRuntime(329): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
05-06 18:20:26.946: E/AndroidRuntime(329): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-06 18:20:26.946: E/AndroidRuntime(329): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
05-06 18:20:26.946: E/AndroidRuntime(329): ... 11 more
05-06 18:20:31.407: I/Process(329): Sending signal. PID: 329 SIG: 9
AnswerRe: this my friends question on android application which i am not able to solve please let help my friendmember0xr00t3r11 May '13 - 16:16 
This is the error because you have not added the class in your Android Manifest file. Try adding the class name i.e activity to your Manifest.xml and run it. It must work.. Thumbs Up | :thumbsup:
AnswerRe: this my friends question on android application which i am not able to solve please let help my friendmembermekalareddy13 May '13 - 4:37 
I thick you changed manifest.xml
 
in that see wheather the
is there
QuestionAndroid Orientation with Videomemberkeyur satyadev6 May '13 - 0:26 
Hi All,
 
I am just developing one Android app, in which we have to capture the video. Now user will capture the video in portrait view but while it will play, it will automatically play in landscape.
 
i.e. video is capture in portrait view, though it will play in landscape view. when i will check in memory card, video is still captured in portrait view and also while playing video from memory card, it will play in portrait view.
 
I have checked, manifest file and seems all files are fine.
 
Please let me know if any one have any idea.
 
Regards
Keyur Satyadev

AnswerRe: Android Orientation with VideomemberShruti Sruchika7 May '13 - 0:08 
Actually i have same problem so when you find please share with me.Thanks
GeneralRe: Android Orientation with Videomemberkeyur satyadev7 May '13 - 22:21 
Which Device you are using? Its working fine with my HTC but having issue with Samsung.
 
Regards
Keyur Satyadev

QuestionAndroid activity inheritancemembershja884 May '13 - 4:23 
Hello,
I've been trying to make my first Android app.
I created a library project that cointain an activity called 'Reader':
public class Reader extends Activity {
    private String ID;
    public void setID(String id) {
	ID = id;
    }
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_reader);
    }
 
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
	getMenuInflater().inflate(R.menu.activity_reader, menu);
	return true;
    }
}
 
also i created a (test) project that contain another activity called 'MainActivity':
public class MainActivity extends Reader {
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setID("bla_bla_bla");
    }
}
 
when it comes to the GUI the inheritance is working well, i can see everything I placed in 'Reader' on 'MainActivity', but when it comes to using inherited methods such as 'setID(String)' i get a compilation error
Eclipse Quote:
The method setID(String) is undefined for the type MainActivity

 
How can it be?
 
thank you very much!!!
Questionandroid activity inheritancemembershja884 May '13 - 3:59 
Hello,
I've been trying to make my first Android app.
I created a library project that cointain an activity called 'Reader':

QuestionMessage Automatically Removedmemberfootballs1 May '13 - 7:41 
Message Automatically Removed
NewsMessage Automatically RemovedmemberStaceycook0322 Apr '13 - 14:02 
Message Automatically Removed
Questionhow to execute adb commands from dialog based application?memberLe@rner12 Apr '13 - 0:28 
hi all,
 
how can I execute adb command for android mobile phone from my dialog based application and get return value of these command in application and show.
 
please help me for this.
 
thanks in advance.
QuestionWindows Phone 8 SQLite QuestionmemberTony Palumbo11 Apr '13 - 8:11 
How do I add method for last_insert_rowid
 
I added a record to the table. As soon as it is entered I want to get the rowed that SQLite gave to it. How can I accomplish this?
AnswerRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon11 Apr '13 - 9:07 
You should be able to use last_insert_rowid for the last row id that was inserted for that connection. Basically, inside the same connection, issue a separate select command:
SELECT last_insert_rowid
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo11 Apr '13 - 9:27 
Hi Pete,
 
I tried this and it wont let me compile. I don't know the correct syntax. There is not much out there for WP8 SQLite
 
string query = "select last_insert_rowid() as id from myTable";
 
using (var db = new SQLite.SQLiteConnection(System.IO.Path.Combine(ApplicationData.Current.LocalFolder.Path, "SM.db"), true))
{
               
                
   SQLite.SQLiteCommand cmd = new SQLite.SQLiteCommand(db);
   var result = cmd.ExecuteNonQuery();
}
 

GeneralRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon11 Apr '13 - 9:28 
No. Only select last_insert_rowid();. You don't need the rest. There's a reaaon I didn't include it in my answer there.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo11 Apr '13 - 10:02 
I tried that and I get this error
 
SQLite.SQLiteException: Misuse
 

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo11 Apr '13 - 10:07 
I tried this also and the error is "Row"
 
SQLite.SQLiteCommand cmd = new SQLite.SQLiteCommand(db);
cmd.CommandText = query.ToString();
var result2 = cmd.ExecuteNonQuery();
GeneralRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon11 Apr '13 - 10:31 
If you're trying to retrieve the record, use ExecuteScalar, not ExecuteNonQuery.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo12 Apr '13 - 2:01 
Ok,
 
So what is the syntax for that?
cmd.ExecuteScalar< ? >;
 
Sorry, I just don't know SQLite
GeneralRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon12 Apr '13 - 2:55 
It should just be something like:
private int GetLastRowId(SQLLite.SQLLiteConnection connection)
{
  SQLLite.SQLLiteCommand cmd = new (connection);
  cmd.CommandText = "SELECT last_insert_rowid";
  object rowId = cmd.ExecuteScalar();
  return Convert.ToInt32(rowId);
}
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo12 Apr '13 - 3:22 
Thanks Pete
GeneralRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon12 Apr '13 - 3:25 
No problem.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberSanjay22Tomar18 Apr '13 - 0:59 
Cursor cursor = getReadableDatabase().
  rawQuery("select * from todo where _id = ?", new String[] { id });

QuestionInvoke a secure web service from J2MEmemberEng.Fatima M10 Apr '13 - 22:20 
Confused | :confused: Confused | :confused: Confused | :confused:
Hello
I need your help ...
How can I invoke an HTTPS web service from J2ME??
Suppose there is a HTTPS site contains a web service , and I want to invoke this web service from a J2ME Application exists in my mobile phone , How I can do that ???
Please Any helpful Article or project or Video send me...
Thank you all..
I am waiting your reply.....
AnswerRe: Invoke a secure web service from J2MEmemberPrasad Khandekar30 Apr '13 - 4:03 
Hello,
 
Here[^] is a good tutorial available on IBM Developerworks.
 
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.

GeneralRe: Invoke a secure web service from J2MEmemberEng.Fatima M10 May '13 - 1:57 
Thank you Prasad P. Khandekar
I ll read chapters ...
QuestionWindows Phone 8 SQLite QuestionmemberTony Palumbo10 Apr '13 - 6:43 
I have a Windows Phone 8 App using SQLite (C#, XAML) I want to create records in my table in code. I tried an experiment by just placing a button on my window that executes a counter to create 10 records in my database. When I execute it, I get no errors, but the records are not in the database. Could you tell me what I am doing wrong?

 
For instance, with my DataModel:

class Test
{
[SQLite.AutoIncrement, SQLite.PrimaryKey]
public int TestID { get; set; }
public int MyCounter { get; set; }
}

And my View Model

public class TestViewModel : ViewModelBase
{
#region Properties
 
private int testid = 0;
public int testid
{
get
{ return testid; }
set
{
if (testid == value)
{ return; }
testid = value;
RaisePropertyChanged("TestID");
}
}
 
private int mycounter = 0;
public int MyCounter
{
get
{ return mycounter ; }
set
{
if (mycounter == value)
{ return; }
mycounter = value;
RaisePropertyChanged("MyCounter");
}
}
 
#endregion
 

public string SaveRecord(TestViewModel _vm)
{ string result = string.Empty;
using(var db = new SQLite.SQLiteConnection(app.DBPath))
{
 
string change = string.Empty;
try
{
var er = (db.Table().Where(
c => c.TestID == _vm.TestID)).SingleOrDefault();
if (er != null)
{
er.MyCounter = _vm.MyCounter;
int success = db.Update(er);
}
else
{
int success = db.Insert(new Test()
{
TestID = _vm.TestID,
MyCounter = _vm.MyCounter,
});
}
result = "Success";
}
catch (Exception ex)
{
StringBuilder erMessage = new StringBuilder();
erMessage.Append("This record was not saved.");
erMessage.AppendLine();
erMessage.Append(ex);
result = "This record was not saved.";
}
}
return result;
}
 
}

So in my Window I just tried a test

 
public partial class MyWindow : PhoneApplicationPage
{
RoundShotTest mytest = null;
…..
….
}
 

private void buttonTryMe_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
For(int x = 0; x < 10; x++)
{
mytest = new TestViewModel();
mytest.MyCounter = x;
string result = mytest.SaveRecord(mytest);
}

What am I doing wrong here. I get no error, but when I take a look in the database, the records have not been written?
AnswerRe: Windows Phone 8 SQLite QuestionprotectorPete O'Hanlon10 Apr '13 - 6:49 
Where do you look in the database? In your debug directory, or in the directory it was originally in? When you develop an application in Visual Studio, the Compile Options (in the Properties page for a particular file) tell you whether or not the file is going to be copied to a different location. Immediately after your loop, select a count of the records to see how many there are.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Windows Phone 8 SQLite QuestionmemberTony Palumbo10 Apr '13 - 7:13 
Hi Pete,
 
The db file itself is marked Build Action is set as Content, and Copy to Output Directory is set as Copy if Newer.
 
In my App.xaml I have:
 
 public partial class App : Application
    {
        public static IsolatedStorageSettings myappsettings = IsolatedStorageSettings.ApplicationSettings;
        private string dbName = "SM.db";
        public const string ConnectionString = @"isostore:/SM.db";
        private string dBPath = string.Empty;
        public static SQLiteAsyncConnection Connection { get; set; }
        public string DBPath
        {
            get
            { return dBPath; }
 
            set
            {
                if (dBPath == value)
                { return; }
 
                dBPath = value;
            }
        }
 
Whats even more weird is that I did this on another app, without the exception of the counter, and it worked. I'm lost?
QuestionEmergencymemberkakah100010 Apr '13 - 1:00 
Recently, i hired a developer to develop a game for iphone and ipad for me but now i'm quite worry that he will submit it before give it to me, so what can i do to avoid this.
AnswerRe: EmergencyprofessionalKenneth Haugland10 Apr '13 - 1:06 
We are just developers not leagal adviseres...
GeneralRe: Emergencyprofessionalfrazzle-me15 Apr '13 - 12:01 
I don't know why the 1 voted But I 5'd to make up for it.
Frazzle the name say's it all


Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods

AnswerRe: Emergencyprofessionalfrazzle-me10 Apr '13 - 2:08 
My advice would be to contact a lawyer. I also would consider contacting the apple store.
Frazzle the name say's it all


Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods

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


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 19 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid