I've checked all the articles I could on this, and I can't figure out how to fix this.
I'm writing an app that will take the information from a picker (which has two columns) and populate that into a label after a button is pressed. There are no crashes or anything. The only thing in the log is a line that says:
Unknown class ***PickerView in Interface Builder file.
I've attempted clearing the build and 4 other suggestions I found searching around, and I can't get rid of that. PickerView is in the compile sources.
Here is the code for the label updating (just ignore what I commented out, the spacing on iPhone vs the xib were different):
-(IBAction)buttonPressed
{
NSInteger jobRow = [doublePicker selectedRowInComponent:kJobsList];
NSInteger hourRow = [doublePicker selectedRowInComponent:kHoursList];
NSString *job = [jobTypes objectAtIndex:jobRow];
NSString *hour = [hoursTypes objectAtIndex:hourRow];
NSString *message = [[NSString alloc] initWithFormat:#"%# %#", job, hour];
int /*one=0, two=0,*/ three=0, four=0, five=0, six=0;
bool done = YES;
while(!done)
{
/*if(one == 0)
{
label1.text = message;
one = 1;
done = NO;
break;
}
if(two == 0)
{
label2.text = message;
two = 1;
done = NO;
break;
}*/
if(three == 0)
{
self.label3.text = message;
[label3 setNeedsDisplay]; // This is a line of something I found online to try
three = 1;
done = NO;
break;
}
if(four == 0)
{
self.label4.text = message;
four = 1;
done = NO;
break;
}
if(five == 0)
{
self.label5.text = message;
five = 1;
done = NO;
break;
}
if(six == 0)
{
self.label6.text = message;
six = 1;
done = NO;
break;
}
}
}
Any suggestions?
Related
I'm trying to update my app to work with androids new scoped storage rules in Android 10 and up, but am having the hardest time with it. I know I need to rebuild my app with new versions of java, but I just want to get it to work while I study and learn enough to do so. In a nutshell, I really need help. I have read so many different ways to make scoped storage work, and everybody seems to be doing it differently.
Just for clarification, what I am trying to do with the uri is both display in an imageview, then upload to database.
This code is working to take a picture and select images and videos in android 9, but in android 10, it only works when camera component captures a picture or a video. When a user selects an image or video from file, it returns a null pointer exception. Because I am pretty sure the error is in how I am dealing with the different chooser intents, I have shown the on result code first.
I have been unable to find a clear example of how to retrieve a usable image or video uri in android 10. If anybody can help, I would really appreciate it. I know I have much to learn.
if ((new java.io.File(_filePath)).exists()){
} else {
_filePath = vidfile.getAbsolutePath();
if ((new java.io.File(_filePath)).exists()){
} else {
ArrayList<String> _filePath_1 = new ArrayList<>();
if (_data != null) {
if (_data.getClipData() != null) {
for (int _index = 0; _index < _data.getClipData().getItemCount(); _index++) {
ClipData.Item _item = _data.getClipData().getItemAt(_index);
_filePath_1.add(FileUtil.convertUriToFilePath(getApplicationContext(),
_item.getUri()));
}
}
else {
_filePath_1.add(FileUtil.convertUriToFilePath(getApplicationContext(),
_data.getData()));
}
}
_filePath = _filePath_1.get((int)0);
}
}
Just in case I am wrong, here is the code for the click event to launch the chooser...
SimpleDateFormat date1 = new SimpleDateFormat("yyyyMMdd_HHmmss");
String fileName1 = date1.format(new Date()) + ".jpg";
picfile = new
File(getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DCIM).getAbsolutePath() +
File.separator + fileName1);
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri _uri_camr1 = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
_uri_camr1 = FileProvider.getUriForFile(getApplicationContext(),
getApplicationContext().getPackageName() + ".provider", picfile);
}
else {
_uri_camr1 = Uri.fromFile(picfile);
}
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, _uri_camr1);
takePictureIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
SimpleDateFormat date2 = new SimpleDateFormat("yyyyMMdd_HHmmss");
String fileName2 = date2.format(new Date()) + ".mp4";
vidfile = new
File(getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DCIM).getAbsolutePath() +
File.separator + fileName2);
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
Uri _uri_camr2 = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
_uri_camr2 = FileProvider.getUriForFile(getApplicationContext(),
getApplicationContext().getPackageName() + ".provider", vidfile);
}
else {
_uri_camr2 = Uri.fromFile(vidfile);
}
takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, _uri_camr2);
takeVideoIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
contentSelectionIntent.setType("*/*");
contentSelectionIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
Intent[] intentArray = new Intent[]{ takePictureIntent, takeVideoIntent};
chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent);
chooserIntent.putExtra(Intent.EXTRA_TITLE, "Choose an action");
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentArray);
startActivityForResult(chooserIntent, REQ_CD_CAMR);
try this code. it copies the selected file to scoped storage and gives you the final path of scoped storage from where you can access it. try it out & let me know if you face any problem.
android.net.Uri sharedFileUri = android.net.Uri.fromFile(new java.io.File(_filepath));
java.io.FileInputStream input = null;
java.io.FileOutputStream output = null;
try {
String filePath = new java.io.File(getCacheDir(), "tmp").getAbsolutePath();
android.os.ParcelFileDescriptor pfd = getContentResolver().openFileDescriptor(sharedFileUri, "rw");
if (pfd != null) {
java.io.FileDescriptor fd = pfd.getFileDescriptor();
input = new java.io.FileInputStream (fd);
output = new java.io.FileOutputStream (filePath);
int read;
byte[] bytes = new byte[4096];
while ((read = input.read(bytes)) != -1) {
output.write(bytes, 0, read);
}
java.io.File sharedFile = new java.io.File(filePath);
String finalPath = sharedFile.getPath(); // this will provide you path to scoped storage. use this final path to access the selected file from scoped storage.
}
}catch(Exception ex) {
android.widget.Toast.makeText(this, ex.toString(), android.widget.Toast.LENGTH_SHORT).show();
} finally {
try {
input.close();
output.close();
} catch (Exception ignored) {
}
}
I'd like to understand how the options for the screen adjustments such as "Fit Screen", "Original", "Best Fit" are set, if it's possible to keep only specific options.
I tried this bellow, the video opens in fill size, but if I press the Size button it still has the other options:
var myString = "Fit screen";
byte[] bytes = Encoding.Default.GetBytes(myString);
myString = Encoding.UTF8.GetString(bytes);
MediaPlayer = new MediaPlayer(media) { EnableHardwareDecoding = true, AspectRatio = myString };
Also, I'd like to know if I can open the video in another view in fullscreen mode when tapping the button, just like youtube does.
Given that LibVLCSharp is fully opensource, I encourage you to have a look at the code whenever you have questions.
Aspect ratio management is provided as a feature of the MediaPlayerElement component, but you can easily retrieve and use that code if you are not using that component.
private void UpdateAspectRatio(AspectRatio? aspectRatio = null)
{
var mediaPlayer = MediaPlayer;
var videoView = VideoView;
if (aspectRatio == null)
{
aspectRatio = GetAspectRatio(mediaPlayer);
}
if (videoView != null && mediaPlayer != null)
{
switch (aspectRatio)
{
case AspectRatio.Original:
mediaPlayer.AspectRatio = null;
mediaPlayer.Scale = 1;
break;
case AspectRatio.Fill:
var videoTrack = GetVideoTrack(mediaPlayer);
if (videoTrack == null)
{
break;
}
mediaPlayer.Scale = 0;
mediaPlayer.AspectRatio = IsVideoSwapped((VideoTrack)videoTrack) ? $"{videoView.Height}:{videoView.Width}" :
$"{videoView.Width}:{videoView.Height}";
break;
case AspectRatio.BestFit:
mediaPlayer.AspectRatio = null;
mediaPlayer.Scale = 0;
break;
case AspectRatio.FitScreen:
videoTrack = GetVideoTrack(mediaPlayer);
if (videoTrack == null)
{
break;
}
var track = (VideoTrack)videoTrack;
var videoSwapped = IsVideoSwapped(track);
var videoWidth = videoSwapped ? track.Height : track.Width;
var videoHeigth = videoSwapped ? track.Width : track.Height;
if (track.SarNum != track.SarDen)
{
videoWidth = videoWidth * track.SarNum / track.SarDen;
}
var ar = videoWidth / (double)videoHeigth;
var videoViewWidth = videoView.Width;
var videoViewHeight = videoView.Height;
var dar = videoViewWidth / videoViewHeight;
var rawPixelsPerViewPixel = DisplayInformation.ScalingFactor;
var displayWidth = videoViewWidth * rawPixelsPerViewPixel;
var displayHeight = videoViewHeight * rawPixelsPerViewPixel;
mediaPlayer.Scale = (float)(dar >= ar ? (displayWidth / videoWidth) : (displayHeight / videoHeigth));
mediaPlayer.AspectRatio = null;
break;
case AspectRatio._16_9:
mediaPlayer.AspectRatio = "16:9";
mediaPlayer.Scale = 0;
break;
case AspectRatio._4_3:
mediaPlayer.AspectRatio = "4:3";
mediaPlayer.Scale = 0;
break;
}
}
if (_aspectRatio != aspectRatio)
{
_aspectRatio = (AspectRatio)aspectRatio;
AspectRatioChanged?.Invoke(this, EventArgs.Empty);
}
}
See here https://code.videolan.org/videolan/LibVLCSharp/blob/3.x/LibVLCSharp/Shared/MediaPlayerElement/AspectRatioManager.cs
Do note that both the AspectRatio and Scale properties need to be updated when changing aspect ratio, as they are intertwined.
I'd like to know if I can open the video in another view in fullscreen mode when tapping the button, just like youtube does.
I'm not sure what you mean by this. If you refer to navigation, see my blogpost about it.
Fitscreen is simply stretching the video. But remember it will effect video quality. And also you will have to update it whenever video rotates or size changed.
You can try this working and tested code:
MediaPlayerElement1.MediaPlayer.AspectRatio = $"{MediaPlayerElement1.Width.ToString()}:{MediaPlayerElement1.Height.ToString()}";
MediaPlayerElement1.Scale = 0;
I have this C# method is asp.net webapi :
public IHttpActionResult Definitions()
{
var words = db.Words
.Where(w => w.Name == "abandon")
.AsNoTracking()
.ToList();
foreach (var word in words)
{
HttpResponse<string> response = Unirest.get("https://wordsapiv1.p.mashape.com/words/" + word.Name)
.header("X-Mashape-Key", "xxx")
.header("Accept", "application/json")
.asJson<string>();
RootObject rootObject = JsonConvert.DeserializeObject<RootObject>(response.Body);
var results = rootObject.results;
foreach (var result in results)
{
if (!(from d in db.WordDefinitions where d.Definition == result.definition select d).Any())
{
var pos = 0;
switch (result.partOfSpeech)
{
case "noun":
pos = 1;
break;
case "verb":
pos = 2;
break;
case "adjective":
pos = 3;
break;
case "Adverb":
pos = 4;
break;
default:
pos = 5;
break;
}
var definition = new WordDefinition()
{
WordId = word.WordId,
Definition = result.definition,
PosId = pos
};
db.WordDefinitions.Add(definition);
}
db.SaveChanges();
}
}
return Ok();
}
The code runs from start to finish. When I put a breakpoint on db.SaveChanges() I see it reaching that point multiple times and I see that definition is populated.
But when I check the database there's nothing added.
Is there a way that I can add some checks that might point me to what is going wrong? I suspected there was an exception but then I think not as the code keeps running right to the end of the method.
Try doing that db.SaveChanges after the complete lists gets added to WordDefinitions.. I mean after the scope of outer foreach.. Its better to have that line of code outside the scope because each time it will hit the db and save your data which will relatively take some more time when compared to doing like this...
Code:
public IHttpActionResult Definitions()
{
var words = db.Words
.Where(w => w.Name == "abandon")
.AsNoTracking()
.ToList();
foreach (var word in words)
{
HttpResponse<string> response = Unirest.get("https://wordsapiv1.p.mashape.com/words/" + word.Name)
.header("X-Mashape-Key", "xxx")
.header("Accept", "application/json")
.asJson<string>();
RootObject rootObject = JsonConvert.DeserializeObject<RootObject>(response.Body);
var results = rootObject.results;
foreach (var result in results)
{
if (!(from d in db.WordDefinitions where d.Definition == result.definition select d).Any())
{
var pos = 0;
switch (result.partOfSpeech)
{
case "noun":
pos = 1;
break;
case "verb":
pos = 2;
break;
case "adjective":
pos = 3;
break;
case "Adverb":
pos = 4;
break;
default:
pos = 5;
break;
}
var definition = new WordDefinition()
{
WordId = word.WordId,
Definition = result.definition,
PosId = pos
};
db.WordDefinitions.Add(definition);
}
}
}
db.SaveChanges();
return Ok();
}
I have two methods that record audio every 10 minutes, alternating each method, properly recorded during the first 6 or 7 hours, but then I generates large files to twice normal to hear hear bad but only happens with a method other Normal still recording. I use to record WaveInEnvent since the method is inside a thread, I think problem is in OnDataAvailable.
Here the code used:
wavein = new WaveInEvent();
wavein.Dispose();
wavein.DeviceNumber = 0;
wavein.NumberOfBuffers = 11;
wavein.BufferMilliseconds = 1000;
wavein.WaveFormat = new WaveFormat(8000, 16, 2);
wavein.DataAvailable += OnDataAvailable;
wavein.RecordingStopped += OnRecordingStopped;
writer = new WaveFileWriter(outfilename, wavein.WaveFormat);
bufferedWaveProvider = new BufferedWaveProvider(wavein.WaveFormat);
bufferedWaveProvider.DiscardOnBufferOverflow = true;
wavein.StartRecording();
private void OnDataAvailable(object sender, WaveInEventArgs e)
{
if (this.InvokeRequired)
{
//Debug.WriteLine("Data Available");
this.BeginInvoke(new EventHandler<WaveInEventArgs>(OnDataAvailable), sender, e);
}
else
{
if (writer != null)
{
try
{
for (int i = 0; i < e.BytesRecorded; i += 2)
{
short sample = (short)((e.Buffer[i + 1] << 8) | e.Buffer[i + 0]);
float sample32 = sample / 32768f;
writer.WriteByte(e.Buffer[i + 0]);
writer.WriteByte(e.Buffer[i + 1]);
}
}
catch (Exception ex)
{
// Log error
}
}
}
}
I am encountering an exception (not always but frequently) in my push service when pushing to Windows Phone. Exception is showing "one or more errors occurred" at the point where StopAllServices is called. The push service reports these errors only when pushing to windows phone, so I am at this point thinking I am doing something wrong with the Windows code. Could a pushsharp guru please have a look at the code and advise? (i.e. Redth - Im pretty new to asking questions here, can we tag people to get their attention?) The ambiguous error is returned in the catch of the StopAllBrokers() method
protected override void OnTimer(ElapsedEventArgs e, ref bool StopService)
{
try
{
if (!ServiceState.Instance.RequestLock())
{
WriteLogEntry("Skipping MobileEx.Push.Service[" + Lib.AppPath + "]. In use", LogBase.EEventType.Warning);
return;
}
int LoopCount = 0;
while (LoopCount < Panztel.Shared.General.Settings.AppSettings.GetSettingValue("ProcessLimit", "100"))
{
LoopCount += 1;
if (StopRequested)
break;
using (var MyScope = new TransactionScope())
{
var MyContext = DataContextHelper.NewContext;
var MyId = Guid.NewGuid();
Mobile.API.BusinessLogic.Data.Push MyItem = null;
try
{
MyItem = PushLogic.GrabItemToProcess(MyId, ref MyContext);
}
catch (Exception ex)
{
WriteLogEntry("Unable to get push item to process. " + ex.Message, LogBase.EEventType.Error);
}
if (MyItem == null)
break; // Drop out as nothing to process.
MyItem.ProcessId = MyId;
var MyApplications = PushLogic.GetPushApplicationListByPushId(MyItem.PushId, MyItem.CompanyLinkId, ref MyContext);
foreach (var MyPushApp in MyApplications)
{
var MyPhoneApp = PhoneLogic.GetPhoneApplicationItem(MyPushApp.PhoneId, MyPushApp.ApplicationId);
if (MyPhoneApp == null || string.IsNullOrEmpty(MyPhoneApp.PushChannelUri))
{
// Mark as failed and continue
MyPushApp.ProcessState = 15;
continue;
}
var MyQueue = GetPushBroker(MyItem.Phone.OsType, MyPhoneApp);
if (MyQueue == null)
{
MyPushApp.ProcessState = 16;
continue;
}
switch (MyItem.Phone.OsType)
{
case 1: // Android
var MyMsgHelper = new PushMessageHelper();
if (!string.IsNullOrEmpty(MyItem.Message))
MyMsgHelper.AddItem("alert", MyItem.Message);
MyMsgHelper.AddItem("badge", "1");
MyMsgHelper.AddItem("pushtypeid", MyItem.PushTypeId.ToString());
MyMsgHelper.AddItem("notify", MyItem.IsNotificationRequired ? "1" : "0");
if (MyItem.LastrvNo.HasValue)
MyMsgHelper.AddItem("lastrvno", MyItem.LastrvNo.Value.ToString());
var MessageInJson = MyMsgHelper.GetJsonMessage();
var MyNotification = new GcmNotification()
.ForDeviceRegistrationId(MyPhoneApp.PushChannelUri)
.WithCollapseKey("key_" + MyItem.PushId)
.WithJson(MessageInJson)
.WithTag(MyId.ToString());
MyQueue.QueueNotification(MyNotification);
break;
case 2: // Windows
//****************** RAW *********************************//
var ThisMsgHelper = new PushMessageHelper();
if (!string.IsNullOrEmpty(MyItem.Message))
{
ThisMsgHelper.AddItem("alert", MyItem.Message);
}
ThisMsgHelper.AddItem("badge", "1");
ThisMsgHelper.AddItem("pushtypeid", MyItem.PushTypeId.ToString());
ThisMsgHelper.AddItem("notify", MyItem.IsNotificationRequired ? "1" : "0");
if (MyItem.LastrvNo.HasValue)
ThisMsgHelper.AddItem("lastrvno", MyItem.LastrvNo.Value.ToString());
var MessageInXml = ThisMsgHelper.GetWp8PushMessage();
var MyWindowsNotification = new WindowsPhoneRawNotification();
MyWindowsNotification.ForEndpointUri(new Uri(MyPhoneApp.PushChannelUri));
MyWindowsNotification.ForOSVersion(WindowsPhoneDeviceOSVersion.Eight);
MyWindowsNotification.WithBatchingInterval(BatchingInterval.Immediate);
MyWindowsNotification.WithRaw(MessageInXml);
MyWindowsNotification.Tag = MyId.ToString();
MyQueue.QueueNotification(MyWindowsNotification);
break;
case 3: // iPhone
var MyAppleNotification = new AppleNotification()
.ForDeviceToken(MyPhoneApp.PushChannelUri)
.WithTag(MyId.ToString())
.WithCustomItem("pushtypeid", MyItem.PushTypeId.ToString(CultureInfo.InvariantCulture));
var MyMsg = MyItem.Message;
if (string.IsNullOrEmpty(MyMsg))
{
if (MyItem.IsNotificationRequired)
{
switch (MyItem.PushTypeId)
{
case 3:
MyMsg = "New schedule(s) received";
break;
case 4:
MyMsg = "New message(s) received";
break;
}
}
}
// if request location, add in the bit to do a background notification
// http://docs.xamarin.com/guides/cross-platform/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/
if (MyItem.PushTypeId == 5)
MyAppleNotification = MyAppleNotification.WithContentAvailable(1);
if (!string.IsNullOrEmpty(MyMsg))
MyAppleNotification = MyAppleNotification.WithAlert(MyMsg).WithBadge(1);
if (MyItem.IsNotificationRequired)
MyAppleNotification = MyAppleNotification.WithSound("beep.aiff").WithBadge(1);
if (MyItem.LastrvNo.HasValue)
MyAppleNotification = MyAppleNotification.WithCustomItem("lastrvno", MyItem.LastrvNo.Value.ToString());
MyQueue.QueueNotification(MyAppleNotification);
break;
}
MyPushApp.ProcessState = 5;
}
MyItem.ProcessState = 5;
PushLogic.UpdateItem(ref MyContext, MyItem);
MyScope.Complete();
}
}
}
catch (Exception ex)
{
WriteLogEntry("Error in MobileEx.Push.Service.PushWorker.OnTimer - " + ex.Message, LogBase.EEventType.Error);
}
finally
{
try
{
StopAllBrokers();
}
catch (Exception Ex)
{
WriteLogEntry("Error in MobileEx.Push.Service.PushWorker.OnTimer.StopAllBrokers - " + Ex.Message, LogBase.EEventType.Error);
}
}
ServiceState.Instance.ReleaseLock();
}
private PushBroker GetPushBroker(short OsType, PhoneApplication MyPhoneApp)
{
PushBroker MyBroker;
string Key = OsType + "." + MyPhoneApp.Application.PackageName.ToLower();
if (_PushList == null)
_PushList = new Dictionary<string, PushBroker>();
if (_PushList.ContainsKey(Key))
{
MyBroker = _PushList[Key];
}
else
{
MyBroker = new PushBroker();
MyBroker.OnNotificationFailed += Push_OnNotificationFailed;
MyBroker.OnDeviceSubscriptionExpired += Push_OnDeviceSubscriptionExpired;
MyBroker.OnNotificationSent += Push_OnNotificationSent;
MyBroker.OnChannelException += MyBroker_OnChannelException;
MyBroker.OnServiceException += MyBroker_OnServiceException;
switch (OsType)
{
case 1: // Android
var SenderId = MyPhoneApp.Application.ProductGroup.SenderId;
var SenderAuth = MyPhoneApp.Application.ProductGroup.SenderAuth;
var PackageName = MyPhoneApp.Application.PackageName;
var MyGoogleChannelSettings = new GcmPushChannelSettings(SenderId, SenderAuth, PackageName);
MyBroker.RegisterGcmService(MyGoogleChannelSettings);
break;
case 2: // Windows
MyBroker.RegisterWindowsPhoneService();
break;
case 3: // iPhone
var CertificateFile = Panztel.Shared.General.Settings.AppSettings.GetSetting("ApplePushCertificate", "");
var CertificatePassword = Panztel.Shared.General.Settings.AppSettings.GetSetting("ApplePushCertificatePassword", "");
var IsProduction = Panztel.Shared.General.Settings.AppSettings.GetSettingValue("ApplePushProduction", "0") == 1;
if (string.IsNullOrEmpty(CertificateFile) || string.IsNullOrEmpty(CertificatePassword))
throw new Exception("Apple Push Certificate settings not configured");
if (!File.Exists(CertificateFile))
throw new Exception("Apple Push Certificate [" + CertificateFile + "] not found");
var CertificateData = File.ReadAllBytes(CertificateFile);
var MyAppleChannelSettings = new ApplePushChannelSettings(IsProduction, CertificateData, CertificatePassword);
// need to limit the number of channels we have for Apple otherwise they can return
// "The maximum number of Send attempts to send the notification was reached!"
var MyServiceSettings = new PushServiceSettings();
MyServiceSettings.MaxAutoScaleChannels = 5;
MyServiceSettings.AutoScaleChannels = true;
MyBroker.RegisterAppleService(MyAppleChannelSettings, MyServiceSettings);
break;
}
_PushList.Add(Key, MyBroker);
}
return MyBroker;
}
private void StopAllBrokers()
{
if (_PushList == null)
return;
foreach (var MyItem in _PushList)
{
try
{
MyItem.Value.StopAllServices();
}
catch (Exception Ex)
{
WriteLogEntry("Error in MobileEx.Push.Service.PushWorker.OnTimer.StopAllBrokers.StopAllServices - " + Ex.Message, LogBase.EEventType.Error);
}
}
_PushList = null;
}
`