My blog editor of choice is proving to be a little quisquous at the moment.
Historically I have used Windows LiveWriter, part of Windows Essentials (whose development stopped in 2012, but was still available here (web installer) and here (offline installer)). This worked well, but at some point over the summer it stopped working with the uprated authentication requirements of Google’s Blogger. Fortunately though, it has just been open-sourced and is now available as Open Live Writer here.
However while one issue I immediately hit with this new version has been fixed, I have still yet to successfully connect to my blog with Open Live Writer. Fingers crossed….
So until the initial set of issues are worked out I’ll post articles and link to them by short manually entered blog entries here.
This post is mostly to point at a short article I’ve put together that brings to the attention of those who are interested the easy means to lessen the size of your Windows application’s executable file.
You can find the article here: Trimming The Fat - Smaller Windows .exe Sizes With Delphi And C++Builder.
[Update 20150105: I've made some changes to the advice in the Trim the Fat article (clearly marked) after some input came through from a helpful reader.]
Before signing off I want to mention a couple of other posts that recently caught my eye:
Daniele Spinetti has very recently worked out the solution to a bug he encountered with Android background services in Delphi 10 Seattle, which meant that the TLocationSensor component doesn’t function when used in an Android service data module. The problem has been identified and described in his (very) recent post. This will be a useful addition to those trying to use Android services to accompany Jim McKeeth’s offerings:
- Minimalistic Android Service with Delphi 10 Seattle
- More on Android Services with Delphi 10 Seattle, which contains links to additional services examples
- Android Services Presentations and Workarounds, which contains a CodeRage X session by R&D’s Julian Mesa and the link to this Code Central download of updated Java templates
Daniele also has a post showing how to use AdMob insterstitial adverts in Android apps as an alternative to regular banner ads.
Some posts from Chee Wee also stood out as interesting:
- Delphi app with console and GUI - how to have a Delphi app that has a console if required, but not otherwise
- Undocumented Delphi directives to set PE OS headers
- Undocumented Delphi routines
- Undocumented Delphi dependency directive
- Undocumented Delphi record alignment directive
Happy New Year!
Hi. This code not work delphi. Where am I doing wrong?
ReplyDeleteRelativeLayoutParams := TJRelativeLayout_LayoutParams.JavaClass.init(Integer(100), Integer(100));
RelativeLayout := TJRelativeLayout.JavaClass.init(SharedActivity);
RelativeLayout.setLayoutParams(RelativeLayoutParams);
TextView := TJTextView.JavaClass.init(SharedActivity);
TextView.setText(StrToJCharSequence('Native TextView'));
TextView.setTextColor(TJColor.JavaClass.BLACK);
TextView.setTextSize(20);
TextView.setLines(1);
TextView.setLayoutParams(RelativeLayoutParams);
RelativeLayout.addView(TextView);
NativeLayout := TJNativeLayout.JavaClass.init(SharedActivity,
MainActivity.getTextEditorProxy.getWindowToken);
NativeLayout.SetPosition(50, 50);
NativeLayout.SetSize(100, 100);
NativeLayout.SetControl(RelativeLayout);
NativeLayout.SetFocus(true);
Hello. What are you trying to achieve? Where is this code placed? In what way does it not work? Is there a relevance to you commenting on this post? Have you tried other things? What led you to try this code? I'm a little short on info here, even if I knew anything about the correct way to achieve whatever it is you are trying to achieve.
ReplyDeleteHi. I would like to add Jni components. I do not work codes.
DeleteHello Ali. JNI is the protocol used for native code (such as Delphi code) and Java code (such as Android code) to interact. There are many examples of using JNI around on the web. To be honest I don't really understand what you are looking to do - you;re not really giving any detail or good indication of what you are trying to achieve. For all the questions I asked just above, I'm not sure you;ve addressed many of them.
DeleteThis comment has been removed by the author.
DeleteHi.
Deleteunit VideoView;
interface
uses
System.SysUtils,
FMX.Types,
FMX.Helpers.Android,
Androidapi.Helpers,
Androidapi.JNI.App,
Androidapi.JNI.Net,
Androidapi.JNI.VideoView,
Androidapi.JNI.Widget;
type
TVideoView = class(TObject)
private
FDialog: JDialog;
FVideoView: JVideoView;
public
procedure Play(Source: string);
end;
implementation
{ TVideoView }
procedure TVideoView.Play(Source: string);
begin
CallInUIThread(
procedure
begin
FDialog := TJDialog.JavaClass.init(TAndroidHelper.Activity, -1);
FDialog.setCancelable(True);
FVideoView := TJVideoView.JavaClass.init(TAndroidHelper.Activity);
FVideoView.setVideoURI(StrToJURI(Source));
FVideoView.start;
FDialog.setContentView(FVideoView);
FDialog.show;
end);
end;
end.
Sweet! I take it this works, and you worked through the issues that were troubling you? If so, then bravo! Thanks for posting the fruits of your labour.
Delete