MrAnderson

Пользователи
  • Публикаций

    21
  • Зарегистрирован

  • Посещение

Информация о MrAnderson

  • Звание
    Пользователь
  1. Попробуй создай channel глобально и на создание формы . Только устанавливаю 10.3
  2. Как прошел переход?
  3. Да И с прочитанного я понял что с 26 API изменился принцип вывода уведомлений.
  4. You will have to make sure that your notification is a high priority, FCM will post it immediately FCM attempts to deliver high priority messages immediately, allowing the FCM service to wake a sleeping device when necessary and to run some limited processing (including very limited network access). High priority messages generally should result in user interaction with your app. If FCM detects a pattern in which they don't, your messages may be de-prioritized If your users interact with the notifcaiton FCM will not delay it. Background services may not be allowed in some cases in Android O but it doesn't mean you cannot send notifications Also your notification will not be displayed if your not using notification channels, You can use this code to create notification channels public void initChannels(Context context) { if (Build.VERSION.SDK_INT < 26) { return; } NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); NotificationChannel channel = new NotificationChannel("default", "Channel name", NotificationManager.IMPORTANCE_DEFAULT); channel.setDescription("Channel description"); notificationManager.createNotificationChannel(channel);} Может кто нибудь помочь вот с этим? Вроде как ответ на вопрос.
  5. Причем если в демо выставить AndroidManifest.template.xml <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="26" /> то тоже перестают приходить уведомления.
  6. Добрый вечер. Подскажите пожалуйста уже наверно неделю читаю все подряд и ни как не могу понять. Приложение из демо работает т.е. пуши локальные приходят а вот приложение созданное ранее не использовало эти уведомления после добавления не хочет их выводить. Попробовал новый проект создать там все ок. Что нужно добавить или где прописать что бы работали уведомления. Если что продолжаю учиться. Спасибо.
  7. Можно по подробнее?? TAndroidHelper.Activity.requestPermissions( CreateJavaStringArray([PERMISSION_FILE_READ, PERMISSION_FILE_WRITE]), BUTTON_FILE ); В этом месте у меня AV выскакивает. Delphi XE 10.2 Tokyo
  8. Спасибо. Большое за развернутые ответ.
  9. Вы были правы почему-то в настройках разрешений телефона стоял запрет на камеру хотя я его не ставил.
  10. вот что выдает монитор 11-06 16:59:18.051: E/ANDR-IOP(571): IOP HAL: Received pkg_name = com.embarcadero.MiracleM pid = -1 11-06 16:59:18.073: E/ActivityTrigger(1815): activityStartTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 11-06 16:59:18.076: E/ActivityTrigger(1815): activityResumeTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 11-06 16:59:18.289: E/ActivityTrigger(1815): activityResumeTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 Что здесь написано вообще без понятия
  11. Под андройдом я не понимаю как. Я только учусь можно так сказать и отлаживать не знаю как.
  12. Да вроде все разрешено <?xml version="1.0" encoding="utf-8"?> <!-- BEGIN_INCLUDE(manifest) --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.embarcadero.MiracleM" android:versionCode="3" android:versionName="1.0.0" android:installLocation="auto"> <!-- This is the platform API where NativeActivity was introduced. --> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.BIND_TEXT_SERVICE" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_CALENDAR" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" /> <uses-permission android:name="android.permission.READ_USER_DICTIONARY" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.USE_SIP" /> <uses-permission android:name="com.android.vending.BILLING" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-feature android:glEsVersion="0x00020000" android:required="True"/> <application android:persistent="False" android:restoreAnyVersion="False" android:label="MiracleM" android:debuggable="True" android:largeHeap="False" android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme" android:hardwareAccelerated="true"> <!-- Our activity is a subclass of the built-in NativeActivity framework class. This will take care of integrating with our NDK code. --> <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:label="MiracleM" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:launchMode="singleTask"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="MiracleM" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <receiver android:name="com.embarcadero.rtl.notifications.NotificationAlarm" /> </application> </manifest> <!-- END_INCLUDE(manifest) -->
  13. 11-06 16:16:26.069: I/Timeline(3200): Timeline: Activity_launch_request time:90722980 intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity bnds=[331,983][499,1151] (has extras) } 11-06 16:16:26.073: I/ActivityManager(1815): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity bnds=[331,983][499,1151] (has extras)} from uid 10028 11-06 16:16:26.080: E/ANDR-IOP(571): IOP HAL: Received pkg_name = com.embarcadero.MiracleM pid = -1 11-06 16:16:26.083: W/WindowManager(1815): Attempted to set focus to non-existing app token: Token{704629c ActivityRecord{391b4a5 u0 com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity t2981}} 11-06 16:16:26.084: D/ActivityTrigger(1815): activityStartTrigger: Activity is Triggerred in full screen ApplicationInfo{4b1ddd2 com.embarcadero.MiracleM} 11-06 16:16:26.085: E/ActivityTrigger(1815): activityStartTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 11-06 16:16:26.086: D/ActivityTrigger(1815): activityResumeTrigger: The activity in ApplicationInfo{4b1ddd2 com.embarcadero.MiracleM} is now in focus and seems to be in full-screen mode 11-06 16:16:26.086: E/ActivityTrigger(1815): activityResumeTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 11-06 16:16:26.092: D/ActivityTrigger(1815): activityResumeTrigger: The activity in ApplicationInfo{4b1ddd2 com.embarcadero.MiracleM} is now in focus and seems to be in full-screen mode 11-06 16:16:26.092: E/ActivityTrigger(1815): activityResumeTrigger: not whiteListedcom.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity/3 11-06 16:16:26.104: D/Boost(1815): hostingType=activity, hostingName=com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity, callerPackage=com.miui.home, isSystem=true, isBoostNeeded=false. 11-06 16:16:26.104: I/ActivityManager(1815): Start proc 24801:com.embarcadero.MiracleM/u0a267 for activity com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity caller=com.miui.home 11-06 16:16:26.105: D/PowerKeeper.Event(4621): notifyAMProcStart processName: 10267 reason: com.embarcadero.MiracleM, pid:0 11-06 16:16:26.179: D/GameBoosterService(4375): onGameStatusChange foreground:ForegroundInfo{mForegroundPackageName='com.embarcadero.MiracleM', mForegroundUid=10267, mForegroundPid=24801, mLastForegroundPackageName='com.miui.home', mLastForegroundUid=10028, mLastForegroundPid=3200, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=1} 11-06 16:16:26.236: W/ActivityThread(24801): Application com.embarcadero.MiracleM can be debugged on port 8100... 11-06 16:16:26.311: D/AccessibilityManager(24801): AccessibilityManager status: mPackageName = com.embarcadero.MiracleM, mOptimizeEnabled = true, mIsEnabled = false, mIsUiAutomationEnabled = false, mIsInterestedPackage =false 11-06 16:16:26.365: W/linker(24801): "/data/app/com.embarcadero.MiracleM-3N3_yTSwvPTP43Frk1p7rQ==/lib/arm/libMiracleM.so" unused DT entry: type 0xf arg 0x1a702 11-06 16:16:26.913: I/chatty(24801): uid=10267(u0_a267) com.embarcadero.MiracleM identical 1 line 11-06 16:16:28.035: I/CameraService(1042): CameraService::connect call (PID -1 "com.embarcadero.MiracleM", camera ID 0) for HAL version default and Camera API version 1 11-06 16:16:28.036: W/CameraBase(24801): An error occurred while connecting to camera 0: Status(-8): '1: validateClientPermissionsLocked:934: Caller "com.embarcadero.MiracleM" (PID 10267, UID 24801) cannot open camera "0" without camera permission' 11-06 16:16:28.506: I/WindowManager(1815): WIN DEATH: Window{6b72be1 u0 com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity} 11-06 16:16:28.506: I/ActivityManager(1815): Process com.embarcadero.MiracleM (pid 24801) has died: fore TOP 11-06 16:16:28.507: W/ActivityManager(1815): Force removing ActivityRecord{391b4a5 u0 com.embarcadero.MiracleM/com.embarcadero.firemonkey.FMXNativeActivity t2981}: app died, no saved state 11-06 16:16:28.510: D/PowerKeeper.Event(4621): notifyAMProcDied pacakageName: com.embarcadero.MiracleM, pid:24801 11-06 16:16:28.527: D/GameBoosterService(4375): onGameStatusChange foreground:ForegroundInfo{mForegroundPackageName='com.miui.home', mForegroundUid=10028, mForegroundPid=3200, mLastForegroundPackageName='com.embarcadero.MiracleM', mLastForegroundUid=10267, mLastForegroundPid=24801, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0} Добрый день. Не пинайте строго но в логе ничего не понимаю. Подскажите приложение нормально запускалось а потом в какой-то прекрасный момент перестало. причем изменений резких не было в основном касалось только изменения в diseng-time. Суда по логу падает в момент показа формы но почему не могу понять. Если есть платные решения(можно обсудить в личке) подсказки пишите.
  14. MrAnderson

    Вопрос "События OnClick в MyClass"

    Спасибо за ответы. Тему можно закрывать.
  15. MrAnderson

    Вопрос "События OnClick в MyClass"

    Не знаю почему но вот так заработало. Может кто нибудь прояснить почему. unit Unit2; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts; type TNotifyEvent = procedure (Sender: TObject) of object; TTapEvent = procedure(Sender: TObject; const Point: TPointF) of object; MyType = class //class(TObject) MyButt:TButton; private fNGP: string; function GetOnClick: TNotifyEvent; procedure SetOnClick(const Value: TNotifyEvent); function GetTapClick: TTapEvent; procedure SetTapClick(const Value: TTapEvent); public Property NGP:string read fNGP; procedure ButtonClick(Sender: TObject); procedure TapClick(Sender: TObject; const Point: TPointF); property OnButtonClick : TNotifyEvent Read GetOnClick Write SetOnClick; property OnTapClick : TTapEvent Read GetTapClick Write SetTapClick; constructor Create(NewId:integer;NewNGP:string); end; type TForm2 = class(TForm) Button1: TButton; VertScrollBox1: TVertScrollBox; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; myitem:array of MyType; implementation {$R *.fmx} { MyType } procedure MyType.ButtonClick(Sender: TObject); begin ShowMessage((Sender as TButton).Name +' NGP ['+self.fNGP+']'); end; constructor MyType.Create(NewId:integer;NewNGP:string); Var RectForButt:TRectangle; begin fNGP:=NewNGP; RectForButt:= TRectangle.Create(nil); RectForButt.Parent := Form2.VertScrollBox1; RectForButt.Align := TAlignLayout.Top; RectForButt.Margins.Top:=2; RectForButt.Margins.Bottom:=0; RectForButt.Margins.Left:=0; RectForButt.Margins.Right:=0; RectForButt.Stroke.Kind:=TBrushKind.None; RectForButt.Fill.Kind:=TBrushKind.None; RectForButt.Height:=150; RectForButt.HitTest:=false; MyButt:=TButton.Create(Form2); MyButt.Width:=100; MyButt.Parent:=RectForButt; MyButt.HitTest:=true; MyButt.Align := TAlignLayout.Center; MyButt.Text:='Моя кнопка'+IntToSTr(NewId); MyButt.Name:='MyButton'+IntTOSTr(NewId); MyButt.TextSettings.Font.Size:=12; MyButt.OnClick:=self.OnButtonClick; // MyButt.OnTap:=self.OnTapClick; end; function MyType.GetOnClick: TNotifyEvent; begin Result:=self.ButtonClick; end; function MyType.GetTapClick: TTapEvent; begin Result:=self.TapClick; end; procedure MyType.SetOnClick(const Value: TNotifyEvent); begin MyButt.OnClick:=value; end; procedure MyType.SetTapClick(const Value: TTapEvent); begin MyButt.OnTap:=Value; end; procedure MyType.TapClick(Sender: TObject; const Point: TPointF); begin ShowMessage((Sender as TButton).Name +' NGP ['+NGP+']'); end; procedure TForm2.Button1Click(Sender: TObject); begin SetLength(myitem,Length(myitem)+1); myitem[Length(myitem)-1]:=MyType.Create(Random(1000),'ПРОСТОЕ '+IntToStr(Random(100))); end; end.